Get Digital Output State
SUMMARY
Get Digital Output State returns the boolean state of a specified digital output channel (True = HIGH, False = LOW).
SUPPORTED ROBOTS
This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.
The Skill
python
state = robot.get_digital_out_state(output_id=0)The Code
Example: Read and Log Digital Output State
Connect to the robot and read the state of digital output channel 0.
python
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
robot_ip = "192.168.1.2" # replace with your robot's IP
robot = universal_robots.UniversalRobotsUR10E()
# Connect
robot.connect(ip=robot_ip)
output_id = 0
state = robot.get_digital_out_state(output_id)
logger.success(f"Digital output {output_id} state: {state}")
# Disconnect
robot.disconnect()The Explanation of the Code
get_digital_out_state reads the current state of one digital output channel from the RTDE data stream. Returns True if the output is currently HIGH and False if LOW.
How to Tune the Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
output_id | int | — | Zero-indexed ID of the digital output channel to read. |
Return Value
| Field | Type | Description |
|---|---|---|
state | bool | True if the output is HIGH, False if LOW. |
Where to Use the Skill
- Verify that a commanded output (e.g., a valve or indicator light) is in the expected state.
- Audit digital I/O state before starting a task.
When Not to Use the Skill
Use a different skill when:
- You want to read external signal inputs — use Get Digital Input State instead.

