Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 292

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions subtract the (n) points of 32-bit binary data from the device specified by (s2) or the constant from the (n)
points of 32-bit binary data from the device specified by (s1), and store the operation result in the device specified by (d)
and later.
• Specify data in units of 32 bits.
Ex.
When a device is specified by (s2) (signed value specification)
(s1)
(s1)+1,
(s1)+3,
(s1)+2
(s1)+5,
(s1)+4
(s1)+2(n)-1,
(s1)+2(n)-2
When a constant is specified by (s2) (signed value specification)
(s1)+1,
(s1)
(s1)+3,
(s1)+2
(s1)+5,
(s1)+4
(s1)+2(n)-1,
(s1)+2(n)-2
• Operation is possible when the same device is specified by (s1) or (s2) and (d). However, if the device range of (n) points
from (s1) or (s2) and the device range of (n) points from (d) are partly overlapped, an error results.
Ex.
When the four points of device from that specified by (s2) and (d) exactly match
b31
∙∙∙
b0
W1, W0
W3, W2
W5, W4
W7, W6
(1) Operation is possible because they exactly match.
When four points of device from that specified by (s2) and (d) are partly overlapped
b31
∙∙∙
W1, W0
W3, W2
W5, W4
W7, W6
(1) An operation error results because they partly match.
• If (n) is 0, no processing is performed.
• If an overflow occurs, the result will be as follows. In this case, SM700 does not turn on.
When a signed value is specified
K2147483647
K-2
-
(H7FFFFFFF)
(HFFFFFFFE)
K-2147483647
K2
-
(H80000001)
(H00000002)
6 BASIC INSTRUCTIONS
290
6.2 Arithmetic Operation Instructions
b31
∙∙∙
b0
(s2)+1,
-55555
(BIN)
(s2)+3,
33333
(BIN)
(s2)+5,
(n)
44444
(BIN)
-
(s2)+2(n)-1,
13579
(BIN)
b31
∙∙∙
b0
-99999
(BIN)
99999
(BIN)
-59999
(BIN)
(n)
-
79999
(BIN)
b31
∙∙∙
D1, D0
D3, D2
D5, D4
D7, D6
b0
b31
∙∙∙
D1, D0
D3, D2
D5, D4
D7, D6
D9, D8
K-2147483647
(H80000001)
K2147483647
(H7FFFFFFF)
b31
∙∙∙
(s2)
44445
(BIN)
(s2)+2
3333
(BIN)
(s2)+4
-10000
(BIN)
(s2)+2(n)-2
12345
(BIN)
b31
∙∙∙
b0
(s2)+1, (s2)
9999
(BIN)
b0
b31
∙∙∙
b0
(1)
b0
b31
∙∙∙
b0
(1)
When an unsigned value is specified
K0
(H00000000)
b0
(d)+1,
(d)
(d)+3,
(d)+2
(n)
(d)+5,
(d)+4
(d)+2(n)-1,
(d)+2(n)-2
(d)
(d)+1,
(d)+3,
(d)+2
(d)+4
(d)+5,
(d)+2(n)-1,
(d)+2(n)-2
K1
-
(H00000001)
b31
∙∙∙
b0
-1000000
(BIN)
30000
(BIN)
(n)
54444
(BIN)
(BIN)
1234
b31
∙∙∙
b0
-109998
(BIN)
(BIN)
90000
69998
(BIN)
(n)
(BIN)
70000
K4294967295
(HFFFFFFFF)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents