# I/O and TCP ## set_IO() ```python robot.set_IO(0, True) robot.set_IO(0, False) ``` The numeric IDs map as follows. | id | Target | |---:|---| | 0..7 | Standard Digital Output | | 8..15 | Configurable Digital Output | | 16..17 | Tool Digital Output | ## get_IO() ```python robot.get_IO(0) ``` Return the digital output state. ## get_digital_input() ```python robot.get_digital_input(0) ``` Return the digital input state. ## set_tcp() ```python robot.set_tcp([0, 0, 100, 0, 0, 0]) ``` Set the TCP offset in mm and degrees (rotation vector). ## set_tool() / set_tool_define() ```python robot.set_tool(0, [0, 0, 100, 0, 0, 0]) robot.set_tool_define(0, [0, 0, 100, 0, 0, 0]) ``` The UR implementation does not use tool numbers; these calls delegate to `set_tcp()`. ## get_current_tool() ```python robot.get_current_tool() ``` Return the current TCP offset. ## safety limit ```python robot.is_pose_within_safety_limits(pose) robot.is_joints_within_safety_limits(joints) ``` Use these checks before executing a move.