Gateway Tag Change Events triggered by PLC Boolean tags

From the PLC state diagnostic OPC item. Or just use a flag that the PLC sets on first scan.

I am assuming the wall clock resets on mode change?

In our case, mode change is not the only thing that indicates a "PLC screw up". So getting an unexpected counter value might have to be the screw up indicator for me.

Use either a counter or a UTC timestamp as a trigger.

If the latter, no need to write to the PLC for screw-ups. Just ignore timestamps that are more than a few minutes old.

@pturmel thank you for your guidance on this issue. Using the counter instead of the Boolean tag worked well for accurately counting and reporting parts.

What do you suggest for machine state monitoring and reporting? We currently have a Boolean tag for that as well, which is ON when machine in running and OFF when machine is down. With the logic we discussed for the part count, we are probably losing at least micro downtime events when the ignition OPC server is not able to see short periods of this RUNNING tag turning OFF.

If you need precision timestamps for on-off events, you almost certainly need to use a PLC ring buffer (array of structures) into which to place event type codes and precision timestamps. Then Ignition can monitor the ring buffer head & tail pointers and use system.opc.readValues() to grab just the new entries.

1 Like