For loop, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual
Page 59

L-force | PLC Designer
What is What in PLC Designer
DMS 3.2 EN 02/2011 TD29
57
A CASE instruction is processed according to the following model:
• If the variable in i> is executed. • If has none of the indicated values, then the executed. • If the same instruction is to be executed for several values of the variables, then one can write these values one after the other separated by commas, and thus condition the common execution. • If the same instruction is to be executed for a value range of a variable, one can write the initial value and the end value separated by two dots one after the other. Example: CASE INT1 OF FOR loop With the FOR loop one can program repeated processes. Syntax: INT_Var :INT; FOR size>} DO END_FOR; The part in braces {} is optional. The
So you can condition the common condition.
1, 5: BOOL1 := TRUE;
BOOL3 := FALSE;
2: BOOL2 := FALSE;
BOOL3 := TRUE;
10..20: BOOL1 := TRUE;
BOOL3:= TRUE;
ELSE
BOOL1 := NOT BOOL1;
BOOL2 := BOOL1 OR BOOL2;
END_CASE;
the