SELT_2R: Table value selection for 2 real values

Block SELT_2R (FB882) switches 2 of 8 Real inputs to 2 outputs based on an input value (selector).

Principle of operation

A table is parameterized in the block containing rows [ValRow1..24] with 2 inputs to be switched [ValOut1..8], [ValOut1..8] each.

At runtime, input value [Row] determines row [ValRow1..24] whose parameterized inputs _ValOut1, _ValOut2 are switched to outputs [Out1], [Out2].

 

IF

THEN

[Out1]=

[Out2]=

[Row]=1

[ValRow1]
_ValOut1

[ValRow1]
_ValOut2

[Row]=2

[ValRow2]
_ValOut1

[ValRow2]
_ValOut2

[Row]=3

[ValRow3]
_ValOut1

[ValRow3]
_ValOut2

...

 

 

 

Another table [RowCnd] allows for assigning input values [Row] to a particular row [_Row..].

 

IF

AND
[RowCnd]

THEN

Name

Value

[Out1]=

[Out2]=

[Row]=1

[RowCnd]
_Row1


1

[ValRow1]
_ValOut1

[ValRow1]
_ValOut2

[Row]=7

[RowCnd]
_Row2


7

[ValRow2]
_ValOut1

[ValRow2]
_ValOut2

[Row]=2

[RowCnd]
_Row3


2

[ValRow3]
_ValOut1

[ValRow3]
_ValOut2

...

 

 

 

 

If input value [Row] does not contain a valid row value, or if no valid assignment to a row is possible, exception values [EcptValOut1], [EcptValValOut2] are output and [Ecpt]=1 is set.

Inputs

Pin

E

Description

Row

pa

Row (selector value)

RowCnd
_Row1
...
_Row24

pa

Row condition

Assignment table input value -> Row

Specific input values [Row] are assigned to a specific row [_Row..].

ValRow1..24
_ValOut1
_ValOut2

pa

Value row 1

Two parameterized inputs [Val..] for row 1

Inputs [Val1..8] assign the two inputs to be switched [_ValOut1], [_ValOut2] to one row [ValRow1..24].

Val1..8

pa

Value 1

Input 1..8 to be interconnected

EcptValOut1..2

pa

Exception output value 1

Exception value 1..2 to be interconnected

Outputs

Pin

E

Description

Out1..2

 

Output 1..2

Ecpt

 

Exception

DataBlkItf

 

Data block interface

Input values

Pin

Description

Data type

Standard value

E.g. engineering unit or text group

Min.

Max.

Row

Row

Multistate

Off

Off...Stage15, Max

1

32767.

RowCnd
_Row1..24

Row condition


Multistate


1


Off...Stage15


1


16

ValRow1
- ValOut1..2

Value row 1


Multistate


1


Off...Stage15


1


16

Val1..8

Value 1

Real

0.0

 

-3.4E38

3.4E38

EcptValOut1..2

Exception output value 1

Real

0.0

 

-3.4E38

3.4E38

Output values

Pin

Description

Data type

Standard value

E.g. engineering unit or text group

Min.

Max.

Out1..2

Output 1

Real

0.0

 

-3.4E38

3.4E38

Ecpt

Exception

Boolean

Inactive

Inactive, Active

 

 

DataBlkItf
_DatablockNr
_LblInt
_StartAdr

Data block interface

 

 

 

 

 

Process response

Standard (see General rules and information).

Troubleshooting

Standard (see General rules and information).