7 Application Instructions API 50-99
D V P - P L C A P P L I C AT I O N M A N U A L
7-96
Program Example 2:
1. M1161 = On: The 8-bit conversion mode
2. When X0 = On, convert the 4 hex values in D10 into ASCII codes and send the result to registers starting from
D20.
X0
ASCI
D10
D20
K4
M1000
M1161
3. Assume
(D10) = 0123 H
‘0’ = 30H
‘4’ = 34H
‘8’ = 38H
(D11) = 4567 H
‘1’ = 31H
‘5’ = 35H
‘9’ = 39H
(D12) = 89AB H
‘2’ = 32H
‘6’ = 36H
‘A’ = 41H
(D13) = CDEFH
‘3’ = 33H
‘7’ = 37H
‘B’ = 42H
4. When
n
= 2, the bit structure will be as:
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
2
3
D10=0123 H
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
1
0
0
1
3
3
3
2
1
0
0
0
1
0
0
0
0
ASCII code of D20=2 is 32H
ASCII code of D21=3 is 33H
5. When
n
= 4, the bit structure will be as:
0 0
0 0
0
1
0
1
1
1 0 0
0
0
0
0
0
0 0 0 0
0
0
0
0
0 0 0
0
0
1 1
0 0
0
1
2
3
D10 = H 0123
b15
b15
Converted to
b15
0
0 0 0 0
0
0
0
0
0 1 1
0
0
1 1
b15
3 H 33
2 H 32
D22
b15
b0
b0
b0
b0
b0
D20
D21
1 H 31
D23
0 H 30
0 0 0 0
0
0
0
0
0 0 1
0
1 1
0 0
0 0 0 0
0
0
0
0
0 1 0
0
1 1
Summary of Contents for DVP-PLC
Page 1: ...PLC PLC...
Page 28: ...1 Basic Principles of PLC Ladder Diagram DVP PLC Application Manual 1 24 MEMO...
Page 192: ...4 Step Ladder Instructions DVP PLC Application Manual 4 22 MEMO...
Page 472: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 70 MEMO...
Page 574: ...9 Application Instructions API 150 199 DVP PLC Application Manual 9 102 MEMO...