E L C P r o g r a m m i n g M a n u a l
F o r m o r e i nf o r m a t i o n v i sit :
w w w. e a t o n . c o m
MN05003003E
3-244
Program Example 2:
1.
When M1161=ON, conversion mode is 8-bit.
2.
When X0=ON, read four hexadecimal data characters starting from D10 and convert them to
ASCII. Then, store the converted data in the register 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
is 2, the bit structure is:
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
is 4, the bit structure is:
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
Convert 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
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...