omron — WAIT program instruction

WAIT program instruction WAIT program instruction Syntax WAIT condition Function Put the program into a wait loop for one trajectory cycle. If a condition is specified, wait until the condition is TRUE. Usage Considerations l A WAIT with no condition specified is useful in programs that need to perform an operation only once each trajectory cycle. For more information, see Details and Example 1. l To wait for a specific time period, use the WAIT.EVENT program instruction rather than the WAIT program instruction. l During execution, use the PROCEED monitor command to cancel a WAIT instruction in an application program.

Parameter condition Optional real value, variable, or expression that is tested for a TRUE (nonzero) or FALSE (zero) value. Details If no condition is supplied with the WAIT instruction, program execution is suspended until the next trajectory cycle. Trajectory cycles occur at 16, 8, 4 or 2 millisecond intervals, depending on the system configuration. If you need to guarantee at least a trajectory cycle delay (for example, while manipulating signals monitored by REACT or REACTI), you should execute two consecutive WAIT instructions (with no arguments). If a condition is specified, WAIT will suspend program execution until the condition exists.

For example, the state of one or more external signals can be used as the condition for continuation. Example Stop program execution while external input signal #1001 is on and #1003 is off. Poll once eacheV+ trajectory cycle: WHILE SIG(1000, -1003) DO eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 560