Parameter Declaration Data Type Memory Area Description
IN Input WORD I, M, D, P,
or constant
Source data word in four hexadecimal digits
OUT Output DWORD Q, M, D, L, P Destination bit pattern in four bytes
This function does not detect any error conditions.
15.1.3 FC 94 - ATH - ASCII to Hex
The ASCII to Hex (ATH) function converts the ASCII character string pointed to by IN into
packed hexadecimal digits and stores these in the destination table pointed to by OUT.
Since 8 bits are required for the ASCII character and only 4 bits for the hexadecimal digit,
the output word length is only half of the input word length. The ASCII characters are con-
verted and placed into the hexadecimal output in the same order as they are read in. If
there is an odd number of ASCII characters, the hexadecimal digit is padded with zeros in
the right-most nibble of the last converted hexadecimal digit.
Parameter Declaration Data Type Memory Area Description
EN Input BOOL I, Q, M, D, L Enable input with signal state of 1 activates
the box
ENO Output BOOL I, Q, M, D, L Enable output has a signal state of 1 if the
function is executed without error
IN Input Pointer* I, Q, M, D, L Points to the starting location of an ASCII
string
N Input INT I, Q, M, L, P Number of ASCII input characters to be con-
verted
RET_VAL Output WORD I, Q, M, D, L, P Returns a value of W#16#0000 if the
instruction executes without error; see Error
Information for values other than
W#16#0000
OUT Output Pointer* Q, M, D, L Points to the starting location of the table
*) Double word pointer format for area-crossing register indirect addressing
If any ASCII character is found to be invalid, it is converted as 0. The signal state of ENO
is set to 0 and RET_VAL is set equal to W#16#0007.
15.1.4 FC 95 - HTA - Hex to ASCII
The Hex to ASCII (HTA) function converts packed hexadecimal digits, pointed to by IN,
and stores them in the destination string pointed to by OUT. Since 8 bits are required for
the character and only 4 bits for the hex digit, the output word length is two times that of
the input word length. Each nibble of the hexadecimal digit is converted into a character
in the same order as they are read in (left-most nibble of a hexadecimal digit is converted
first, followed by the right-most nibble of that same digit).
Error Information
Description
Parameters
Error Information
Description
VIPA SPEED7
Standard
Converting > FC 95 - HTA - Hex to ASCII
HB00 | OPL_SP7 | Operation list | en | 18-30 797