# Time out error when using multiplen inputs

**URL:** <https://forum.universal-robots.com/t/time-out-error-when-using-multiplen-inputs/40243>\
**Category:** URScript\
**Created:** [June 19, 2025, 12:56pm UTC](https://forum.universal-robots.com/t/time-out-error-when-using-multiplen-inputs/40243 "2025-06-19T12:56:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zimmermi](https://avatars.discourse-cdn.com/v4/letter/z/b77776/32.png) [@zimmermi](https://forum.universal-robots.com/u/zimmermi)\
**Post date:** [June 19, 2025, 12:56pm UTC](https://forum.universal-robots.com/t/time-out-error-when-using-multiplen-inputs/40243/1 "2025-06-19T12:56:16Z")

</div>

“”"  
This script just represent the functions of the Remote tool for UR Robots E-Series  
“”"

import time

# Importing the robot\_control.py (need to be in same folder as the main script)

import robot\_control as rc  
import rtde as rt

# Robot IP must be String to parse it to the Socket connections

robot\_ip = ‘192.168.1.128’

# There about 3 connection ways to the UR.

# You can use the RTDE to request data from Robot. So you will be able to get feedback from robot with 125hz

# Refresh rates up to 500Hz are also possible, but require Gigabit network and Unix Based Computer like Linux or MacOS

info = rc.RTDE(robot\_ip) # init Info Level connection to Robot

# This represend the instant control level. The commands send to the robot will be executed directly.

# It is ignoring if robot is still working on something.

control = rc.URControl(robot\_ip, True) # init instand Control level

# This part can be used if you want to have a full script that does not require live control.

# Scripts must be finished and send to the robot. The robot can handle up to 500 lines.

# After 500 Lines reached, you need to clear the intrpreter buffer and start counting from 1.

#icontrol = rc.URControl(robot\_ip, False) # init intepreter Control level

#Definerar koordinater i systemet, där x och y beskrivs i meter. Maxlängd på 0.8 m  
move\_s = 0.1

def start\_pos():  
control.send\_home() # this will tell the robot to move to his home position in joints not as target.  
while not info.target\_reached(rc.home\_joints, level=5, joints=True):  
pass

def digital\_out\_test():  
“”"  
This Scrip should show how to control Digital Outs.

```
Important note!
To interact with Tool Output just use digital out 8 for tool out 0 and digital out 9 for tool out 1
But to ask the state of the Tool output you will have different id's (TDO0=16, TDO1=17).
This is commented in Robot control
"""
while 1: # Infinite Loop
    # Check if the tool digital output 0 is on
    if info.get_digital_output_on(16):
        control.set_digital_out(8, False) # Turn the TDO0 off
    else:
        control.set_digital_out(8, True) # Turn the TDO0 on
      # sleep is not needed but it is better to visualize

```

def move\_robot(c):  
pose = info.get\_TCP\_pose()  
rs.reconnect\_robot()

if **name** == ‘ **main** ’:  
control.send\_home() #sätter robot i start position  
while not info.target\_reached(rc.home\_joints, level=5, joints=True):  
pass

```
   while True:

        print("start of loop")
        actual_pose = info.get_TCP_pose()
        
        print("define X in dm")
        x = int(input())

        print("define y in dm")
        y = int(input())
        actual_pose[0] += (move_s * x)
        actual_pose[1] += (move_s * y)

        control.send_movel(actual_pose)
        while not info.target_reached(rc.home_joints, level=3, joints=True):
            pass

        digital_out_test()
        print("done with function")

```

I have used this script for a while and have noticed that after one mainloop the robot no longer gains any bytes and gets an exception error that stops the full program. Has anybody had the same problem, I have tried putting in refresh commands but it is not working. The robot is fully connected so it’s not a connection error.

This is the log output

INFO:rtde:RTDE synchronization started  
Connecting instand\_mode  
start of loop  
define X in dm  
2  
define y in dm  
2  
ERROR:rtde:received 0 bytes from Controller, probable cause: Controller has stopped  
INFO:rtde:RTDE disconnected  
Traceback (most recent call last):  
File “C:\URsim\Python\UR\_Robot\_Control-1.0.0\UR\_Robot\_Control-1.0.0\sample.py”, line 80, in   
while not info.target\_reached(rc.home\_joints, level=3, joints=True):  
File “C:\URsim\Python\UR\_Robot\_Control-1.0.0\UR\_Robot\_Control-1.0.0\robot\_control.py”, line 414, in target\_reached  
actual\_pose = self.get\_joints()  
File “C:\URsim\Python\UR\_Robot\_Control-1.0.0\UR\_Robot\_Control-1.0.0\robot\_control.py”, line 342, in get\_joints  
state = self.rob.receive()  
File “C:\URsim\Python\UR\_Robot\_Control-1.0.0\UR\_Robot\_Control-1.0.0\rtde\rtde.py”, line 184, in receive  
return self.\_\_recv(Command.RTDE\_DATA\_PACKAGE, binary)  
File “C:\URsim\Python\UR\_Robot\_Control-1.0.0\UR\_Robot\_Control-1.0.0\rtde\rtde.py”, line 269, in \_\_recv  
self.\_\_recv\_to\_buffer(DEFAULT\_TIMEOUT)  
File “C:\URsim\Python\UR\_Robot\_Control-1.0.0\UR\_Robot\_Control-1.0.0\rtde\rtde.py”, line 309, in \_\_recv\_to\_buffer  
raise RTDEException(‘received 0 bytes from Controller’)  
rtde.rtde.RTDEException: ‘received 0 bytes from Controller’
