Panasonic FP-E Programming Manual page 423

Fp series
Table of Contents

Advertisement

Explanation of example
Converts 2 bytes of data stored in data register DT0 to ASCII codes that express the equivalent
hexadecimals when trigger R0 turns on. The converted data is stored in data registers DT11 and DT10.
Bit position
Binary data
Hexadecimal
4
ASCII HEX code
B
ASCII character
Description
Converts the data starting from the 16-bit area specified by S1 to ASCII codes that express the equivalent
hexadecimals.
The converted result is stored in the area starting from the 16-bit area specified by D.
S2 specifies the number of source data bytes to be converted.
Since ASCII code requires eight bits (one byte) to express one hexadecimal character, the data length when
converted to ASCII code becomes double the source data.
Precautions during programming
The two characters that make up one byte are interchanged when stored.
Two bytes are converted as one segment of data.
Hexadecimal data
Converted
4
2
result
B
S1
1 2
3 4
S1+1
5 6
7 8
Hexadecimal
data
Flag conditions
Σ Error flag (R9007):
Σ Error flag (R9008):
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
15
1211
· · ·
·
1 0 1 0
1 0 1 1
A
B
DT11
2
4
1
A
A
B
C
D
4
1
4
4
4
A
D
D
D+1
2
1
4
D+3
D+2
6
5
8
Converted result
Turns on and stays on when:
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".
DT0
8 7
4 3
0
·
· ·
· ·
1 1 0 0
1 1 0 1
C
D
DT10
4
4
D
3
C
3
7
High−level Instructions
4
3
C
3 − 159

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents