Mitsubishi Electric MELSEC-Q/L Programming Manual page 129

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Double word (signed) type data
No operation error occurs even if an underflow/overflow occurs.
In case of ADD_E, TRUE is output from ENO.
2147483647 + 2 = -2147483647
(7FFFFFFFH) (0002H) (80000001H)
-2147483648 + (-2) = 2147483646
(80000000H) (FFFEH) (7FFFFFFEH)
• Rounding error may occur when specifying single-precision real or double-precision real type data to (s1) through (s28) by
programming tool.
For precautions when setting an input value using a programming tool, refer to the following.
 MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
■Operation result
• Function without EN/ENO
An operation is executed and the operation value is output from (d).
• Function with EN/ENO
The following table shows the executing conditions and operation results.
EN
TRUE (Operation execution)
FALSE (Operation stop)
*1 When FALSE is output from ENO, the data output from (d) is undefined. In this case, create a program so that the data output from (d) is
not used.
Operation error
• No operation error occurs.
Program example
■ADD_E
The program which performs addition ((s1) + (s2)) on double word (signed) type data input to (s1) and (s2), and outputs the
operation result from (d) in the same data type as that of (s1) and (s2).
[Structured ladder/FBD]
[ST]
g_bool3 := ADD_E(g_bool1, g_dint1, g_dint2, g_dint3);
Since the highest-order bit is 1, the result value is negative.
Since the highest-order bit is 0, the result value is positive.
ENO
TRUE
*1
FALSE
(d)
Operation output value
Undefined value
5 APPLICATION FUNCTIONS
5.3 Standard Arithmetic Functions
5
127

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents