I have a question regarding addressing Allen-Bradley tag data structure. Our PLC programmers have setup a series of boolean tags in a data structure in the PLC (a 1756-L81E, accessed though the Ignition Logix driver). The picture below shows the structure:
I am easily able to address the individual boolean statuses in the structure. A sample OPC item path would be ns=1;s=[PLC1_LTA]HMIC_MDR_1.Jam . However, I would rather not (at this time) create a tag for each boolean status. Instead, I would like to address the entire structure as a long value and use bit logic to obtain the individual boolean statuses.
This is what I did for our Siemens PLCs and it worked very well. It was worthwhile because it cut way down on the number of tags that had to be created for the project and tags can’t be easily configured just by path and name for Siemens S7-1500 PLCs. Also, it looked like having 30 - 50 thousand boolean tags might impact the system worse than having something like a thousand integer (often long) tags. A better way might be to read the structure directly into a UDT if that can be done.
At any rate, my code that I am porting from existing projects that use Siemens PLCs expect the data to be in an integer format. I thought that I could change the path to point to just the structure name (ns=1;s=[PLC1_LTA]HMIC_MDR_1 for the example above) and change the tag datatype from boolean to long or integer, but so far, I get a Configuration Error for the tag when I try this for any integer data type that I tried (long and integer).
Does anyone know if it is possible to force this structure into an integer by simple addressing?
My current plan is to create a UDT that matches the structure in the PLC and map the statuses to their boolean counterparts in the UDT. Then I can write a script to convert the booleans to the integer that my current code expects. Later (time permitting), I will probably change the code to work with the booleans in the UDT directly rather than converting the booleans to integers and then parsing the integers back to booleans to set the statuses on screens.
Can anyone address the efficiency (in terms of network communications loads, load on the Ignition server, and load on the PLC) when trying to read a smaller number of "wider tags (I mean, reading a single 32 bit long tag compared to reading 32 individual boolean tags. When the boolean tags are setup as UDTs, is that read somehow more efficient in terms of network and machine load compared to reading the individual boolean tags.
Finally (or maybe this should be first), is there anywhere I can learn more about these issues? I have searched the Ignition forum, the user manual, and checked over the IU videos and haven’t seen much addressing these issues. I will continue to review the IU videos related to tag addressing for UDTs to see what I can learn there.
Thank you for any information or sugestions that anyone can offer.