Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 226

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

Advertisement

B-(P) [using three operands]
These instructions subtract the BCD 4-digit data in the device specified by (s1) and the BCD 4-digit data in the device
specified by (s2), and store the result in the device specified by (d).
Ladder diagram
(s1)
FBD/LD
EN
ENO
s1
d
s2
("BMINUS", "BMINUSP" enters .)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s1)
Minuend data or the device where the data from which
another is to be subtracted is stored
(s2)
Subtrahend data or the device where the data to be
subtracted from another is stored
(d)
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 4-digit data in the device specified by (s1) and the BCD 4-digit data in the device
specified by (s2), and store the subtraction result in the device specified by (d).
(s1)
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)
3405H
BCD data in the device specified by (s1) is outside of the valid range (0 to 9999).
BCD data in the device specified by (s2) is outside of the valid range (0 to 9999).
7 BASIC INSTRUCTIONS
224
7.2 Arithmetic Operation Instructions
(s2)
(d)
Word
T, ST, C, D, W,
SD, SW, R
(s2)
0
2
3
4
0 is entered.
0
0
0
3
Structured text
ENO:=BMINUS(EN,s1,s2,d);
ENO:=BMINUSP(EN,s1,s2,d);
Range
0 to 9999
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
BCD 4-digit
Bit
Bit
Constant
specification
LZ
K, H
Data type (label)
ANY16
ANY16
ANY16
BOOL
BOOL
Others
E
$

Hide quick links:

Advertisement

loading