FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
2. 16-bit conversion mode (while M8161 is OFF)
(M8161 is used also for the RS, ASCI, CCD, and CRC instructions.)
Each ASCII code stored in high-order 8 bits and low-order 8 bits of devices
hexadecimal code, and transferred to devices
converted is specified by "n".
M8161 is used also for the RS, ASCI, CCD and CRC instructions. When using the 16-bit mode, set M8161 to normally
OFF.
M8161 is cleared when the PLC mode is changed from RUN to STOP.
M8000
Command
input
FNC 83
HEX
Operation
In the following program, conversion is executed as follows:
M8000
X010
FNC 83
HEX
Conversion source data
S
Low-order 8 bits of D200
High-order 8 bits of D200
Low-order 8 bits of D201
High-order 8 bits of D201
Low-order 8 bits of D202
High-order 8 bits of D202
Low-order 8 bits of D203
High-order 8 bits of D203
Low-order 8 bits of D204
Number of specified characters and conversion result
" • " indicates "0".
D
D 102
n
1
2
Does not change
3
4
5
6
7
8
•••0H
9
• When the input data is in BCD format, it is necessary to convert BCD data into binary data after executing this
instruction.
• If ASCII code is not stored in
hexadecimal code is disabled. Especially, note that ASCII code should be stored in high-order 8 bits of
when M8161 is OFF.
D
M8161
16-bit mode
S
D
n
M8161
D200
D100
K4
ASCII code
Hexadecimal code
30H
41H
42H
43H
31H
32H
33H
34H
35H
In the case of "n = K4"
D 101
D 100
D 200
•••0H
••0AH
•0ABH
D 201
0ABCH
•••0H
ABC1H
D 100
••0AH
BC12H
•0ABH
C123H
0ABCH
1234H
ABC1H
2345H
S
in the HEX instruction, an operation error occurs and conversion into
16 External FX Device – FNC 80 to FNC 89
16.4 FNC 83 – HEX / ASCII to Hexadecimal Conversion
and later in units of 4 digits. The number of characters to be
16-bit mode
0
A
B
C
1
2
3
4
5
0
1
0
0
0
0
0
41H → [A]
0
1
0
0
0
0
1
43H → [C]
0
0
0
0
1
0
1
0
A
S
and later is converted into a
1
0
0
1
1
0
0
0
30H → [0]
1
0
1
0
0
0
0
1
42H → [B]
0
1
0
1
1
1
1
0
B
C
S
465
11
12
13
14
15
16
17
0
0
18
0
19
also
20