Download Print this page

Subtracting Bcd 8-Digit 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 BCD 8-digit data

DB-(P) [using two operands]
These instructions subtract the BCD 8-digit data in the device specified by (d) and the BCD 8-digit 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)
Subtrahend data or the device where the data to be
subtracted from another is stored
(d)
Minuend data or the device where the data from which
another is to be subtracted is stored
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
Processing details
• These instructions subtract the BCD 8-digit data specified by (d) and the BCD 8-digit data specified by (s), and store the
results in the device specified by (d).
(d)+1
(d)
(s)+1
0
9
8 7 1 0 6 8
-
0
0
3 2 3 4 5 6
(d)+1, (s)+1
Upper 4 digits
• If an underflow occurs, the result will be as follows. In this case, the carry flag (SM700) does not turn ON.
1
2
3 4 5 6 7 8
-
1
2
3 4 5 6 7 9
Operation error
Error code
Description
(SD0/SD8067)
3405H
BCD data in the device specified by (s) is outside of the valid range (0 to 99999999).
BCD data in the device specified by (d) is outside of the valid range (0 to 99999999).
Word
T, ST, C, D, W,
U\G
SD, SW, R
(s)
(d)+1
(d)
0
9
5 4 7 6 1 2
0 is entered.
9
9
9 9 9 9 9 9
Structured text
Not supported
Range
Data type
0 to 99999999
BCD 8-digit
0 to 99999999
BCD 8-digit
Double word Indirect
specification
Z
LC
LZ
(d), (s)
Lower 4 digits
7.2 Arithmetic Operation Instructions
Data type (label)
ANY32
ANY32
Constant
Others
K, H
E
$
7 BASIC INSTRUCTIONS
227
7

Hide quick links:

Advertisement

loading