omron — STOP program instruction

STOP program instruction STOP program instruction Syntax STOP Function Terminate execution of the current program cycle. Usage Considerations STOP does not halt program execution if there are more program cycles to execute. The PROCEED command cannot be used to resume program execution after a STOP instruction causes the program to halt. If program execution is halted by a STOP instruction, FCLOSE and/or DETACH are forced on all attached I/O devices. Details Counts one more program cycle as complete and one less remaining. If the result is that no more cycles are remaining, program execution halts.

If more cycles are remaining, the internal robot motion parameters are reinitialized, and program execution continues with the first step of the main program (even if the STOP occurred within a subroutine or reaction program). Terminates execution of the current program unless more program loops (see the EXECUTE command and instruction) are to be completed, in which case execution of the program continues at its first step. Thus, the STOP instruction is used to mark the end of a program execution pass. Note that the HALT instruction has a different effect-it cancels all remaining cycles. A RETURN instruction in a main program has the same effect as a STOP instruction.

A main program is one that is invoked by an EXECUTE command or instruction, or a PRIME or XSTEP command, whereas a subroutine is a program that is invoked by a CALL, CALLP, or CALLS instruction (or a reaction) within another program. Related Keywords ABORT monitor command ABORT program instruction EXECUTE program instruction HALT program instruction PAUSE program instruction eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 509