# OPC Server 'Is Connected' Tag

**URL:** <https://forum.inductiveautomation.com/t/opc-server-is-connected-tag/40112>\
**Category:** Ignition\
**Created:** [October 28, 2020, 6:31pm UTC](https://forum.inductiveautomation.com/t/opc-server-is-connected-tag/40112 "2020-10-28T18:31:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [October 28, 2020, 6:31pm UTC](https://forum.inductiveautomation.com/t/opc-server-is-connected-tag/40112/1 "2020-10-28T18:31:47Z")

</div>

Hello,

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:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/d/6d087d0909601d8c026670008ca83a63b8f7b256.png)  
I did however find the `...MCS02/OPC/ServerStatus` Document (JSON) tag:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/59fa81f945c4bec9e2011d76ee7d0504f3a34b4a.png)  
I am thinking one of these tags may be able to help me:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/0/0021ad6dc7cb980b29d5243cdacbcce8ffcd062f.png)  
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?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 28, 2020, 6:59pm UTC](https://forum.inductiveautomation.com/t/opc-server-is-connected-tag/40112/2 "2020-10-28T18:59:16Z")

</div>

Use the OPC System Tags instead:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d8f4c9acb38d8715370c6602e3587e8bb873c5d0.png)
