
508
Conversion Instructions
Section 3-12
3-12-11 ASCII TO HEX: HEX(162)
Purpose
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.
Ladder Symbol
Variations
Applicable Program Areas
Operands
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.
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.
HEX(162)
S
D
Di
S: First source word
Di: Digit designator
D: Destination word
Variations
Executed Each Cycle for ON Condition
HEX(162)
Executed Once for Upward Differentiation
@HEX(162)
Executed Once for Downward Differentiation Not supported
Immediate Refreshing Specification
Not supported
Block program areas
Step program areas
Subroutines
Interrupt tasks
OK
OK
OK
OK
3 2 1 0
Digit number:
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
0: Rightmost byte
1: Leftmost byte
Parity
0: None
1: Even
2: Odd
First byte of S to be converted.
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...