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?

Regards,
Germán

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

Hi,

I am faced with the same problem, I am trying to control a pneumatic gripper, and I need two Analog Outputs. The first AO is for position and the second AO is for gripper strength. These control signals are between 0-24 Volts.

@gecastro have you found any solution? I am thinking one potential solution is to buy a current to volt converter, but I don’t want to resort to external circuitry. A similar solution would be to buy an external DAC, and get the digital signals off of the UR"s Digital output pins.

@mauch Would you please expand on “script_command” workaround? The only thing I have on the robot is “external control” running in a loop since I do everything in ROS. Would you perhaps give example commands for staying connected to Robot_ip address, while also manipulating AO voltage on the script_command topic?

Thanks a ton,
Mohamed