453
Conversion Instructions
Section 3-12
3-12-11 ASCII TO HEX: HEX(162)
Purpose
Converts up to 4 bytes of ASCII data in the source word to their hexadecimal
equivalents and writes these digits in the specified destination word.
Ladder Symbol
Variations
Applicable Program Areas
Operands
S: First Source Word
The contents of the source words are treated as ASCII data. Up to three
source words can be used. (Three source words will be required if 4 bytes are
being converted and the leftmost byte is selected as the first byte in S.) The
source words must be in the same data area.
Di: Digit Designator
The digit designator specifies various parameters for the conversion, as
shown in the following diagram.
D: Destination word
The converted hexadecimal digits are written into D from right to left, begin-
ning with the specified first digit. Any digits in the destination word that aren’t
overwritten with the converted data will be left unchanged.
S: First source word
Di: Digit designator
D: Destination word
HEX(162)
S
Di
D
Variations
Executed Each Cycle for ON Condition
HEX(162)
Executed Once for Upward Differentiation
@HEX(162)
Executed Once for Downward Differentiation Not supported
Immediate Refreshing Specification
Not supported
Block program areas
Step program areas
Subroutines
Interrupt tasks
OK
OK
OK
OK
Specifies the first digit in D to receive converted data (0 to 3).
Number of bytes to be converted (0 to 3)
0: 1 digit
1: 2 digits
2: 3 digits
3: 4 digits
First byte of S to be converted.
0: Rightmost byte
1: Leftmost byte
Parity 0:
None
1: Even
2: Odd
Digit number: 3 2 1 0
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...