Hitachi HIDIC MICRO-EH Applications Manual page 141

Table of Contents

Advertisement

Item number
Application instructions-19
Ladder format
BIN (d, s)
Instruction format
BIN (d, s)
Usable I/O
d
I/O after conversion (BIN)
I/O before conversion
s
(BCD)
Function
The result of the content conversion of s from BCD to binary is output to d.
If the contents of s are not BCD data (if A through F is included in the data), DER (R7F4) is set to '1' and the conversion
will not be executed (d remains unchanged).
Before execution s
6
0
1
1
After execution d
1
0
0
0
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 BCD to binary and output.
WR000
H6691
WM0010
H1B4F
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
9
9
0
1
0
0
1
1
0
0
B
4
1
1
0
1
1
0
1
0
s
Word
Double word
BIN (WM0010, WR000
)
After conversion
5-91
Chapter 5 Instruction Specifications
BCD → Binary conversion
Processing time (µs)
R7F1
R7F0
Average Maximum
V
C
49
Steps
3
75
4
Word
Double word
WR,
WM TC DX DY
1
(BCD)
1
0
0
0
1
F
0
1
1
1
1
(Binary)
LD X00000
[
BIN (WM0010, WR000)
]
Remark
Upper case: W
Lower case: DW
DR,
Other
DM

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents