IS_VALID block

This block is currently not supported for usage in safety-relevant applications. When it will be supported sometimes in the future, then the label "safety_unsupported_reallreal" has to be re-inserted again for this page, so that the block appears in the correct section in the chapter "Unsupported system blocks"

Short summary

Name

IS_VALID

→POU type

→function

Category

IEC-block, Numeric

Conform to →IEC-standard

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

Graphical interface

images/download/thumbnails/414781993/IS_VALID-version-1-modificationdate-1535032007087-api-v2.png

Available since

version 1.35.0 (for logi.CAD 3)

Functionality

The block checks the validity of the value entered at input IN.

In case of valid ANY_REAL values, the block returns the value TRUE (or an equivalent). In the case that the value is "Not-a-Number" (NaN) or infinite ("+Inf", "-Inf"), the block returns the value FALSE (or an equivalent).

Inputs, return value


Identifier

→Data type

Description

Inputs:

IN

REAL, LREAL
(corresponds to →generic data type ANY_REAL)

input value

Return value:

BOOL


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, result2 : BOOL;
END_VAR
result1 := IS_VALID(IN := REAL#1234.567e8); (* The variable 'result1' evaluates to 'TRUE'. *)
result2 := IS_VALID(IN := LREAL#1234.56789e-123); (* The variable 'result2' evaluates to 'TRUE'. *)
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.