Continue instruction, Exit instruction, Jmp instruction – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 768: L-force | plc designer

Advertising
background image

L-force | PLC Designer

General Editors

766

DMS 4.1 EN 03/2011 TD29

CONTINUE instruction
As an extension to the IEC 61131-3 standard (ExST) the CONTINUE instruction is
supported within FOR, WHILE and REPEAT-loops.
CONTINUE makes the execution proceed with the next loop-cycle.
Example:

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;

EXIT instruction
If the EXIT instruction appears in a FOR, WHILE, or REPEAT loop, then the innermost
loop is ended, regardless of the break-off condition.

JMP instruction
The JMP instruction can be used for an unconditional jump to a code line marked by a
jump label.
Syntax:
<label>:

Advertising