Standard function blocks
334
Operation The output (O) is the product of input IN and input MUL divided by input DIV.
Output = (I × MUL) / DIV
O = whole value. REM = remainder value.
Example: I = 2, MUL = 16 and DIV = 10:
(2 × 16) / 10 = 3.2, i.e. O = 3 and REM = 2
The output value is limited to the maximum and minimum values defined by the data
type range.
Inputs Input (I): DINT
Multiplier input (MUL): DINT
Divider input (DIV): DINT
Outputs Output (O): DINT
Remainder output (REM): DINT
SQRT
(10008)
Illustration
Execution time 2.09 µs
Operation Output (OUT) is the square root of the input (IN).
OUT = sqrt(IN)
Output is 0 if the input value is negative.
Inputs The input data type is selected by the user.
Input (IN): REAL, REAL24
Outputs Output (OUT): REAL, REAL24
SUB
-
(10009)
Illustration
Execution time 2.33 µs
Operation Output (OUT) is the difference between the input signals (IN):
OUT = IN1 - IN2
The output value is limited to the maximum and minimum values defined by the selected
data type range.
Inputs The input data type is selected by the user.
Input (IN1, IN2): INT, DINT, REAL, REAL24
Outputs Output (OUT): INT, DINT, REAL, REAL24
SQRT
(REAL) 54
TLA1 1 msec (1)
IN
OUT
OUT(54)
SUB
(DINT) 55
TLA1 1 msec (1)
IN1
IN2
OUT
OUT(55)