Goal: I have a binary OPC input that triggers whenever x is produced. I want to count how many x are produced in a minute and record that number to a database. And then reset the count for the next minute. So it would be something like:
Where each record is how many x were produced in the last minute. Note that I would like to incorporate multiple tags into this table, but I am just simplifying it to explain.
What I am trying: Using a standard transaction group with event meters. I run into 2 problems:
-
If the timer is set to 1 minute, my event meter doesn't count up. I can only see the count iterating if I set the timer to 1 second. I thought tag values would evaluate regardless of the execution scheduling. I tried making an OPC item and checking "Override OPC subscription rate" but that didn't work either.
-
Is there an easy way to set the event meter to reset after each execution?
Any input is appreciated, thank you so much.