Universal Robots Forum

RTDE change output

I want to be able to change the value to a “standard output” (standard_digital_output) and a “tcp output” (tool_digital_output) on the robot trough the rtde interface.
I’ve no problems to to read values like in- output (binary) and analog signals, but I don’t know how to change values. At the rtde-guide I’ve seen this sentence, but I have no clue how to do this by the python-send-method <*Digital and analog output values have to be sent together with mask, otherwise values will be ignored>

Could someone give me a code examples for changing DO (standard and tcp) and analog… Please!

If I want to set the “tool_digital_output nr1” to be “1”, I would like to do the following (not working):

#–code–>
#-> I guess this is the binary number for the output (in this case there are only 2 outputs 0 and 1)
setp.tool_digital_output = 1
#-> I guess this is the value/status for the output ( 0 or 1 )
setp.tool_digital_output_mask = 1
con.send(setp)

I’ve got an xml-file where I’ve defined the mask and the output as uint8 (key=setp) from the basic example provided by UR (control_loop_configuration.xml)

Never mind, I figured it out myself by using an exponential value… But still I think more code examples for the rtde would help new users like me!

Can you please post here what you actually did to make this work so that others can learn from you? I would like to learn more about how to make that work as well for some projects that I am working on.

Thanks!

1 Like