SQRT
Function Name |
SQRT |
---|---|
Description |
Outputs the square root value of the input value. Both the input and output values are REAL or LREAL values. |
Arguments |
Input 1 {REAL or LREAL}. For more information on the data types for the inputs and outputs, see Data Type Hierarchy. |
Returns |
Output {REAL or LREAL} |
Example:
Function Block Diagram - SQRT:
In this example, the input of 5 is provided by the CurrentValueFormatted property of a point. The SQRT function outputs the square root of 5 which is 2.23606797749979.
ST Program - SQRT:
The syntax for an SQRT function in an ST Program is:
- Output := SQRT (Input 1);
Where Output and Input 1 are defined as variables earlier in the ST program. The Input 1 variable represents a REAL or LREAL type of value (the output is the same type of value as Input 1).