Documentation

SEL

Function name

SEL

ST call

PROGRAM SEL_DEMO
VAR
REAL1: REAL;
BOOL1:BOOL;
END_VAR
REAL3:= SEL(G:=BOOL1, IN0:=1, IN1:=3);
END_PROGRAM

Description

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.

Inputs

Input Type Description
IN0 ANY Input value
IN1 ANY Input value
G BOOL Input value selector

Outputs

Output Type Description
=> ANY Output value

Application example