# Stop Program when UR has no connection to MODBUS-Server

**URL:** <https://forum.universal-robots.com/t/stop-program-when-ur-has-no-connection-to-modbus-server/3470>\
**Category:** Robot Communication\
**Created:** [January 16, 2019, 2:08pm UTC](https://forum.universal-robots.com/t/stop-program-when-ur-has-no-connection-to-modbus-server/3470 "2019-01-16T14:08:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon54922800](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@anon54922800](https://forum.universal-robots.com/u/anon54922800)\
**Post date:** [January 16, 2019, 2:08pm UTC](https://forum.universal-robots.com/t/stop-program-when-ur-has-no-connection-to-modbus-server/3470/1 "2019-01-16T14:08:23Z")

</div>

Hi,

we have connected some MODBUS-Clients to our UR.  
In the UR-MODBUS-Configuration the digital in-/outputs are connected to the server (green) and work as they should.

In the case of a connection failure of one MODBUS-Server we want to stop/pause the UR-Program. I am searching for a solution that is not part of the robotprogram, so that I can just load the configuration.

Robert

---

<div class="post-metadata">

**Author:** ![mmi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mmi/32/691_2.png) [@mmi](https://forum.universal-robots.com/u/mmi)\
**Post date:** [January 30, 2019, 3:03pm UTC](https://forum.universal-robots.com/t/stop-program-when-ur-has-no-connection-to-modbus-server/3470/2 "2019-01-30T15:03:30Z")

</div>

I’m not sure if I understand that correctly, but current behavior is that program is stopped whenever it tries to access modbus signal that is not connected.  
You could have a script running in separate program thread that periodically reads all modbus signals that are critical for you.  
Something like:

thread checkModbus():  
while True:  
modbus\_get\_signal\_status(“critical\_signal”, False)  
sleep(1)  
end  
end
