User manual

Highlevel Instructions
3 171
How to specify S2
S2 = H 00
Number of bytes for ASCII character
H1: 1 byte (1 ASCII character)
H2: 2 bytes (2 ASCII characters)
H3: 3 bytes (3 ASCII characters)
H4: 4 bytes (4 ASCII characters)
H5: 5 bytes (5 ASCII characters)
H6: 6 bytes (6 ASCII characters)
H7: 7 bytes (7 ASCII characters)
H8: 8 bytes (8 ASCII characters)
Direction converted data
H0: Normal direction
H1: Reverse direction
Precautions during programming
The data for two ASCII code characters is converted to two numeric digits for one byte. When this takes place,
the characters of the upper and lower bytes are interchanged.
Four characters are converted as one segment of data.
The converted results are stored in byte units.
If an odd number of characters is being converted, “0” will be entered for bit position 0 to 3 of the final data
(byte) of the converted results if data is sequenced in the normal direction, and “0” will be entered for bit
position 4 to 7 if data is being sequenced in the reverse direction.
Normal direction Reverse direction
2 1 4 3 4 3 2 1
BCD data
ASCII
code
1 2 3 4
3 4
1 2
Conversion Example
The following shows conversion from ASCII codes to BCD data.
8 ASCII characters conversion (S2=H0008)
ASCII
character
ASCII HEX
code
37 36 35 34 33 32 31
S1+3 S1+2 S1+1 S1
38
8765
4321
ASCII code
8 ASCII characters (8 bytes)
78 56 34 12
D+1 D
Converted result
BCD H code
F74 (ABCD) instruction execution