作为IEC 61131-3 标准的扩展(
⇘
ExST
),CONTINUE指令在
⇘
FOR,
⇘
WHILE和
⇘
REPEAT循环中可以使用。CONTINUE是执行在下一周期继续执行。
CONTINUE指令执行下一个循环。
例子:
FOR Counter:=1 TO 5 BY 1 DO
INT1:=INT1/2;
IF INT1=0 THEN
CONTINUE; (* to avoid division by zero *)
END_IF
Var1:=Var1/INT1; (* only executed, if INT1 is not "0" *)
END_FOR;
Erg:=Var1;