Panasonic FP-E Programming Manual page 442

Fp series
Table of Contents

Advertisement

High−level Instructions
Description
Converts the ASCII codes that express the decimal digits, starting from the 16-bit area specified by S1 to
16-bit data as specified by S2. The converted result is stored in the area specified by D.
S2 specifies the number of source data bytes to be converted using decimal number. (This specification
cannot be made with BCD data.)
Precautions during programming
The ASCII codes being converted should be stored in the direction of the last address in the specified area.
If the area specified by S1 and S2 is more than that required for the data you want to convert, place "0" (ASCII
HEX code: H30) or "SPACE" (ASCII HEX code: H20) into the extra bytes.
ASCII codes with signs (such as +: H2B and −: H2D) are also converted. The + codes can be omitted.
Flag conditions
Σ Error flag (R9007):
Σ Error flag (R9008):
Conversion Example
The following shows conversion from ASCII codes to decimal data in a 16−bit configuration.
Example of converting an ASCII code indicating a negative number
ASCII code
S1+2
30
30
31
0
0
1
ASCII code
Range specified by S2
Converted result
3 − 178
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
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 data specified by S2 is recognized as "0".
− The converted result exceeds the 16-bit area specified by D.
− The converted result exceeds the 16-bit data.
− ASCII code not corresponding to decimal numbers (0 to 9) or ASCII
characters (+, −, and SPACE) is specified.
S1+1
S1
2D
30
30
(0)
(0)
Extra bytes
F76 (ABIN) instruction execution
D
FF
9C
K−100

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents