Exit For 36 Exit Sub - Omron SCARA YRCX Series Programming Manual

Robot controller
Hide thumbs Also See for SCARA YRCX Series:
Table of Contents

Advertisement

35
EXIT FOR
Terminates the FOR to NEXT statement loop
Format
EXIT FOR
Explanation
• The FOR to NEXT statement loop will end when the FOR statement condition is satisfied or
MEMO
SAMPLE
*ST:
WAIT DI(20)=1
FOR
NEXT A%
GOTO
HALT
Related commands
Terminates the FOR to NEXT statement loop, then jumps to the command which
follows the NEXT statement.
This statement is valid only between the FOR to NEXT statements.
when the EXIT FOR statement is executed. A "5.212: Stack overflow" error, etc., will occur if
another statement such as GOTO is used to jump out of the loop.
A%=101 TO 109
MOVE
P,P100,Z=0
DO(20)=1
MOVE P,P[A%],Z=0
DO(20)=0
IF DI(20)=0 THEN EXIT FOR
*ST
FOR, NEXT
EXIT FOR
8-61
8
A
B
C
D
E
F
G
H
I
J
K
L
M

Advertisement

Table of Contents
loading

Table of Contents