Universal Robots Forum

Analog Output with set_io service

Hi there,

I’m trying to set an analog output with the set_io service.

I have tried the ur_driver.io_interface with the function

set_analog_out(0, 1.0)

or using the service directly:

setIOService(SetIORequest.FUN_SET_ANALOG_OUT, 0, 1.0)

The problem is the this seems to control only the current going out from the analog pin and keeping the voltage constant at 24V. Instead, what I need to do is to set 1V to the pin AO0.

I can see and change in the teach pendant the value in volts, but whenever I send the command from ROS, it defaults back to current.

Any idea how to change the setting to Volts?


Please note that the ur_driver has been deprecated.

However, the problem you describe still exists with the current ur_robot_driver as this is basically directly following the setIO.service definition, so it would have to be updated there first so that the driver can follow this change.

As a workaround, you can send UrScript snippets to the driver directly using the driver’s script_command topic directly.

Edit: I’ve created an issue to discuss this upstream: Analog output domain in setIO service · Issue #11 · ros-industrial/ur_msgs · GitHub