Table of Contents

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

InputTypeDescription
IN0 ANY Input value
IN1 ANY Input value
G BOOLInput value selector

Outputs

OutputTypeDescription
ANY Output value

Application example