I’m trying to set up a UDT with a String Array OPC tag and Boolean array OPC tag, but I can’t get the UDT tags to correctly point to the OPC tags. When I browse for the top level of the array tag they show up as folders in the OPC browser and pointing to the folder does not yield correct results. I have tried dragging in the OPC tags into the tag browser and pointing my UDT tags to those with little success as well. I feel like I am missing something simple but cannot figure out how to get this to work. I have browsed the forums and haven’t been able to find a solution to this question either.
None of the drivers expose arrays as actual OPC array tags, they all use folders with a tag for each element.
The drivers generally make sure to read arrays as a whole, so you’re not losing any efficiency at the protocol level, but you have to deal with individual tags per element in Ignition.
So is there a way to take my PLC array tags and represent them as an array in ignition? I have a UDT I’m setting up for alarming, and I have a 300 element array representing each alarm, so an array makes sense to use here rather than addressing to each bit individually. I guess I’m also wondering then is there any circumstance to get OPC array types to work correctly since the top level in the drivers is represented as a folder rather than a tag?
Not without something really goofy like creating an array of memory tags and manually filling in the values in scripting or something.
If the tags aren’t arrays in the OPC server you generally just have to deal with it that way. Kepware doesn’t expose them as arrays either.
Most of the drivers were developed before Ignition even had support for array datatypes. I’m hoping to slowly add array support to the drivers as we move beyond Ignition 8.0.
Okay, I will find another way to accomplish what I’m trying to do then. Judging by the responses I’ve seen from other threads, I’m guessing you guys already have a few feature requests for improved OPC array support, so I will defer that request. Thanks for your clarification!
Also consider that tag value changes are not (yet?) granular to the element level. Any change to an array element will be treated as the entire array tag changing. Using folders of elements really is the more efficient approach (for now).
FYI for anyone that has to do something like this in the future. I’m using this for alarming, but you can adapt it to whatever you’re trying to accomplish. I basically set up 3 UDTs. The lowest level UDT is just my trigger and my message. I set my alarm up on the trigger, and just point it to the message tag:
My next level up UDT is just a 32bit collection of my alarm UDTs. I created this to make it a little faster and to handle how allenbradley bool arrays get truncated into int4 arrays
And then the top level is a collection of those byte arrays:
I know this is a VERY dirty method to do this, but given the OPC array limitation, as a workaround it works.
I hope this helps some poor soul looking for similar answers to me
Thanks for posting your solution.