SELPLCopen motion icon

FunctionClosedA function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Select one of the inputs - 2 inputs.

Inputs

SELECT : BOOL Selection command
IN1    : ANY  First input
IN2    : ANY  Second input

Outputs

Q : ANY       IN1 if SELECT is FALSE; IN2 if SELECT is TRUE

Truth table

SELECT Q

0

IN1

1

IN2

Remarks

In FFLD language, the selector command is the input rung. The output rung keeps the same state as the input rung. In ILClosed"Instruction list" This is a low-level language and resembles assembly 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.

ST Language

Q := SEL (SELECT, IN1, IN2);

FBD Language

SelFbd.gif (1388 octets)

FFLD Language

(* the input rung is the selector *)
(* ENO has the same value as SELECT *)
SelLd.gif (1535 octets)

IL Language

Op1: LDClosed"Ladder diagram" Ladder logic is a method of drawing electrical logic schematics. It is now a very popular graphical language for programming Programmable Logic Controllers (PLCs). It was originally invented to describe logic made from relays. The name is based on the observation that programs in this language resemble ladders, with two vertical "rails" and a series of horizontal "rungs" between them  SELECT
     SEL IN1, IN2
     ST  Q

See also

MUX4   MUX8