SEL
PROGRAM SEL_DEMO
VAR
REAL1: REAL;
BOOL1:BOOL;
END_VAR
REAL3:= SEL(G:=BOOL1, IN0:=1, IN1:=3);
END_PROGRAM
Switch between two input signals, controlled by the binary input G. If G=0 the output is IN0, if G=1 the output is IN1.
Input | Type | Description |
---|---|---|
IN0 | ANY | Input value |
IN1 | ANY | Input value |
G | BOOL | Input value selector |
Output | Type | Description |
---|---|---|
=> | ANY | Output value |