408
Conversion Instructions Section 3-11
3-11-10 ASCII CONVERT: ASC(086)
Purpose Converts 4-bit hexadecimal digits in the source word into their 8-bit ASCII
equivalents.
Ladder Symbol
Variations
Applicable Program Areas
Operands S: Source Word
Up to four digits in the source word can be converted. The digits are num-
bered 0 to 3, right to left.
Di: Digit Designator
The digit designator specifies various parameters for the conversion, as
shown in the following diagram.
D: First destination word
The converted ASCII data is written to the destination word(s) beginning with
the specified byte in D. Three destination words (D to D+3) will be required if 4
digits are being converted and the leftmost byte is selected as the first byte in
D. The destination words must be in the same data area.
Any bytes in the destination word(s) that are not overwritten with ASCII data
will be left unchanged.
ASC(086)
S
D
Di
S: Source word
Di: Digit designator
D: First destination word
Variations Executed Each Cycle for ON Condition ASC(086)
Executed Once for Upward Differentiation @ASC(086)
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
3 2 1 0
Specifies the first digit in S to be converted (0 to 3).
Number of digits to be converted (0 to 3)
0: 1 digit
1: 2 digits
2: 3 digits
3: 4 digits
First byte of D to be used.
0: Rightmost byte
1: Leftmost byte
Parity 0: None
1: Even
2: Odd
Digit number: