Standard function blocks
331
Arithmetic
ABS
(10001)
Illustration
Execution time 0.53 µs
Operation The output (OUT) is the absolute value of the input (IN).
OUT = | IN |
Inputs The input data type is selected by the user.
Input (IN): DINT, INT, REAL or REAL24
Outputs Output (OUT): DINT, INT, REAL or REAL24
ADD
(10000)
Illustration
Execution time 3.36 µs (when two inputs are used) + 0.52 µs (for every additional input). When all
inputs are used, the execution time is 18.87 µs.
Operation The output (OUT) is the sum of the inputs (IN1…IN32).
OUT = IN1 + IN2 + … + IN32
The output value is limited to the maximum and minimum values defined by the selected
data type range.
Inputs The input data type and the number of the inputs (2…32) are selected by the user.
Input (IN1…IN32): DINT, INT, REAL or REAL24
Outputs Output (OUT): DINT, INT, REAL or REAL24
DIV
(10002)
Illustration
Execution time 2.55 µs
ABS
(DINT) 46
TLA1 1 msec (1)
IN
OUT
OUT(46)
ADD
(DINT) 47
TLA1 1 msec (1)
IN1
IN2
OUT
OUT(47)
DIV
(DINT) 48
TLA1 1 msec (1)
IN1
IN2
OUT
OUT(48)