User`s guide
Program Interrupt Instructions
V+ provides several ways of suspending or terminating program execution. A program can be
put on hold until a specific condition becomes TRUE using the WAIT instruction. A program
can be put on hold for a specified time period or until an event is generated in another task by
the WAIT.EVENT instruction. A program can be interrupted based on a state transition of a
digital input signal with the REACT and REACTI instructions. Program errors can be
intercepted and handled with a REACTE instruction. Program execution can be terminated
with the HALT, STOP, and PAUSE commands. These instructions interrupt the program in
which they are contained. Any programs running as other tasks are not affected. Robot
motion can be controlled with the BRAKE, BREAK, and DELAY instructions. (The ABORT and
PROCEED monitor commands can also be used to suspend and proceed programs, see the V+
Operating System Reference Guide for details.)
WAIT
WAIT suspends program execution until a condition (or conditions) becomes true.
WAIT SIG(1032, -1028)
delays execution until digital input signal 1032 is on and 1028 is off.
WAIT TIMER(1) > 10
suspends execution until timer 1 returns a value greater than 10.
WAIT.EVENT
The instruction:
WAIT.EVENT , 3.7
suspends execution for 3.7 seconds. This wait is more efficient than waiting for a timer (as in
the previous example) because the task does not have to loop continually to check the timer
value.
The instruction:
WAIT.EVENT
suspends execution until another task issues a SET.EVENT instruction to the waiting task. If
the SET.EVENT does not occur, the task waits indefinitely. For more details on SET.EVENT,
see the V+ Language Reference Guide.
REACT and REACTI
When a REACT or REACTI instruction is encountered, the program begins monitoring a digital
input signal specified in the REACT instruction. This signal is monitored in the background
with program execution continuing normally until the specified signal transitions. When (and
Program Interrupt Instructions
V+Language User's Guide, v17.0
Page 122










