Logic program examples
This guide provides examples of logic programs for a few different use cases.
For more information about logic programs, please refer to the Software Manual and the URScript manual.
All sample programs can be tested on the real robot or in the simulator.
Light tower
light_tower_10_14.urpx example shows how to read the robot state and present the status on a light tower attached to digital outputs. Different robot states are also updated in application variables in the Variables side panel.
NOTE: The program was tested on Polyscope 10.14.0.
Stopping remote device after robot protective stop
modbus_welder_int_10.14.urpx example shows how to stop a remote device connected to the robot over the Modbus TCP interface. The main program executes a short welding path and, after a few cycles, simulates a protective stop. The logic program running in the background detects when the main program stops in the middle of the welding path and sets the Modbus signal controlling the arc to False.
NOTE: The program was tested on Polyscope 10.14.0.

Monitoring General Purpose registers
background_gp_reg_10_14 example shows how to monitor input general-purpose registers. The logic program running in the background reads input general-purpose registers into variables. Variables are visible in the Variables side panel. An external RTDE client updates the input general-purpose registers.
NOTE: The program was tested on Polyscope 10.14.0.
