Chapter 5. Function Block Diagram (FBD)
GFK-2950C February 2018 259
5.9.2 Add
Adds the operands IN1 and IN2 … IN8 and stores the sum in Q.
IN1 … IN8 and Q must be of the same data type.
The result is output to Q when ADD is performed without
Overflow, unless one of the following invalid conditions occurs:
▪ (+ ∞)
▪ IN1 and/or IN2 … IN8 is NaN (Not a Number).
If an ADD operation results in Overflow, the result wraps
around. For example:
▪ If an ADD_DINT, ADD_INT or ADD_REAL operation is
performed on 32767 + 1, Q will be set to -32768.
▪ If an ADD_UINT operation is performed on 65535 + 16, Q
will be set to 15.
Minimum number
of inputs = 2
Maximum number
of inputs = 8.
Operands of the ADD Function
Calculated by the FBD editor.
INT, DINT, REAL, LREAL, UINT
Must be same data type as Q.
All except S, SA, SB,
SC and data flow
The sum of IN1 … IN8. If an
Overflow occurs, Q wraps
around.
INT, DINT, REAL, LREAL, UINT
variable
Must be same data type as IN1 ….
IN8.
All except S, SA, SB,
SC, constant and
data flow