L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 1060

Advertising
background image

L-force | PLC Designer

Programming Reference

1058

DMS 4.1 EN 03/2011 TD29

Example in IL: ( Result is 80 )

Example in ST:

Var1:=LIMIT(30,90,80); (* Result is 80 *);

MUX
IEC Selection Operator: Operator: Multiplexer

OUT := MUX(K, IN0,...,INn) means:
OUT := INK.

IN0, ...,INn and OUT can be any type of variable. K must be BYTE, WORD, DWORD,
LWORD, SINT, USINT, INT, UINT, DINT, LINT, ULINT or UDINT. MUX selects the Kth value
from among a group of values.
Example in IL: ( Result is 30 )

Example in ST:

Var1:=MUX(0,30,40,50,60,70,80); (* Result is 30 *);

Note: Note that an expression occurring ahead of an input other than INK will not
be processed to save run time ! Only in simulation mode all expressions will be
executed.

Advertising