Conversion instructions
623
Part III FP Instructions
PLC types
Availability of F71_HEX2A (see page 1326)
Variable Data type Function
s1_Start ANY16 starting 16-bit area for hexadecimal number (source)
s2_Number INT specifies number of source data bytes to be converted
d_Start ANY16 starting 16-bit area for storing ASCII code (destination)
For Relay T/C Register Constant
s1_Start WX WY WR WL SV EV DT LD FL -
s2_Number WX WY WR WL SV EV DT LD FL dec. or hex.
d_Start - WY WR WL SV EV DT LD FL -
No. IEC address Set If
R9007 %MX0.900.7 permanently
R9008 %MX0.900.8 for an instant
the byte number specified by
s2_Number exceeds the area specified
by s1_Start
the calculated result exceeds the area
specified by d_Start.
the data specified by s2_Number is
recognized as "0".
Data types
Operands
Error flags
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable Start is set to true, the number of data bytes given in
BytesToConvert in HexInput is converted to ASCII code and stored in ASCOutput. Note that two
characters that make up one byte are interchanged when stored. One Monitor Header shows the
Hex values, and the other the ASCII values.