7 BASIC INSTRUCTIONS
7.2 Arithmetic Operation Instructions
237
7
Processing details
• These instructions add (n) point(s) of 16-bit binary data from the device specified by (s1) and the (n) point(s) of 16-bit binary
data from the device specified by (s2), and store the results of addition in the device specified by (d).
• Block addition is performed in units of 16-bits.
Ex.
If device is specified for (s2) (signed)
If constant is specified for (s2) (signed)
• If an underflow or overflow occurs for operation result, the result will be as follows. In this case, the carry flag (SM700) does
not turn ON.
Operation error
If signed is specified
If unsigned is specified
Error code
(SD0/SD8067)
Description
2820H
The range of (n) point(s) of data starting from the device specified by (s1), (s2), or (d) exceed the corresponding device range.
2821H
The device range for (n) point(s) beginning from (s1) overlaps with that of (n) point(s) starting from (d).
(Does not apply when same device has been specified for (s1) and (d).)
The device range for (n) point(s) beginning from (s2) overlaps with that of (n) point(s) starting from (d).
(Does not apply when same device has been specified for (s2) and (d).)
∙∙∙
+
1234
(BIN)
4567
(BIN)
-2000
(BIN)
-1234
(BIN)
4000
(BIN)
(n)
(n)
(n)
4000
(BIN)
1234
(BIN)
-1234
(BIN)
5000
(BIN)
4321
(BIN)
5234
(BIN)
5801
(BIN)
-3234
(BIN)
3766
(BIN)
8321
(BIN)
(s1)
(s1)+1
(s1)+(n-2)
(s1)+(n-1)
(s1)+2
∙∙∙
(s2)
(s2)+1
(s2)+(n-2)
(s2)+(n-1)
(s2)+2
∙∙∙
(d)
(d)+1
(d)+(n-2)
(d)+(n-1)
(d)+2
∙∙∙
b15
b0
∙∙∙
b15
b0
b15
b0
∙∙∙
∙∙∙
1234
(BIN)
4567
(BIN)
-2000
(BIN)
-1234
(BIN)
4000
(BIN)
(n)
(n)
5555
(BIN)
8888
(BIN)
2321
(BIN)
3087
(BIN)
8321
(BIN)
(s1)
(s1)+1
(s1)+(n-2)
(s1)+(n-1)
(s1)+2
∙∙∙
(d)
(d)+1
(d)+(n-2)
(d)+(n-1)
(d)+2
∙∙∙
b15
b0
∙∙∙
b15
b0
b15
b0
∙∙∙
4321
(BIN)
(s2)
+
K32767
(7FFFH)
K2
(0002H)
K-32767
(8001H)
K-32767
(8001H)
K-2
(FFFEH)
+
+
K32767
(7FFFH)
K65535
(FFFFH)
K1
(0001H)
K0
(0000H)
+
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......