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 |
|
Category |
|
Conform to →IEC-standard |
no restrictions |
Graphical interface |
|
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 |
Description |
|
Inputs: |
IN |
REAL, LREAL |
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.
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.