SQRT block
Short summary
Name |
SQRT |
→POU type |
|
Category |
|
Conform to →IEC-standard |
no restrictions |
Graphical interface |
|
Available since |
|
Functionality
The mathematical function for the square root is called: The block returns the square root of the value connected to the inpu t .
Inputs, return value
|
Identifier |
Description |
|
Inputs: |
IN |
REAL, LREAL |
input |
Return value: |
– |
REAL, LREAL |
|
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 the value connected to the inpu
t
before it is executed.
If the value is < 0.0, the output ENO of the block is set to value FALSE (or an equivalent).
Example for usage within ST-editor
PROGRAM Test
VAR
result : REAL;
END_VAR
result := SQRT(IN :=
4.4
); (* The variable
'result'
evaluates to
'2.097618'
. *)
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.