Would like to read an array of floats from a ControlLogix. Is this possible to do directly in Ignition 8.1? Thanks,
The native logix driver doesn't support reading arrays as single array tags. My alternate driver can do this.
Whether you drag all the array tags into the tag browser or issue a system.opc.readValues
call for each element, the driver will still issue a single read for the whole array, you just have to deal with having a tag/value per element instead of a single tag/value where the value is an array.
While this comment might initially appear as a drawback, I've often found it beneficial to assign unique properties to tags of individual array elements (documentation, tooltip, engineering units & ranges, historical settings, tag security, etc.). If accessing tag values via index is a requirement, try to keep the tags intelligently named, all grouped within a folder. Optionally, with the folder name matching the tag name in the PLC, and tags within the folder matching their index within the array.
An example where `index = 2`:
- PLC Tag =
my_array[2]
- Ignition Folder =
my_array
- Ignition Tag Name =
2
- Ignition Tag Path =
[default]my_array/2
- Binding =
[default]my_array/{index}
Appreciate the quick response. May have to look into the new driver since I have around 400 tags in the array. Thanks,
You should be aware that my driver support for array tags always transfers the whole array, in either direction. You cannot write to individual array elements. (Yet--perhaps in v8.3.)
Still working through the details. Just need to be able to read the data and analyze it pretty quickly.
If just analyzing in a script, is it an option to use:
from within your script, and skip Ignition tags entirely? As Kevin mentioned, driver reads the entire array in a single read, this should be lightning fast.