SEL_ULINT block

Short summary

Name

SEL_ULINT

→POU type

→function

Category

IEC-block, Select

Conform to →IEC-standard

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg no restrictions

Graphical interface

images/download/thumbnails/414782466/SEL_ULINT-version-1-modificationdate-1535100500092-api-v2.png

Available since

  • version 1.21.0 (for logi.CAD 3) – initial variant

  • version 2.0.4 (for library Standard) – changed location (from sub-library SelectEnh to Select)

Functionality

The block makes a binary selection – analogous to the SEL block. In contrast to that block, SEL_ULINT allows the connection with ULINT only (for IN0 and IN1).

Inputs, return value


Identifier

→Data type

Description

Inputs:

G

BOOL

selector

IN1

ULINT

1st value

IN2

ULINT

2nd value

Return value:

ULINT


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

See:

Example for usage within ST-editor

PROGRAM Test
VAR
result1 : ULINT;
result2 : ULINT;
END_VAR
result1 := SEL_ULINT(G := FALSE, IN0 := ULINT#1, IN1 := ULINT#2); (* The variable 'result1' evaluates to 'ULINT#1'. *)
result2 := SEL_ULINT(G := TRUE, IN0 := ULINT#1, IN1 := ULINT#2); (* The variable 'result2' evaluates to 'ULINT#2'. *)
END_PROGRAM

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.