# Modbus Device status in Tag

**URL:** <https://forum.inductiveautomation.com/t/modbus-device-status-in-tag/20759>\
**Category:** Ignition\
**Created:** [November 12, 2018, 12:52pm UTC](https://forum.inductiveautomation.com/t/modbus-device-status-in-tag/20759 "2018-11-12T12:52:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![olivier.dekoster](https://avatars.discourse-cdn.com/v4/letter/o/5e9695/32.png) [@olivier.dekoster](https://forum.inductiveautomation.com/u/olivier.dekoster)\
**Post date:** [November 12, 2018, 12:52pm UTC](https://forum.inductiveautomation.com/t/modbus-device-status-in-tag/20759/1 "2018-11-12T12:52:35Z")

</div>

Dear all,

I have few Modbus TCP device.  
Those are communicate with Ignition Gateway without problem.

I just would like to have the status of “connection” from my Modbus device in a tag , to make an alarm when the “communication” is broken.

Could you help me to tell me how can i do ?

Regards

Olivier

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [November 12, 2018, 2:12pm UTC](https://forum.inductiveautomation.com/t/modbus-device-status-in-tag/20759/2 "2018-11-12T14:12:15Z")

</div>

Check out [inductiveuniversity,](https://inductiveuniversity.com/course/alarming) it should show you how to do what you want and more.

---

<div class="post-metadata">

**Author:** ![olivier.dekoster](https://avatars.discourse-cdn.com/v4/letter/o/5e9695/32.png) [@olivier.dekoster](https://forum.inductiveautomation.com/u/olivier.dekoster)\
**Post date:** [November 12, 2018, 5:36pm UTC](https://forum.inductiveautomation.com/t/modbus-device-status-in-tag/20759/3 "2018-11-12T17:36:02Z")

</div>

Sorry,

I Explain : I have no problem to make an alarm with a tag.  
My problem is , i haven’t found in the system tags , the status “connected” from my 8 Modbus Devices.  
( Those status i found in the Gateway OPC-UA SERVER/Devices/ status (from Modbus TCP)

---

<div class="post-metadata">

**Author:** ![joel.golinucci](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/joel.golinucci/32/9927_2.png) [@joel.golinucci](https://forum.inductiveautomation.com/u/joel.golinucci)\
**Post date:** [September 12, 2019, 12:57pm UTC](https://forum.inductiveautomation.com/t/modbus-device-status-in-tag/20759/4 "2019-09-12T12:57:01Z")

</div>

Hi,  
Did you manage to find an answer to your problem?

I would be needing the exact same thing 😉

Thanks for your help !

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [September 12, 2019, 1:08pm UTC](https://forum.inductiveautomation.com/t/modbus-device-status-in-tag/20759/5 "2019-09-12T13:08:08Z")

</div>

When you add device to OPC server you should get a tag structure like so. ![modbus](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f39de6496154652b6a2885fad6a9b4a2c53c2cd0.jpeg)

---

<div class="post-metadata">

**Author:** ![joel.golinucci](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/joel.golinucci/32/9927_2.png) [@joel.golinucci](https://forum.inductiveautomation.com/u/joel.golinucci)\
**Post date:** [September 20, 2019, 6:20am UTC](https://forum.inductiveautomation.com/t/modbus-device-status-in-tag/20759/6 "2019-09-20T06:20:48Z")

</div>

These tags are always in “Bad\_Stale” :

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e279306556198fe974195476214a335778de6e9a.png)

But on the gateway Opcua Devices webpage, I’m able to see the correct status:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/13e7eab6d48097bad2f38116e1661f308b1724dc.png)

I’ve tried using script to fill a power table with the device status:  
`event.source.parent.getComponent('pwtDeviceStatus').data = system.device.listDevices()`

And this is working well:

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

But I still don’t know how to create an alarm based on the state being different than “Connected”.

Thanks for your help !

---

<div class="post-metadata">

**Author:** ![joel.golinucci](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/joel.golinucci/32/9927_2.png) [@joel.golinucci](https://forum.inductiveautomation.com/u/joel.golinucci)\
**Post date:** [September 23, 2019, 5:30am UTC](https://forum.inductiveautomation.com/t/modbus-device-status-in-tag/20759/7 "2019-09-23T05:30:21Z")

</div>

It’s all good, my mistake was that the “default” tag group was deleted, so the tags were not subsribable.
