K_SQRT: Square root
Original instructions
Function description
This function calculates the weighted square root of a numerical value. A division can be defined under which the function issues the value zero.
Taking the square root typically serves to linearize a flow measurement using a throttle device.
EN and ENO can be configured as additional parameters.
Formula
The function performs the following calculation:
Calculation
Condition
or
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
LD DigitalVariable
K_SQRT WeightingCoefficient, Cutoff
ST OUT
Representation in ST
Representation:
Result := K_SQRT (DigitalVariable, WeightingCoefficient,
                  Cutoff);
Parameter description
Description of input parameters:
Parameter
Data type
Description
DigitalVariable
Numerical value to process
WeightingCoefficient
REAL
Weighting coefficient
Cutoff
REAL
Division
Description of output parameters:
Parameter
Data type
Description
Result
REAL
Result of the calculation
Runtime error
An error is displayed if a non floating point value is recorded at input or if there is a problem with floating point calculation. In this case the output Result remains unchanged.
NOTE: For a list of all block error codes and values, see Mathematics.
Warning
A warning is given if the Cutoff input is negative. The function block then uses the value 0 for calculation.