6 - 21
6 DriveProgramming Commands
DriveProgramming User’s Manual (I622-E1)
6-4 Program Control Commands
6
A program example in which the wait time is set with <value>: the program
waits at the “wait” command for the period of time set in <value>.
Wait
Command Description Argument
Makes the program wait for specified seconds
or until a condition is met.
Value: any variable or constant (specified time
× 10 ms)
Wait time value (0 to 32767 × 10 ms)
Condition
: a comparison between two variables
or constants with the format <left hand value>
<comparison operator> <right hand value>.
• Left hand value: any variable or constant
(range 0 to 127)
• Comparison operator: =, <, >, <=, >=, or <>
• Right hand value: any variable or constant
(range 0 to 127)
Format
Flowchart method Text language method
↓
wait <value> or <condition>
Note 1. With the “wait” command, the program does not go to next command and waits until the set wait time
elapses or set condition is met. Therefore, the task processing is not executed during the wait time of
the “wait” command. If there is any processing which requires periodic monitoring, separate it and
assign it to another task so that it is executed periodically without using the “wait” command.
2. Do not set a negative value for the constant used in the “wait” command.
Otherwise, the program cannot check if the wait time elapsed or the condition is met, and it continu-
ously stops at the “wait” command without performing any operation.
3. The “wait” command is not an accurate way to measure time. To measure time accurately, use the
internal timer or the clock function of the LCD Operator.
Flowchart Text
Block number
Operation
1 Waits for 1.00 second with the “wait” command.
2 to 3 Adds 1 to U(00) and unconditionally jumps to 1: loop_ to wait one more second.
wait <value> or <condition>