
High
−
level Instructions
3
−
162
Explanation of example
Converts 4 ASCII codes stored in data registers DT0 and DT1 to hexadecimal numbers when trigger R0 turns
on. The converted data is stored in data register DT40.
· ··
·
Hexadecimal
Bit position
·
· ·
· ·
Binary data
C
1 1 0 0
D
1 1 0 1
A
1 0 1 0
B
1 0 1 1
15
1211
8 7
4 3
0
DT40
ASCII HEX code
ASCII character
4
D
4
4
C
3
4
B
2
4
A
1
DT1
DT0
Description
Converts ASCII code that expresses hexadecimal characters, starting from the 16-bit area specified by S1, to
hexadecimal numbers as specified by S2. The converted result is stored in the area starting from the 16-bit
area specified by D.
The volume of the results (hexadecimal numeric data) is half that of the converted ASCII code.
Precautions during programming
The data for two ASCII code characters is converted to two numeric digits for one word. When this takes
place, the characters of the upper and lower bytes are interchanged.
Four characters are converted as one segment of data.
ASCII code character
A
B
C
D
4
2
4
1
4
4
4
3
Converted
result
Flag conditions
Σ
Error flag (R9007):
Turns on and stays on when:
Σ
Error flag (R9008):
Turns on for an instant when:
−
The area specified using the index modifier exceeds the limit.
−
The number of bytes specified by S2 exceeds the area specified by S1.
−
The converted result exceeds the area specified by D.
−
The data specified by S2 is recognized as “0”.
−
ASCII code, not a hexadecimal number (0 to F), is specified.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]
Summary of Contents for FP-E
Page 1: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 2: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 24: ...Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...
Page 1333: ...5 245 Phone 800 894 0412 Fax 888 723 4773 Web www clrwtr com Email info clrwtr com ...