L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual
Page 1058
Advertising
L-force | PLC Designer
Programming Reference
1056
DMS 4.1 EN 03/2011 TD29
Example in IL:
LD TRUE
SEL 3,4 (* IN0 = 3, IN1 =4 *)
ST Var1 (* Result is 4 *)
LD FALSE
SEL 3,4
ST Var1 (* Result is 3 *)
Example in ST:
Var1:=SEL(TRUE,3,4); (* Result is 4 *)
Example in FBD:
Note: Note that an expression occurring ahead of IN1 or IN2 will not be processed if
IN0 is TRUE.
MAX
IEC Selection Operator: Maximum function. Returns the greater of the two values.
OUT := MAX(IN0, IN1)
IN0, IN1 and OUT can be any type of variable.
Example in IL: ( Result is 90 )
Example in ST:
Var1:=MAX(30,40); (* Result is 40 *)
Var1:=MAX(40,MAX(90,30)); (* Result is 90 *)
Advertising