Understanding Transaction Group Execution

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:

  1. 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.

  2. Is there an easy way to set the event meter to reset after each execution?

Any input is appreciated, thank you so much.

Don't do the counting in Ignition. Do the counting in your PLC. Use a never-resetting integer tag (odometer-style). Use the transaction group to record that counter at the top of every minute. When querying the database, include one extra row beyond the bounds of the time period of interest, then use lead() or lag() in the SQL to get the deltas per minute, using a modulus to handle rollover. Sum the one-minute values when querying larger time spans.