Get Safety Status Bits
SUMMARY
Get Safety Status Bits returns the current safety system state as a packed integer bitmask. Each bit corresponds to a specific safety state. Use bitwise operations to check individual safety conditions.
This is the most granular way to inspect the safety system state programmatically, giving more detail than the higher-level Get Safety Mode skill.
SUPPORTED ROBOTS
This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.
The Skill
bits = robot.get_safety_status_bits()The Code
Example: Read and Decode the Safety Status Bitmask
Connect to the robot, read the safety status bits, and log them.
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)
bits = robot.get_safety_status_bits()
logger.info(f"Safety status bits: {bits:#013b}")
# Check for protective stop (bit 2)
protective_stop = bool(bits & (1 << 2))
logger.info(f"Protective stop active: {protective_stop}")
# Disconnect
robot.disconnect()The Explanation of the Code
get_safety_status_bits returns the safety system status as a bitmask. The following bit assignments apply:
| Bit | Safety Condition |
|---|---|
| 0 | Normal mode active |
| 1 | Reduced mode active |
| 2 | Protective stopped |
| 3 | Recovery mode active |
| 4 | Safeguard stopped |
| 5 | System emergency stop |
| 6 | Robot emergency stop |
| 7 | Emergency stop |
| 8 | Violation |
| 9 | Fault |
| 10 | Stopped due to safety |
Use bits & (1 << n) to test a specific condition.
How to Tune the Parameters
This skill takes no parameters.
Return Value
| Type | Description |
|---|---|
int | Safety system status bitmask. Bits 0–10 correspond to individual safety states. |
Where to Use the Skill
- Safety monitoring — Log full safety state in each control cycle for post-hoc diagnostics
- Condition-specific handling — Detect individual safety states and trigger appropriate recovery procedures
When Not to Use the Skill
Do not use Get Safety Status Bits when:
- A high-level summary is sufficient — use Get Safety Mode for a simpler integer safety mode code

