Is there any way to get tool analog input 2 or 3?

Hi all,

I am using UR3 with OpenRB-150.

I connected white and brown cable to OpenRB-150 analog output pin.

I want to get tool analog input 2 or 3 from UR3.

As I searched RTDE source code, it considers only StandardAnalogInput 0 and 1.

Why is it consider only standard analog input 0 and 1?

Is there any way to get Tool Analog Input 2 or 3 with RTDE? or socket?

Best regard,
Soochul

Hello @64002

see the attached screenshot from the RTDE Support site.

The analog tool inputs are not designated standard analog inputs, but have their dedicated tool analog input name.

/Stefan

Thanks for your quick reply.

However, as I am using ur_rtde, I have to change to RTDE client library.

Whoever wants to get tool analog input 2 or 3 using RTDE client library, refer this example code.

from rtde import rtde_config, rtde

robot_ip = "your robot ip"
port = 30004

# Load RTDE configuration
conf = rtde_config.ConfigFile("tool_analog_input_config.xml")
output_names, output_types = conf.get_recipe("out")

# Connect to RTDE
con = rtde.RTDE(robot_ip, port)
con.connect()

# Setup output recipe
con.get_controller_version()
con.send_output_setup(output_names, output_types)

# Start RTDE synchronization
con.send_start()

# Read tool analog input values
state = con.receive()
tool_analog_input_2 = state["input_bit_register_2"]  # Example input
tool_analog_input_3 = state["input_bit_register_3"]  # Example input
print(f"Tool Analog Input 2: {tool_analog_input_2}")
print(f"Tool Analog Input 3: {tool_analog_input_3}")

# Stop and disconnect
con.send_pause()
con.disconnect()


Best regard,

Soochul

1 Like