Function - Select one of the inputs - 2 inputs.
SELECT : BOOL
Selection command
IN1 :
ANY First input
IN2 :
ANY Second
input
Q : ANY IN1 if SELECT is FALSE; IN2 if SELECT is TRUE
SELECT |
Q |
0 |
IN1 |
1 |
IN2 |
In LD language, the selector command is the input rung. The output rung keeps the same state as the input rung. In IL language, the first parameter (selector) must be loaded in the current result before calling the function. Other inputs are operands of the function, separated by comas.
Q := SEL (SELECT, IN1, IN2);
(* the input rung is the selector *)
(* ENO has the same value as SELECT *)
Op1: LD SELECT
SEL IN1, IN2
ST Q