Mitsubishi MELSEC iQ-F FX5 series Programming Manual page 207

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Processing details
• These instructions subtract (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 subtraction results in the device specified by (d).
• Block subtraction is performed in 16-bit units.
Ex.
If device has been specified for (s2)
b15
···
b0
(s1)
8765
(BIN)
(s1)+1
8888
(BIN)
(s1)+2
9325
(BIN)
(n)
(s1)+(n-2)
5000
(BIN)
(s1)+(n-1)
4352
(BIN)
If constant is specified for (s2)
b15
···
b0
(s1)
8765
(BIN)
(s1)+1
8888
(BIN)
(s1)+2
9325
(BIN)
(n)
(s1)+(n-2)
5000
(BIN)
(s1)+(n-1)
4352
(BIN)
• 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.
If signed is specified
K-32767
K2
-
(8001H)
(0002H)
K32767
K-2
-
(7FFFH)
(FFFEH)
Operation error
Error code
Description
(SD0/SD8067)
2820
The range of (n) point(s) of data starting from the device specified by (s1), (s2), or (d) exceed the corresponding device range.
2821
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).)
b15
···
b0
(s2)
1234
(BIN)
(s2)+1
5678
(BIN)
(s2)+2
9876
(BIN)
(n)
-
(s2)+(n-2)
4321
(BIN)
(s2)+(n-1)
4000
(BIN)
b15
···
b0
(s2)
8880
(BIN)
-
If unsigned is specified
K32766
K0
-
(7FFEH)
(0000H)
K-32767
(8001H)
b15
···
b0
(d)
7531
(BIN)
(d)+1
3210
(BIN)
(d)+2
-551
(BIN)
(d)+(n-2)
679
(BIN)
(d)+(n-1)
352
(BIN)
b15
···
b0
(d)
-115
(BIN)
(d)+1
8
(BIN)
(d)+2
445
(BIN)
(d)+(n-2)
-3880
(BIN)
(d)+(n-1)
-4528
(BIN)
K1
K65535
(0001H)
(FFFFH)
6.2 Arithmetic Operation Instructions
(n)
(n)
6 BASIC INSTRUCTIONS
6
205

Advertisement

Table of Contents
loading

Table of Contents