Asc - Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual

Table of Contents

Advertisement

ASC

Instruction
ASCII CONVERT
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
S
Source word
DI
Digit designator
D
First destination word
S: Source Word
15
12
11
8
S
Digit 3
Digit 2
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:
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Mnemonic
Variations
ASC
@ASC
Block program areas
Step program areas
OK
OK
Description
7
4
3
0
Digit 1
Digit 0
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)
First byte of D to be used.
Parity
Function
code
Converts 4-bit hexadecimal digits in the source
086
word into their 8-bit ASCII equivalents.
ASC
ASC(086)
S: Source word
S
DI: Digit designator
DI
D: First destination word
D
Subroutines
OK
Data type
UINT
UINT
UINT
D: First Destination Word
15
D
Leftmost byte
Leftmost byte
D+1
D+2
Leftmost byte
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.
0: 1 digit
1: 2 digits
2: 3 digits
3: 4 digits
0: Rightmost byte
1: Leftmost byte
0: None
1: Even
2: Odd
3. Instructions
Function
SFC action or
Interrupt tasks
transition programs
OK
OK
Size
1
1
Variable
8
7
0
Rightmost byte
Rightmost byte
Rightmost byte
3
399

Advertisement

Table of Contents
loading

Table of Contents