443
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
16 External FX Device – FNC 80 to FNC 89
16.4 FNC 83 – HEX / ASCII to Hexadecimal Conversion
11
FN
C30-
FN
C39
R
o
ta
tion and
Sh
ift
12
FNC
4
0
-FNC49
D
a
ta
Op
e
ra
tio
n
13
FNC5
0
-FNC5
9
H
igh Speed
Pr
ocessi
ng
14
FM
C6
0
-F
NC6
9
H
and
y
In
st
ru
cti
o
n
15
FNC7
0
-FNC7
9
Ex
te
rn
a
l F
X
I
/O
D
evi
ce
16
FNC8
0
-FNC8
9
Ext
e
rnal
FX
D
evi
ce
17
F
N
C1
00
-F
NC
10
9
Da
ta
Tr
ansf
e
r 2
18
FN
C
110-FN
C
13
9
Fl
oat
ing P
o
in
t
19
FN
C
140-FN
C
149
Da
ta
O
per
at
io
n
2
20
FN
C
15
0-F
N
C
159
P
o
si
tioni
ng
C
ont
ro
l
3. 8-bit conversion mode (while M8161 is ON)
(M8161 is used also for the RS, ASCI, CCD and CRC instructions.)
Each ASCII code stored in low-order 8 bits of each device
and later is converted into a hexadecimal
code, and transferred to device
and later in units of 4 digits. The number of characters to be converted
is specified by "n".
M8161 is also used for the RS, ASCI, CCD and CRC instructions. When using the 8-bit mode, set M8161 to
normally ON. M8161 is cleared when the PLC mode is changed from RUN to STOP.
Operation
In the following program, conversion is executed as follows:
Conversion source data
Number of specified characters and conversion result
"
•
" indicates "0".
• When the input data has the BCD format, it is necessary to convert BCD data into binary data after
executing this instruction.
ASCII code
Hexadecimal code
D 200
30H
0
D 201
41H
A
D 202
42H
B
D 203
43H
C
D 204
31H
1
D 205
32H
2
D 206
33H
3
D 207
34H
4
D 208
35H
5
D 102
D 101
D 100
n
1
Does not change
•••
0H
2
••
0AH
3
•
0ABH
4
0ABCH
5
•••
0H
ABC1H
6
••
0AH
BC12H
7
•
0ABH
C123H
8
0ABCH
1234H
9
•••
0H
ABC1H
2345H
S
D
M8161
M8000
FNC 83
HEX
n
S
Command
input
D
8-bit mode
Ignored
Low-order 8 bits
16 bits
Source data
M8161
M8000
FNC 83
HEX
D200
D100
K4
X010
8-bit mode
S
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
D 100
0
A
In the case of "n = K2"
0
0
0
0
1
1
0
0
D 200
30H
→
[0]
1
0
0
0
0
0
1
0
D 201
41H
→
[A]
D