5-124
5.3 Standard Arithmetic Functions
5.3.1 Addition
ADD(_E)
Operation Error
No operation error occurs in the execution of the ADD(_E) function.
Program Example
The program which performs addition ( + ) on double word (signed) type data input to and
, and outputs the operation result from in the same data type as that of .
(a) Function without EN/ENO (ADD)
[Structured ladder]
[ST]
g_dint3:= g_dint1+g_dint2;
(b) Function with EN/ENO (ADD_E)
[Structured ladder]
[ST]
g_bool3 := ADD_E(g_bool1, g_dint1, g_dint2, g_dint3);
s1
s2
s1
s2
d
s