![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268548.webp)
509
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.
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...