Panasonic FP Series Programming Manual page 259

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Selection instructions
SEL
With the first input variable (data type BOOL) of SEL you define which input variable is to be written
Description
into the output variable. If the Boolean value = 0 (FALSE), the input variable IN0 will be written into
the output variable, otherwise IN1.
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
Availability of SEL (see page 1330)
PLC types
 When using the data type STRING with small PLCs like FP-e or FP0,
make sure that the length of the result string is equal to or greater than
the length of the source string.
 For further information refer to the online help: Upgrade Problems with
Data Type STRING
 The difference between the functions SEL and MUX (see page 255) is
that in case of SEL a Boolean value serves for the channel selection,
and in case of MUX an integral number (INT). Therefore, you can
choose between more than two channels with MUX.
Data types
Data type
BOOL
all data types
all data types
all data types
In this example, the same POU header is used for all programming languages. For an example
Example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables which are required for programming the function are declared in the
POU header.
In this example the input variables (channel_select, channel_0 and channel_1) have been
declared. Instead, you may enter a constant directly at the input contact of a function.
Body
If channel_select has the value 0, channel_0 will be written into output, otherwise channel_1.
258
Select value from one of two channels
I/O
Function
G
selects between input value IN0 or IN1
IN0
value is written into the output variable if G = FALSE
IN1
value is written into the output variable if G = TRUE
output
result value as IN0 or IN1

Advertisement

Table of Contents
loading

Table of Contents