# Virtual Variables P/I/F/IO ## Basics `P1`, `I1`, and `F1` are variable names in the common interface. They are not internal UR Controller variables. In the UR implementation, `RobotVarManager` saves them to JSON. ```text P1 ↓ RobotVarManager ↓ JSON ``` ## Attribute access ```python robot.P1 = [300, 0, 200, 0, 180, 0] print(robot.P1) robot.I1 = 10 robot.F1 = 1.5 ``` ## get_var() / set_var() ```python robot.get_var("P1") robot.set_var("P1", [300, 0, 200, 0, 180, 0]) robot.get_var("P", 1) robot.set_var("P", 1, [300, 0, 200, 0, 180, 0]) ``` ## P variables ```python robot.set_P(1, [300, 0, 200, 0, 180, 0]) pose = robot.get_P(1) ``` P is a six-element pose in mm / degree rotation-vector representation. ## teach() ```python robot.teach("P1") robot.teach("J1") ``` `teach("P1")` saves the current TCP pose as P1. `teach("J1")` saves the current joint angles as J1. This is teaching at the higher-level common interface; it does not write a P1 register in the UR Controller. ## I / F ```python robot.set_I(1, 100) robot.get_I(1) robot.set_F(1, 1.25) robot.get_F(1) ``` ## IO `IO` is not a virtual variable; accesses are forwarded to physical IO. ```python robot.IO0 = True print(robot.IO0) ``` Internally, `set_IO()` / `get_IO()` are called. ## is_empty_position() ```python robot.is_empty_position("P1") ``` Returns True if the P variable has not been registered.