EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 236

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
234
6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
B+(P), B-(P) [When three data are set]
Processing details
B+
Adds the BCD 4-digit data designated by (S1) and the BCD 4-digit data designated by (S2), and stores the result of the
addition at the device designated by (D).
0 to 9999 (BCD 4 digits) can be assigned to (S1), (S2) and (D).
If the result of the addition operation exceeds 9999, the higher bits are ignored. The carry flag (SM700) in this case does
not turn ON.
B-
Subtracts the BCD 4-digit data designated by (S1) and the BCD 4-digit data designated by (S2), and stores the result of the
subtraction at the device designated by (D).
0 to 9999 (BCD 4 digits) can be assigned to (S1), (S2) and (D).
The following will result if an underflow is generated by the subtraction operation: The carry flag (SM700) in this case does
not turn ON.
Operation error
In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
(S1): Data to be added to/subtracted from or head number of the devices where the data to be added to/subtracted from is stored (BCD 4 digits)
(S2): Data for adding/subtracting or head number of the devices where the data for adding/subtracting is stored (BCD 4 digits)
(D): Head number of the devices where the operation result will be stored (BCD 4 digits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S1) 
(S2) 
(D) 
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 The (S1) or (S2) BCD data is outside the 0 to 9999 range. 
Command
Command
P
B+, B-
B+P, B-P
S1
S2
D
S1
S2
D
B+/B-
indicates an instruction symbol of .
961221346578
S1
S2
D
4632
00155383
Digits exceeding the designated
number of digits are assumed to be 0.
4
0
44
2
03
4
6078
S1
D
S2
999800030001

Table of Contents

Related product manuals