How te read actual_digital_output_bits

Hi, maybe it’s silly but I’m trying to find out how can I read particular outputs values from actual_digital_output_bits.
Maybe someone figured out how to read it via RTDE?

1 Like

Recording example on Real-Time Data Exchange (RTDE) Guide - 22229 is reading output bits.
Fields can be either specified directly in send_output_setup() method, or like in an example through record_configuration.xml file.

Thank you for your answer.
I mean I know how to read it from the robot but I receive dec value ex.256 which doesn’t seem to match the data I have configured on digital outputs.

Value combines all output ports - standard, configurable, and tool. 256 means that configurable output 0 is high (bit 8 is high), and all other outputs are low. Is this more what you would expect?

1 Like

Thats it! Im looking for a way how you “decode” it. I tried to change this dec to binary but it doesnt realy work for me.

You can use boolean operators in python, like:
if(reg & 1 << 8):
print("CO0 HIGH")
else:
print("CO0 LOW")

1 Like