Polled tag group and data batch recording


I have an application where I want to record batch data into a database, but it is very important that all the data be read together to ensure that everything is up to date before adding the entry. I know this can be accomplished by using OPC items and the “Read” data mode in a transaction group. But for a smaller project I was wondering if I could accomplish the same thing by creating a separate tag group that uses the “Polled” data mode and a value changed event script.

Basically, if I add the batch trigger and all the relevant data to this polled tag group, can I be absolutely certain that all of the values for the data tags will be properly read and updated before the Value Changed event is executed on the trigger tag?



If you really don’t want to use a transaction group, you could subscribe just the trigger tag, then when that changes do a system.opc.readValues call to gather the rest of the values you need at once and process them accordingly.

1 Like

I see. So is it fair to say that no matter what settings you select, it’s not possible to ensure the synchronicity of values obtained through a Tag Group? And that this would also apply to tag reference items in a transaction group (not opc items)?

Yes, and yes.

Ok, that is all good to keep in mind. Thanks for the info!

This is what I use, utilising the tag value changed event handlers. I actually don’t know when I would use a transaction group tbh, perhaps I just haven’t spent the time to learn how to use them, but theyre not overly intuitive to me. I would much rather write a script to handle things like this