Chapter 5 Instruction Specifications
5-48
Item number
Arithmetic instructions-3
Name
BCD addition (BCD ADDITION)
Ladder format
Condition code
Processing time (
µ
s)
Remark
R7F4
R7F3
R7F2
R7F1
R7F0
Average Maximum
d = s1 B+ s2
DER
ERR
SD
V
C
Upper case: W
↕
z
z
z
↕
115
Lower case: DW
Instruction format
Number of steps
Condition
Steps
d = s1 B+ s2
Word
4
177
Double word
6
Bit
Word
Double word
Usable I/O
X
Y
R,
M
TD, SS,
CU, CT
WX WY
WR,
WM TC DX DY
DR,
DM
C
onstant
Other
d
Substitution destination
{
{
{
{
{
s1 Augend
{
{
{
{
{
{
{
{
s2 Addend
{
{
{
{
{
{
{
{
Function
•
Adds s1 and s2 as the BCD data, and stores the result in d as the BCD data.
•
The C flag is set to “1” if there is a digit increase, and “0” if not.
•
The DER flag is set to “1” if the operation result s1 and s2 are invalid as the BCD data. If so, operation is not performed
and the C flag retains the previous state without outputting to d. If the s1 and s2 are valid as the BCD data, the DER is set to
“0.”
•
When s1, s2 are words:
0000 to 9999 (BCD)
•
When s1, s2 are double words:
00000000 to 99999999 (BCD)
Notes
•
The combinations of d, s1 and s2 are as follows.
d
s1
s2
Word
Word
Word
Double word
Double word
Double word
Program example
X00000
DIF0
WR002 = WR000 B + WR001
LD
X00000
AND DIF0
[
WR002 = WR000 B+ WR001
]
Program description
•
The sum of WR000 and WR001 values is substituted into WR002 as the BCD data at the leading edge of input X00000.
d
=
s1
B+
s2
Summary of Contents for HIDIC MICRO-EH
Page 1: ...HITACHI PROGRAMMABLE CONTROLLER APPLICATION MANUAL NJI 350B X ...
Page 12: ...MEMO ...
Page 14: ...Chapter 1 Features 1 2 MEMO ...
Page 50: ...Chapter 4 Product lineup and wiring 4 18 MEMO ...
Page 196: ...Chapter 5 Instruction Specifications 5 146 ...
Page 263: ...Chapter 11 Communication Specifications 11 10 MEMO ...