EXECUTE program instruction integer) that specifies the number of program execution cycles to be performed. If omitted, the cycle count is assumed to be 1. For unlimited cycles, specify any negative value. The maximum loop count value allowed is 32,767. step Optional real value, variable, or expression (interpreted as an integer) that specifies the step at which program execution is to begin. If omitted, program execution begins at the first executable statement in the program (that is, after the initial blank and comment lines and all the AUTO and LOCAL instructions). Details This command initiates execution of the specified control program.
The program is executed cycles times, starting at the specified program step. After a program initiates execution of another program, the initiating program can use the STATUS and ERROR real-valued functions to monitor the status of the other program. The optional /C qualifier has an effect only when starting execution of task 0. When /C is not specified, an EXECUTE instruction for task 0 fails if the robot cannot be attached; attachment requires that the robot be calibrated and that arm power be enabled (or that the DRY.RUN switch is enabled).
When /C is specified, an execute instruction for task 0 attempts to attach the robot, but allows execution of task 0 to continue without any indication of error if the robot cannot be attached. Certain default conditions are assumed whenever program execution is initiated. They are equivalent to the following program instructions: CPON ALWAYS DURATION 0 ALWAYS FINE 100 ALWAYS LOCK 0 MULTIPLE ALWAYS NULL ALWAYS OVERLAP ALWAYS SPEED 100,100 ALWAYS SELECT ROBOT = 1 Also, the robot configuration is saved for subsequent motions.
An execution cycle is terminated when a STOP instruction is executed, a RETURN instruction is executed in the top-level program, or the last defined step of the program is encountered. The value of cycles can range from -32,768 to 32,767. The program is executed one time if cycles is omitted or has the value 0 or 1. Any negative value for cycles causes the program to be executed continuously until a HALT instruction is executed, an error occurs, or you (or another program) aborts execution of the program. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 211