We have connected some B&R controllers with onboard OPC Server to Ignition to get some production data to managers.
We would like to know when the machine is turned on/off and so I would like to have something similar to the Modbus driver’s diagnostic ‘Is Connected’ tag but I cannot find anything like this in the OPC Browser:
I did however find the
...MCS02/OPC/ServerStatusDocument (JSON) tag:
I am thinking one of these tags may be able to help me:
So I have separate expression tags (using jsonGet()) for each of these that I am logging.
I just witnessed that if the machine is turned off, those tags’ values just stay what they were. So I think I can really only make use of the
currentTime.utcTime tag. My plan is to create a gateway event script that fires every few seconds and checks if the
currentTime.utcTime tag has changed since the last check. If it has, set a boolean ‘Is Connected’ tag, if not reset it.
Any more elegant way/s to do this?