Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 246

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

Advertisement

Ex.
If device is specified for (s2) (signed)
b31
(s1)+1,
(s1)
-55555
(s1)+3,
(s1)+2
(s1)+5,
(s1)+4
(s1)+(2n-1),
(s1)+(2n-2)
If constant is specified for (s2) (signed)
(s1)+1,
(s1)
-99999
(s1)+3,
(s1)+2
(s1)+5,
(s1)+4
-59999
(s1)+(2n-1),
(s1)+(2n-2)
• Operation is enabled when (s1) or (s2) have been specified by same device as (d) (perfect match). An error occurs if the
device range of (n) point(s) from (s1) or (s2) partially matches (overlaps) the device range of (n) point(s) from (d).
Ex.
If 4 points of the device from (s2) and (d) match
b31
∙∙∙
b0
W1, W0
W3, W2
W5, W4
W7, W6
If 4 points of the device from (s2), (d) match partially
b31
∙∙∙
b0
W1, W0
W3, W2
W5, W4
W7, W6
• If the value specified for (n) is 0, processing is not performed.
• 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
K2147483647
K-2
-
(7FFFFFFFH)
(FFFFFFFEH)
K-2147483647
K2
-
(80000001H)
(00000002H)
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).)
7 BASIC INSTRUCTIONS
244
7.2 Arithmetic Operation Instructions
∙∙∙
b0
(s2)+1,
(BIN)
(s2)+3,
33333
(BIN)
(s2)+5,
(n)
-
44444
(BIN)
(s2)+(2n-1),
13579
(BIN)
b31
∙∙∙
b0
(BIN)
99999
(BIN)
(n)
-
(BIN)
79999
(BIN)
b31
∙∙∙
D1, D0
D3, D2
D5, D4
D7, D6
b31
∙∙∙
D1, D0
D3, D2
D5, D4
D7, D6
D9, D8
K-2147483647
(80000001H)
K2147483647
(7FFFFFFFH)
b31
∙∙∙
b0
(s2)
44445
(BIN)
(s2)+2
3333
(BIN)
(s2)+4
-10000
(BIN)
(s2)+(2n-2)
12345
(BIN)
b31
∙∙∙
b0
(s2)+1, (s2)
9999
(BIN)
b0
b31
∙∙∙
b0
(1)
b0
b31
∙∙∙
b0
(1)
If unsigned is specified
K0
-
(00000000H)
(d)+1,
(d)
(d)+3,
(d)+2
(n)
(d)+4
(d)+5,
(d)+(2n-1),
(d)+(2n-2)
(d)+1,
(d)
(d)+3,
(d)+2
(d)+4
(d)+5,
(d)+(2n-1),
(d)+(2n-2)
(1)
Because it is a perfect match, operation is
possible.
(1)
An operation error occurs if they partially
match.
K1
K4294967295
(00000001H)
(FFFFFFFFH)
b31
∙∙∙
b0
(BIN)
-1000000
(BIN)
30000
(BIN)
(n)
54444
1234
(BIN)
b31
∙∙∙
b0
(BIN)
-109998
(BIN)
90000
(BIN)
(n)
69998
70000
(BIN)

Hide quick links:

Advertisement

loading