26.  WAIT INSTRUCTIONS

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:

Note

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.

WAIT time

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 " .

Figure 118.  Wait Time

Wait Time
Wait Time

WAIT [item] [operator] [value] [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:

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.

Figure 119.  WAIT Condition for DI/DO, RI/RO, SI/SO, and UI/UO

WAIT Condition for DI/DO, RI/RO, SI/SO, and UI/UO

Figure 120.  WAIT Condition for DI/DO, RI/RO, SI/SO, UI/UO, and WI/WO

WAIT Condition for DI/DO, RI/RO, SI/SO, UI/UO, and WI/WO
WAIT Condition for DI/DO, RI/RO, SI/SO, UI/UO, and WI/WO

Figure 121.  WAIT Condition for R, GI/GO, AI/AO, and Parameters

WAIT Condition for R, GI/GO, AI/AO, and Parameters
WAIT Condition for R, GI/GO, AI/AO, and Parameters

Figure 122.  WAIT Condition

WAIT Condition
WAIT Condition

Error Number

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.)

Operators

For WAIT instructions, logical instruction editing can contain multiple logical statements connected by AND or OR operators.

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)

WAIT Mixed Logic Instruction

Figure 123.  Mixed Logic WAIT Example

WAIT (DI[1] AND (!DI[2] OR DI[3]))
 

Refer to Section 14, " MIXED LOGIC INSTRUCTIONS " for more information on mixed logic instructions.

Output when WAITing on Input

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.