SEL_2D_ARRAY block

Short summary

Name

SEL_2D_ARRAY

→POU type

→function

Category

IEC-block, SelectEnh, block with internal error diagnostic

Conform to →IEC-standard

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/add.svg not defined in IEC-standard

Graphical interface

images/download/thumbnails/470909013/SEL_2D_ARRAY-version-1-modificationdate-1626354883988-api-v2.png

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg Detail on the displayed interface: Due to the setting hideOutputOfVarInOut, only the input connection point of the in-out variables IN und IN1 are displayed. Subsequently, the straight lines between the input connection point and the output connection point are also not displayed . Hence, the interface is displayed as similar to the SEL block as possible (and to the other provided SEL blocks respectively).

Available since

version 3.2.4 (for library Standard ) – initial variant

Functionality

As the SEL block: The block makes a binary selection. In contrast to that block, SEL_2D_ARRAY allows the connection with 2 dimensional arrays .

Inputs, return value


Identifier

→Data type

Description

Inputs:

G

BOOL

selector

In-outs
(VAR_IN_OUT):

IN0

ARRAY [*,*] OF REAL, LREAL, USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT
(corresponds to →generic data type ANY_NUM)

1st value

IN1

ARRAY [*,*] OF REAL, LREAL, USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT
(corresponds to →generic data type ANY_NUM)

2nd value

Return value:

ARRAY [*,*] OF REAL, LREAL, USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT
(corresponds to →generic data type ANY_NUM)


Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

Internal error diagnostic for block

The block checks whether the size of the arrays for IN0, IN1 and for the return value amounts to the same rows and the columns. If this is not the case, the output ENO of the block is set to value FALSE (or an equivalent).

Example for usage within ST-editor

See "SEL block " for a basic example of the functionality.

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.