# I have question about Modbus Server Connection time out

**URL:** <https://forum.universal-robots.com/t/i-have-question-about-modbus-server-connection-time-out/3276>\
**Category:** Robot Communication\
**Created:** [December 10, 2018, 8:48am UTC](https://forum.universal-robots.com/t/i-have-question-about-modbus-server-connection-time-out/3276 "2018-12-10T08:48:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgyoo](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dgyoo](https://forum.universal-robots.com/u/dgyoo)\
**Post date:** [December 10, 2018, 8:48am UTC](https://forum.universal-robots.com/t/i-have-question-about-modbus-server-connection-time-out/3276/1 "2018-12-10T08:48:26Z")

</div>

I want to maintain connected state with the UR modbus server

Currently, I am using the modbus communication as follows.

1. Socket connection

2. Send protocol (send or receive)

3. Confirm the return value

4. Close the socket

However, I wants to send and receive data continuously  
with the first connection without the socket close.  
(To save connection and disconnection time)

In the case of the Socket Test, ananas(the period over the 2 sec) and my program,  
if I make a socket connection and do not send data,  
the server disconnects after 2 seconds.  
I confirms that it is in close\_wait state.

In this regard, I want to know how to maintain connected state.

EX)

1. How to modify TimeOut of UR Modbus server.

2. How to use the keepalive function on the client side

3. Other good ways …

thank you for reading my issue

---

<div class="post-metadata">

**Author:** ![matteo.stagi](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@matteo.stagi](https://forum.universal-robots.com/u/matteo.stagi)\
**Post date:** [September 7, 2022, 2:54pm UTC](https://forum.universal-robots.com/t/i-have-question-about-modbus-server-connection-time-out/3276/2 "2022-09-07T14:54:00Z")

</div>

> [@dgyoo](#):
>
> ow to modify TimeOut of UR Modbus server.

I have the same problem. No one can help me ?

---

<div class="post-metadata">

**Author:** ![mnizamudeen](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mnizamudeen](https://forum.universal-robots.com/u/mnizamudeen)\
**Post date:** [August 5, 2025, 10:03am UTC](https://forum.universal-robots.com/t/i-have-question-about-modbus-server-connection-time-out/3276/3 "2025-08-05T10:03:28Z")

</div>

Same here:  
Any solution?

 ![{80C12D88-F9B9-4F1D-B189-D13E979DCEAC}](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/0/024fc872a9bb196ce632e4159ab5f889d4bd23a6.png)
