Wait instructions delay program execution for a specified time or until a specified condition is true. When a wait instruction is executed, the robot does not execute any motion instructions. There are two kinds of wait instructions:
WAIT time - delays program execution for a specified time.
WAIT condition - delay program execution until specified conditions are true.
Using WAIT instructions in line- or rail-tracking paths is NOT recommended. If an E-STOP occurs during the execution of a WAIT instruction, the robot might not continue to track the part until the next position comes into bounds.
The WAIT time instruction delays program execution for a specified time. The time in a WAIT time instruction is specified in seconds, with a minimum unit of 0.01 seconds. See Figure 118, " Wait Time " .
WAIT condition instructions delay program execution until specified conditions are true or until an amount of time elapses (a timeout occurs). The timeout can be specified as one of the following:
Forever - the program will wait until the condition is true.
Time out, LBL[i] - the program will wait for the time specified in Timeout. If the condition is still not true, the program will branch to the specified label.
Specify the timeout by setting the system variable $WAITTMOUT to a time, in 100ths of a second. The default timeout value is 3000 hundredths of a second. You can set $WAITTMOUT using the parameter name instruction. Refer to Section 13.10, " Parameter Name Instruction " for information on the parameter name instruction.
See Figure 119, " WAIT Condition for DI/DO, RI/RO, SI/SO, and UI/UO " to Figure 122, " WAIT Condition " for examples.
Where:
ERR_NUM =aaabbb
aaa : Error facility code (decimal); bbb : Error number (decimal)
Refer to the “Error Codes and Recovery” appendix in the Setup and Operations Manual.
If 0 is specified as the error number "aaabbb" when an error occurs, the condition is satisfied.
For example, the instruction
WAIT ERR_NUM=11006, CALL PROG_A
Will cause the program PROG_A to be called when a "SRVO-0 06 HAND BROKEN" error occurs. (SRVO errors are facility code 11.)
For WAIT instructions, logical instruction editing can contain multiple logical statements connected by AND or OR operators.
AND operator
WAIT [cond1] AND [cond2] AND ...
For example,1: WAIT DI[1]=ON AND DI[2]=ON, TIMEOUT,LBL[1]
OR instruction
WAIT [cond1] OR [cond2] OR ...
For example,1: WAIT DI[10]=ON OR R[7]=R[8], TIMEOUT,LBL[2]
You cannot mix the AND and OR operators in the same operation.
If an instruction contains multiple ORs or ANDs, and you change one of them, the others will also change. In this case, the following message is displayed:
TPIF-062 AND operator was replaced to OR
TPIF-063 OR operator was replaced to AND
The maximum number of logical conditions that you can teach in the same operation is 5. For example
WAIT [cond1] OR [cond2] OR [cond3] OR [cond4]OR [cond5] (Maximum of five logical conditions)
Mixed Logic expressions can be specified in the condition of a WAIT statement
The result of the expression must be boolean.
The WAIT statement waits until the result of the expression becomes ON.
“On+”,“Off-” and “ERR_NUM” cannot be specified in mixed logic instructions. You must use normal logic instructions to specify them.
The maximum number of items (data or operators) in a WAIT statement is approximately 20. The exact maximum number of items varies according to the data type.
Refer to Section 14, " MIXED LOGIC INSTRUCTIONS " for more information on mixed logic instructions.
The Output when WAITING on Input feature allows you to turn on a digital output that indicates that a WAIT instruction in a teach pendant program has been waiting on a specified digital input for longer than a specified time. This item is set on the SYSTEM Configuration menu. Refer to “SYSTEM Configuration Setup,” in your application-specific Setup and Operations Manual for more information.