Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 441

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Conversion Instructions
3-11-10 ASCII CONVERT: ASC(086)
Purpose
Ladder Symbol
Variations
Applicable Program Areas
Operands
408
Converts 4-bit hexadecimal digits in the source word into their 8-bit ASCII
equivalents.
ASC(086)
S: Source word
S
Di: Digit designator
Di
D
D: First destination word
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation Not supported
Immediate Refreshing Specification
Block program areas
OK
OK
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.
Digit number:
3 2 1 0
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.
Step program areas
Subroutines
OK
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
Section 3-11
ASC(086)
@ASC(086)
Not supported
Interrupt tasks
OK

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents