Hex - Omron SYSMAC CP Series Instruction & Reference Manual

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

Advertisement

HEX

Instruction
ASCII TO HEX
Symbol
Applicable Program Areas
Area
Step program areas
Usage
OK
Operands
Operand
S
First source word
DI
Digit designator
D
Destination word
S: First Source Word
15
8
Leftmost byte
S
The conversion start byte and bytes to the left are
treated as ASCII code and converted to hex (returns
to the rightmost byte after the leftmost byte.
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
HEX
@HEX
Description
7
0
Rightmost byte
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
Function
code
Converts up to 4 bytes of ASCII data in the source
162
word to their hexadecimal equivalents and writes
these digits in the specified destination word.
HEX
HEX(162)
S: First source word
S
DI: Digit designator
DI
D: Destination word
D
Subroutines
OK
Data type
UINT
UINT
UINT
D: Destination Word
15
12
11
Digit 3
Digit 2
D
The results of conversion to hex are stored
from the starting digit going left (returns to
digit 0 after digit 3)
2 Instructions
Function
Interrupt tasks
OK
Size
Variable
1
1
8
7
4
3
0
Digit 1
Digit 0
2-205
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents