Panasonic FP-E Programming Manual page 448

Fp series
Table of Contents

Advertisement

High−level Instructions
Description
Converts ASCII code that expresses the decimal digits, starting from the 16-bit area specified by S1 to 32-bit
data as specified by S2. The converted result is stored in the area starting from the 16-bit area specified by D.
S2 specifies the number of bytes used to express the destination data using decimals.
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 by the data you want to convert, place "0" (ASCII
HEX code: H30) or "SPACE" (ASCII HEX code: H20) in 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 32−bit configuration.
Example of converting an ASCII code indicating a negative number
ASCII code
S1+4
S1+3
38
37
36
35
34
8
7
6
5
4
ASCII code
Range specified by S2 (10 bytes)
Converted result
FF
3 − 184
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 area specified by D.
− The converted result exceeds the 32-bit data.
− ASCII code not corresponding to decimal numbers (0 to 9) or ASCII
characters (+, −, and SPACE) is specified.
S1+2
S1+1
S1
33
32
31
2D
3
2
1
Extra byte
F78 (DABI) instruction execution
D+1
D
43
9E
B2
K−12345678
20
(Space)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents