Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 239

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

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)
b15
∙∙∙
b0
(s1)
1234
(BIN)
(s1)+1
4567
(BIN)
(s1)+2
-2000
(BIN)
(n)
(s1)+(n-2)
-1234
(BIN)
(s1)+(n-1)
4000
(BIN)
If constant is specified for (s2) (signed)
b15
∙∙∙
b0
(s1)
1234
(BIN)
(s1)+1
4567
(BIN)
(s1)+2
-2000
(BIN)
(n)
(s1)+(n-2)
-1234
(BIN)
(s1)+(n-1)
4000
(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
K32767
K2
+
(7FFFH)
(0002H)
K-32767
K-2
+
(8001H)
(FFFEH)
Operation error
Error code
Description
(SD0/SD8067)
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).)
b15
∙∙∙
b0
(s2)
4000
(BIN)
(s2)+1
1234
(BIN)
(s2)+2
-1234
(BIN)
(n)
+
(s2)+(n-2)
5000
(BIN)
(s2)+(n-1)
4321
(BIN)
b15
∙∙∙
b0
(s2)
4321
(BIN)
+
If unsigned is specified
K-32767
K65535
+
(8001H)
(FFFFH)
K32767
(7FFFH)
b15
∙∙∙
b0
(d)
5234
(BIN)
(d)+1
5801
(BIN)
(d)+2
-3234
(BIN)
(d)+(n-2)
3766
(BIN)
(d)+(n-1)
8321
(BIN)
b15
∙∙∙
b0
(d)
5555
(BIN)
(d)+1
8888
(BIN)
(d)+2
2321
(BIN)
(d)+(n-2)
3087
(BIN)
(d)+(n-1)
8321
(BIN)
K1
K0
(0001H)
(0000H)
7.2 Arithmetic Operation Instructions
(n)
(n)
7 BASIC INSTRUCTIONS
7
237

Hide quick links:

Advertisement

loading