Subtracting Bcd 8-Digit Data - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

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)
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)
(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)
(Upper 4 digits) (Lower 4 digits)
-
0
9
8 7 1 0 6 8
• 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
-
Operation error
Error code
Description
(SD0/SD8067)
3405
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).
6 BASIC INSTRUCTIONS
196
6.2 Arithmetic Operation Instructions
(d)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
(s)+1
(s)
(Upper 4 digits) (Lower 4 digits)
(Upper 4 digits) (Lower 4 digits)
0
0
3 2 3 4 5 6
0
0 is entered.
1
2
3 4 5 6 7 9
9
Structured text
Not supported
Range
0 to 99999999
0 to 99999999
Double word Indirect
U\G
Z
LC
(d)+1
(d)
9
5 4 7 6 1 2
9
9 9 9 9 9 9
Data type
BCD 8-digit
BCD 8-digit
Constant
specification
LZ
K, H
Data type (label)
ANY32
ANY32
Others
E
$

Advertisement

Table of Contents
loading

Table of Contents