The IEC operator is used for bitwise selection.
OUT := SEL(G, IN0, IN1) means:
OUT := IN0; if G = FALSE
OUT := IN1; if G = TRUE
Permitted data types
IN0, …, INn and OUT: any identical data type
Make sure that variables of the identical type are used at all three positions, especially when using user-defined data types. The compiler checks for type identity and returns any compile errors. The assignment of function block instances to interface variables is specifically not supported.
G: BOOL
|
Important |
|---|---|
|
When Caution: In the case of graphical programming languages, the expressions at |