Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 230

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

Advertisement

DB-(P) [using three operands]
These instructions subtract the BCD 8-digit data specified by (s1) and the BCD 8-digit data specified by (s2), and store the
results in the device specified by (d).
Ladder diagram
(s1)
FBD/LD
EN
ENO
s1
d
s2
("DBMINUS", "DBMINUSP" enters .)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s1)
Minuend data or the head device where the data from
which another is to be subtracted is stored
(s2)
Subtrahend data or the head device where the data to be
subtracted from another is stored
(d)
Head device for storing the operation result
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s1)
(s2)
(d)
Processing details
• These instructions subtract the BCD 8-digit data specified by (s1) and the BCD 8-digit data specified by (s2), and store the
results in the device specified by (d).
(s1)+1
(s1)
5
6
7 8 9 1 2 3
-
(d)+1, (s1)+1, (s2)+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
-
Operation error
Error code
Description
(SD0/SD8067)
3405H
BCD data in the device specified by (s1) is outside of the valid range (0 to 99999999).
BCD data in the device specified by (s2) is outside of the valid range (0 to 99999999).
7 BASIC INSTRUCTIONS
228
7.2 Arithmetic Operation Instructions
(s2)
(d)
Word
T, ST, C, D, W,
SD, SW, R
(s2)+1
(s2)
0
1
2 3 4 5 6 7
0 is entered.
1
2
3 4 5 6 7 9
Structured text
ENO:=DBMINUS(EN,s1,s2,d);
ENO:=DBMINUSP(EN,s1,s2,d);
Range
0 to 99999999
0 to 99999999
0 to 99999999
Double word Indirect
U\G
Z
LC
(d)+1
(d)
5
5
5 5 4 5 5 6
(d), (s1), (s2)
Lower 4 digits
9
9
9 9 9 9 9 9
Data type
BCD 8-digit
BCD 8-digit
BCD 8-digit
Bit
Bit
Constant
specification
LZ
K, H
Data type (label)
ANY32
ANY32
ANY32
BOOL
BOOL
Others
E
$

Hide quick links:

Advertisement

loading