3 . I n s t r u c t i o n S e t
M N050 03003E F or mo re infor ma tio n vi sit:
w w w. e a t o n . c o m
3-241
API Mnemonic
Operands
Function
82
ASCI P
S, D, n
Converts HEX to ASCII
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
S
*
*
*
*
*
*
*
*
*
D
*
*
*
*
*
*
n
*
*
ASCI, ASCIP: 7 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P 32 16 P 32 16
P
Operands:
S
: Source data
D
: Destination of the result
n
: Number of digits to convert (
n
=1~256)
Description:
1.
16-bit conversion mode: When M1161=OFF (16-bit conversion mode), read
n
hexadecimal
characters from source
S
and convert them to ASCII. Then, store the result into high and low
bytes of
D
.
2.
8-bit conversion mode: When M1161=ON (8-bit conversion mode), read
n
hexadecimal
characters from source
S
and convert them to ASCII. Then, store the result into the low byte of
D
(high byte of
D
will be set to 0).
3.
Available range for Hex data: 0~9, A~F.
4.
ELC-PB, ELCB-PB series doesn’t support the index registers E, F.
Program Example 1:
1.
When M1161=OFF, conversion mode is 16-bit.
2.
When X0=ON, read four hexadecimal characters from D10 and convert them into ASCII. Then,
store the converted characters in the register started from D20.
X0
ASCI
D10
D20
K4
M1001
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) = CDEF H
‘3’ = 33H
‘7’ = 37H
‘B’ = 42H
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...