Panasonic FP Series Programming Manual page 623

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Conversion instructions
F71_HEX2A
Converts the data byte-wise from the 16-bit area specified by s1_Start to ASCII codes that express
Description
the equivalent hexadecimals if the trigger EN is in the TRUE-state. The number of bytes to be
converted is specified by s2_Number. The converted result is stored in the area starting with the
16-bit area specified by d_Start. ASCII code requires 8 bits (one byte) to express one hexadecimal
character. Upon conversion to ASCII, the data length will thus be twice the length of the source
data.
The two characters that make up one byte are interchanged when stored. Two bytes are converted
as one segment of data.
Hexadecimal data
Converted
4
result
s1[0]
1 2
s1[1]
5 6
Hexadecimal
data
ASCII HEX codes to express hexadecimal characters:
Hexadecimal
number
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
622
HEX -> ASCII conversion
s1[0]
A
B
C
D
d[1]
d[0]
2
4
1
4
4
B
A
D
d[1]
2
1
4
3 4
7 8
d[3]
6
5
8
Converted result
ASCII HEX
code
16#30
16#31
16#32
16#33
16#34
16#35
16#36
16#37
16#38
16#39
16#41
16#42
16#43
16#44
16#45
16#46
4
3
C
d[0]
3
d[2]
7

Advertisement

Table of Contents
loading

Table of Contents