Download Print this page

Subtracting 32-Bit Binary Data - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

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

Advertisement

Subtracting 32-bit binary data

D-(P)(_U) instruction and DSUB(P)(_U) instruction can be used for subtraction of 32-bit binary data.
D-(P)(_U) [using two operands]
These instructions subtract the 16-bit binary data in the device specified by (d) and the 16-bit binary data in the device
specified by (s), and store the result in the device specified by (d).
Ladder diagram
(s)
(d)
FBD/LD
Not supported.
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
D-(P)
Subtrahend data or the head device where the
data to be subtracted from another is stored
D-(P)_U
(d)
D-(P)
Head device where the data from which
another is to be subtracted is stored
D-(P)_U
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
Processing details
• These instructions subtract the 32-bit binary data in the device specified by (d) and the 32-bit binary data in the device
specified by (s), and store the subtraction result in the device specified by (d).
(d)
(d)+1
(s)+1
b31
b16 b15
b0
b31
···
···
···
123456 (BIN)
567890 (BIN)
-
• When underflow or overflow occurs in the operation result, the following processing is executed. In this case, the carry flag
(SM700, SM8022) does not turn ON.
In case of D-(P)
(d)
(d)+1
(s)+1
b15
b0
b15
···
2
2147483648
(BIN)
-
(d)
(d)+1
(s)+1
b15
b0
b15
···
-2
2147483647
(BIN)
-
In case of D-(P)(_U)
(d)
(d)+1
(s)+1
b15
b0
b15
···
0
(BIN)
-
1
(d)
(d)+1
(s)+1
b15
b0
b15
···
0
(BIN)
-
4294967295
Word
T, ST, C, D, W,
U\G
SD, SW, R
(s)
(d)
(d)+1
b16 b15
b0
b31
b16 b15
···
···
444434 (BIN)
(s)
(d)
(d)+1
b0
b15
···
···
(BIN)
2147483646
(BIN)
(s)
(d)
(d)+1
b0
b15
···
···
(BIN)
-2147483647
(BIN)
(s)
(d)
(d)+1
b0
b15
···
···
(BIN)
4294967295
(BIN)
(s)
(d)
(d)+1
b0
b15
···
···
(BIN)
1
(BIN)
Structured text
Not supported
Range
-2147483648 to +2147483647
0 to 4294967295
-2147483648 to +2147483647
0 to 4294967295
Double word Indirect
specification
Z
LC
LZ
b0
···
b0
b0
b0
b0
7.2 Arithmetic Operation Instructions
Data type
Data type (label)
32-bit signed binary
ANY32_S
32-bit unsigned binary
ANY32_U
32-bit signed binary
ANY32_S
32-bit unsigned binary
ANY32_U
Constant
K, H
E
$
7 BASIC INSTRUCTIONS
7
Others
199

Hide quick links:

Advertisement

loading