I’m trying to build something that will compare the historian value with the current OPC value, if for some reason the value are different I want the background of the numeric input to blink.
I have a window with multiple numeric input(Setpoints) . The values are binded to OPC tags with the history enable.
I tried to use system.tag.query.taghistory it’s working fine but i have like 750+ tags to compare
If you guys have any ideas that will help me thanks
Compared to which historian value? The last one? Ten minutes ago? Anything in the last day? So many possibilities, combined with so many options on how history is stored, makes your question awfully difficult to answer. More details on what you are trying to do, please?
Compare the last one with the current OPC value. I need to know if something goes wrong and the values are not the same.
Consider just using a gateway tag change event script, subscribed to all of the relevant tags, with the necessary “Is something wrong” logic. In my experience, the “Is something wrong” decision is based on comparing the actual value to a constant or to a setup value, not just that the value changed. If that’s the case, you probably want to define alarms on your tags and handle those instead.