# Modbus connection error

**URL:** <https://forum.inductiveautomation.com/t/modbus-connection-error/10095>\
**Category:** Ignition\
**Created:** [June 5, 2015, 1:54pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095 "2015-06-05T13:54:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [June 5, 2015, 1:54pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095/1 "2015-06-05T13:54:01Z")

</div>

Hi, I have a PLC connected through Modbus ethernet and all is working fine but sometimes I was disconnected and get errors in the console, this happen mostly when I continued my work the next day. The solution for now is reset the gateway and works again.

Here is some screenshot:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/2e27362d1a3ba2ab86e9e27d33e0089917505914.png)  
  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/787972f5466300d8c6e81e5cc8754557345a9bba.png)

---

<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:** [June 5, 2015, 3:57pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095/2 "2015-06-05T15:57:42Z")

</div>

The first error is the Modbus device closing the connection. This typically happens after 10-15 seconds of inactivity. If you haven’t setup and subscribed to any tags yet then this isn’t surprising.

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [June 11, 2015, 12:56pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095/3 "2015-06-11T12:56:04Z")

</div>

I have setup some tags and all works perfectly, I had that error when I turn on my computer after has been shut down all night.

My question is: Ignition is closing the port? or is my plc?

The way I solve this is resetting the gateway, but I can’t tell that to my client every time it happen.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a4ceeab75d33bbe61540db0f698b77d74331c122.png)

---

<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:** [June 11, 2015, 1:23pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095/4 "2015-06-11T13:23:12Z")

</div>

It’s always the PLC that closes the port.

You have to be subscribed to tags - not just have them mapped in the gateway. If you haven’t created any tags in Ignition yet after creating that mapping you’ll still see the periodic disconnects.

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [June 11, 2015, 8:17pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095/5 "2015-06-11T20:17:35Z")

</div>

I have the tags in Ignition working, displayed en diferent windows, in transaction groups writing to database etc. and still get that error.

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6a9e09eef4d00efdc851dd6150a337938178ac29.png)

---

<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:** [June 11, 2015, 8:19pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095/6 "2015-06-11T20:19:24Z")

</div>

What rate are you subscribed to the tags at? These tags are from the 192.168.2.5 device, right?

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [June 11, 2015, 9:06pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095/7 "2015-06-11T21:06:03Z")

</div>

The tags are in default rate, 1000ms, the tags are from the 192.168.2.5 device.

---

<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:** [June 11, 2015, 9:08pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095/8 "2015-06-11T21:08:37Z")

</div>

Hmm. Not really sure what the cause is then. The only thing I can tell you is that message means the device closed the connection.

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [June 11, 2015, 9:27pm UTC](https://forum.inductiveautomation.com/t/modbus-connection-error/10095/9 "2015-06-11T21:27:08Z")

</div>

When you said that the plc close the connection because inactivity, What happen if I shut down my PC, the plc close the connection as well?

When I get this errors in the console, if I reboot my PLC it doesn’t work either, That is why I think Ignition has the problem because if I reset the gateway all works fine again.
