Event Duration Options

I am looking to tally a boolean event duration over particular time periods on perspective view in the following ways:

  • Highest Consecutive Event Duration
  • Total Duration of All Events in Time Window

The two options that occur to me are 1) A named query that accepts view params and looks for status changes and subsequently tallies the date difference. 2) A non-retentive hour meter + similar query.

I’m wondering if i’m missing an easier solution to accomplish this with tag history bindings and aggregation modes.

Stay away from tag history for this; this type of use case is exactly what transaction groups are good at.

I’d log the start and end times for each state change, updating the end time only when the next state begins (current state end time = null). That should make finding the largest/ total duration pretty straight forward queries.

1 Like

Ben,

Could you expand on why you prefer transaction groups over tag histories for this use case?

I’ve found a couple different use cases for different scenarios. For example, when I am looking to calculate event duration, downtime, etc. on a line or area involving more complex logic to define the event, I prefer to use UDTs and transactions groups. However, if I am only interested in the event duration of a single machine instance; I’ve found point count query bindings of 1 with an aggregation mode of duration on/off to be reliable or alternatively I’ve have been using jython script transforms to do the same for different dashboard scenarios.

To add context: I’m new to SCADA, new to Ignition, new to anything OEE, and generally new to the OT space. I’m mostly working in piecemeal on downtime dashboards and I am at a crossroads now moving forward with a more systemic approach. Using UDTs/Transaction Groups to write event data to normalized downtime tables is probably where I will land long term. It seems to allow me the most flexibility to incorporate planned DT reasons, schedules, etc.

But, I am just curious if there are additional performance issues I should be aware of with tag history bindings and script transforms.

Thanks for your help!