Ascii To Hex: Hex(162) - Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Conversion Instructions

3-12-11 ASCII TO HEX: HEX(162)

Purpose
Ladder Symbol
Variations
Applicable Program Areas
Operands
Converts up to 4 bytes of ASCII data in the source word to their hexadecimal
equivalents and writes these digits in the specified destination word.
HEX(162)
S: First source word
S
Di
Di: Digit designator
D
D: 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: First Source Word
The contents of the source words are treated as ASCII data. Up to three
source words can be used. (Three source words will be required if 4 bytes are
being converted and the leftmost byte is selected as the first byte in S.) The
source words must be in the same data area.
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: Destination word
The converted hexadecimal digits are written into D from right to left, begin-
ning with the specified first digit. Any digits in the destination word that are not
overwritten with the converted data will be left unchanged.
Step program areas
Subroutines
OK
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
Section 3-12
HEX(162)
@HEX(162)
Not supported
Interrupt tasks
OK
509

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents