Subtracting Bcd 4-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 4-digit data

B-(P) [using two operands]
These instructions subtract the BCD 4-digit data in the device specified by (d) and the BCD 4-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)
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 4-digit data in the device specified by (s) and the BCD 4-digit data in the device
specified by (d), and store the subtraction result in the device specified by (d).
(d)
0
6
7
8
-
• If an underflow occurs, the result will be as follows. In this case, the carry flag (SM700) does not turn ON.
0
0
0
1
-
Operation error
Error code
Description
(SD0/SD8067)
3405
BCD data in the device specified by (s) is outside of the valid range (0 to 9999).
BCD data in the device specified by (d) is outside of the valid range (0 to 9999).
6 BASIC INSTRUCTIONS
192
6.2 Arithmetic Operation Instructions
(d)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
(s)
0
2
3
4
0 is entered.
0
0
0
3
Structured text
Not supported
Range
0 to 9999
0 to 9999
Double word Indirect
U\G
Z
LC
(d)
0
4
4
4
9
9
9
8
Data type
BCD 4-digit
BCD 4-digit
Constant
specification
LZ
K, H
Data type (label)
ANY16
ANY16
Others
E
$

Advertisement

Table of Contents
loading

Table of Contents