I am collecting out feed data. I have a tag called total_outfeed. Right now this is the only tag I can access on the plc. I have a Valuechanged script that calculates the current value by subtracting current value - previous value.
My issue is when the machine is down, total_outfeed does not change, so the script throws an error. How can I get this to work?
My current solution is to have three tags with offset scan settings.
Tag A set to default scan class
Tag B set to scan every 10
Both reading total_outfeed.
Then every 60 sec I run the B-A to get the current outfeed.
I should clarify I have three outfeed tags on my device. Just because plc1 is down two and three could be running. So when plc1 is down it will throw off my total count.