Durations for certain tag value

Do you mean to the Ignition Historian? If so, then no. You will have to retrieve the records as stored and then write a script to calculate the totals.

You also now have the additional problem of figuring out what state the machine is in at the start of the period of interest - particularly if it never changes state during the period.

The historian doesn't extrapolate data to the start and end timestamps and this makes it of little use (in my opinion) for many applications. As a result we're using a dedicated table to record tags onChange and on a gateway scheduled event (every 15 minutes in our case) so that we always have a value for the start of any shift pattern (which will always start / end at :00, :15, :30 or :45). The data table columns in our case are

  • timestamp
  • machineId
  • runStatus
  • stopCode (what was the first-out alarm that caused the machine to stop)
  • countGood
  • countTotal
  • productCode

That gives a pile of useful information for OEE, etc.

2 Likes