Asc - Omron SYSMAC CP Series Instruction & Reference Manual

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

ASC

Instruction
ASCII CONVERT
Symbol
Applicable Program Areas
Area
Step program areas
Usage
OK
Operands
Operand
S
Source word
DI
Digit designator
D
First destination word
S: Source Word
15
12
11
8
Digit 3
Digit 2
S
Digits from the starting digit of conversion going
left are treated as HEX data and converted to
ASCII code (returns to digit 0 after digit 3)
DI: Digit Designator
The digit designator specifies various parameters for the conversion, as shown in the following dia-
gram.
Digit number: 3 2 1 0
CP1E CPU Unit Instructions Reference Manual(W483)
Mnemonic
Variations
ASC
@ASC
Description
7
4
3
0
Digit 1
Digit 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
Function
code
Converts 4-bit hexadecimal digits in the source
086
word into their 8-bit ASCII equivalents.
ASC
ASC(086)
S
S: Source word
DI
DI: Digit designator
D
D: First destination word
Subroutines
OK
Data type
UINT
UINT
UINT
D: First Destination Word
15
Leftmost byte
D
Leftmost byte
D+1
Leftmost byte
D+2
ASCII code is stored in the left word side. The
code is stored from the output starting byte of
D in the order rightmost byte, leftmost byte.
Note The destination words must be in the same
data area.
2 Instructions
Function
Interrupt tasks
OK
Size
1
1
Variable
8
7
0
Rightmost byte
Rightmost byte
Rightmost byte
2-201
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents