Secondary Programs
Secondary program is executed by the robot controller concurrently and simultaneously with the primary script program. It could be used to handle the I/O signals, while the primary program moves the robot between waypoints. A secondary program could be sent to controller via primary or secondary TCP/IP socket, just like any other script program and must follow the same script syntax as regular robot programs.
Notable exception is that secondary program should not use any “physical” time. In particular, it cannot contain sleep, or move statements. Secondary program must be simple enough to be executed in a single controller step, without blocking the realtime thread.
Exceptions on secondary program do not stop execution of the primary program. Exceptions are reported in robot controller log files.
The secondary function must be defined using the keyword "sec" as follows:
sec secondaryProgram():
set_digital_out(1,True)
end