I am looking into creating some UDTs to be used in SQL bridge (to streamline the process of adding any new machine to our data collection projects).
I have only ever used OPC Items in a transaction group, so the rate at which I’m polling is fairly straightforward. I only need to know the ‘Execution Schedule’ of the group.
However, with the UDTs, they’ll only update as quickly as the Tag Group Rate they’re assigned to.
How do the Tag Group Rate and Transaction Group Execution Schedule interact?
Do I need to make my tag group rate twice the execution schedule to ensure I don’t miss any tag changes?
I don’t want to unnecessarily overload the Ignition server with high tag update rates.
TL/DR: Don’t do this for triggered groups.
When using Ignition tags of any kind within a Transaction Group, the latest value of the tag is grabbed when the group executes. There is no guarantee of any relationship between the timing of one tag and another within the group, whether in a UDT or not. This may or may not be a problem depending on your use, but is often a problem with triggered transactions.
Your PLC populates several tags with the results of the last operation, then changes a trigger tag to signal new data. When the OPC server polls these tags to look for changes, it is likely to see all of these at once, and deliver them together. “Deliver together” has no ordering guarantees, so you might get the new trigger value just before your group executes, and the rest right after it executes. ):
Configure the transaction group to use OPC mode == Read instead of Subscribe, and use OPC items instead of Ignition tags for any non-trigger data.
Use a timer in your PLC code to delay setting any trigger after updating related data, by at least one OPC poll interval, to ensure data is delivered first.
Currently doing things as you described for those reasons.
Would have loved to have some sort of UDT so that I could pull in all that data at once when setting up a new machine, but looks like I’ll just have to manually do that.
Side note, when would it ever be a good idea to use a tag reference instead of an OPC item? Why is that an option if using an OPC item would be more stable?