15 Applied Instructions (External Device (optional device))
15.4 HEX / ASCII to Hexadecimal Conversion
402
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Conversion source data
Number of characters specified and result of conversion
"." is 0.
• When the input data is BCD, after execution of this instruction, you must convert from BCD to BIN.
Cautions
1) The instruction is provided in the FXU PLC Ver. 3.07 or later.
The instruction is provided in the FX
0N PLC Ver. 1.20 or later.
2) Instructions of pulse operation type are not provided in the FX
0N PLC.
To execute pulse operation, make the instruction execution condition pulse type.
3) Some restrictions to applicable devices.
S1: The FX
3S, FX3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S2: The FX
3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S3: The FX
3U and FX3UC PLCs only are applicable.
ASCII code HEX conversion
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
1
Not changed
...0H
2 ..0AH
3.0ABH
4 0ABCH
5...0HABC1H
6 ..0AH BC12H
7 .0ABH C123H
8 0ABCH 1234H
9 ...0H ABC1H 2345H
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
D 100
0A
In the case of n=K2
00001100
D 200
30H
10000010
D 201
0)
A)41H