Hitachi HIDIC MICRO-EH Applications Manual page 140

Table of Contents

Advertisement

Item number
Application instructions-18
Ladder format
BCD (d, s)
Instruction format
BCD (d, s)
Usable I/O
d
I/O after conversion (BCD)
I/O before conversion
s
(BIN)
Function
The result of the content conversion of s from binary to BCD is output to d.
If the conversion result of s exceeds the number of BCD data digits in d, DER (R7F4) is set to '1' and the instruction will not
be executed.
If s is a word:
If s is a double word:
Before execution s
1
0
0
After execution d
6
0
1
Combinations of d and s.
d
Word
Double word
Notes
If a data error occurred, the previous contents of d are retained.
Program example
X00000
Program description
When X00000 turns on, the content of WR000 is converted from binary to BCD and output to WM0010.
WR000
H1B4F
WM0010
H6691
Name
Condition code
R7F4
R7F3
R7F2
DER
ERR
SD
Number of steps
Condition
Word
Double word
Bit
R,
TD, SS,
X
Y
M
CU, CT
WX WY
set s so that H0000 ≤ s ≤ H270F (0 to 9999).
set s so that H00000000 ≤ s ≤ H5F5E0FF (0 to 99999999).
B
4
0
1
1
0
1
1
0
1
9
9
1
0
1
0
0
1
1
0
s
Word
Double word
BCD (WM0010, WR000
)
After conversion
5-90
Chapter 5 Instruction Specifications
Binary → BCD conversion
Processing time (µs)
R7F1
R7F0
Average Maximum
V
C
79
Steps
3
89
4
Word
Double word
WR,
WM TC DX DY
F
(Binary)
0
0
1
1
1
1
1B4FH=6991
1
0
1
0
0
0
1
(BCD)
Remark
Upper case: W
Lower case: DW
DR,
Other
DM
LD
X00000
[
BCD (WM0010, WR000)
]

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents