# Modbus devices showing "Connecting", Disconnected

**URL:** <https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058>\
**Category:** Ignition\
**Tags:** ignition80, ignition81\
**Created:** [January 31, 2024, 11:52pm UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058 "2024-01-31T23:52:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yousef\_Ali](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@Yousef\_Ali](https://forum.inductiveautomation.com/u/Yousef_Ali)\
**Post date:** [January 31, 2024, 11:52pm UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/1 "2024-01-31T23:52:18Z")

</div>

Device connected through modbus TCP/IP and actually connection lost between GW and device either due to communication issue between GW and device or device power off .

Problem is the tag showing the last value with quality `Bad("Bad_NotConnected: The variable should receive its value from another variable.")`

my problems , i have scripts and different expressions based on these tags values which in this case wrong value. I knew I could consider the tagQulaity in my script ,,

Why value stack at last value ? Any guidance .

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 31, 2024, 11:55pm UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/2 "2024-01-31T23:55:27Z")

</div>

What would you have it be? It is properly signalling the bad quality, and showing the last known value. Seems perfectly reasonable to me. (Expressions can check quality, too, not just scripts.)

---

<div class="post-metadata">

**Author:** ![Yousef\_Ali](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@Yousef\_Ali](https://forum.inductiveautomation.com/u/Yousef_Ali)\
**Post date:** [February 1, 2024, 12:01am UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/3 "2024-02-01T00:01:35Z")

</div>

it should show null as value, but last read value is bad indication if connection lost . i thought i missed something or settings in modbus configuration.

Conclusion is to consider tagQuality in all my expression and scripts not depend on tagValue Only .

---

<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:** [February 1, 2024, 12:02am UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/4 "2024-02-01T00:02:32Z")

</div>

> [@Yousef\_Ali](#):
>
> it should show null as value

Yes, this is actually the correct behavior for an OPC value that is accompanied by a _Bad_ qualified, as opposed to _Uncertain_. Unfortunately there is an inconsistent application of this among our drivers, especially the older ones.

---

<div class="post-metadata">

**Author:** ![Yousef\_Ali](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@Yousef\_Ali](https://forum.inductiveautomation.com/u/Yousef_Ali)\
**Post date:** [February 1, 2024, 12:07am UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/5 "2024-02-01T00:07:30Z")

</div>

> [@Kevin.Herron](#):
>
> Yes, this is actually the correct behavior for an OPC value that is accompanied by a _Bad_ qualified, as opposed to _Uncertain_. Unfortunately there is an inconsistent application of this among our drivers, especially the older ones.

Is there any plan to be adjusted with modbus . for example now Pump showing in run status in UI while connection lost due to RunStatus value showing the last value (1)

---

<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:** [February 1, 2024, 12:08am UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/6 "2024-02-01T00:08:09Z")

</div>

Perhaps in Ignition 8.3 when such a change in behavior can be justified.

---

<div class="post-metadata">

**Author:** ![Yousef\_Ali](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@Yousef\_Ali](https://forum.inductiveautomation.com/u/Yousef_Ali)\
**Post date:** [February 1, 2024, 12:10am UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/7 "2024-02-01T00:10:19Z")

</div>

We have to review all project again due to this behavior .. A lot of work now

---

<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:** [February 1, 2024, 12:10am UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/8 "2024-02-01T00:10:56Z")

</div>

> [@Yousef\_Ali](#):
>
> again

It didn't change, did you not notice this behavior the first time?

---

<div class="post-metadata">

**Author:** ![Yousef\_Ali](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@Yousef\_Ali](https://forum.inductiveautomation.com/u/Yousef_Ali)\
**Post date:** [February 1, 2024, 12:13am UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/9 "2024-02-01T00:13:26Z")

</div>

i didn't notice this before as the communication was stable .. This problem appeared this week with an issue in communication .

---

<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:** [February 1, 2024, 12:14am UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/10 "2024-02-01T00:14:06Z")

</div>

Understood. Sorry for the trouble, but this behavior is not going to change in an 8.1 point release.

If and when it does change I am certain it's going to result in a deluge of support calls. It just can't be done mid-series 8.1.

---

<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:** [February 1, 2024, 3:19pm UTC](https://forum.inductiveautomation.com/t/modbus-devices-showing-connecting-disconnected/85058/11 "2024-02-01T15:19:35Z")

</div>

Note to future self: although there is an inconsistent handling in some of the drivers, the Modbus driver actually does send null value with bad quality in this case. It's the interaction between OPC UA client and tag system that is preserving the value by calling `OpcSubscriptionNode::setQuality` when a null value + bad quality is received from an OPC server. It seems that applying the bad quality while preserving the last tag value is intentional behavior.
