Panasonic FP Series Programming Manual page 639

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Conversion instructions
F76_A2BIN
Converts the ASCII codes that express the decimal digits, starting from the 16-bit area specified by
Description
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.)
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: 16#30) or "SPACE" (ASCII HEX
code: 16#20) into the extra bytes.
ASCII codes with signs (such as +: 16#2B and -: 16#2D) are also converted. The
+ codes can be omitted.
Example of converting an ASCII code indicating a negative number
ASCII code
s1[2]
30
0
Converted result
Example of converting an ASCII code indicating a positive number
ASCII code
30
0
ASCII code
Converted result
ASCII HEX code to express decimal characters:
638
ASCII -> 16-bit BIN conversion
s1[1]
s1[0]
30
31
2D
30
30
0
1
(0)
(0)
ASCII code
Extra bytes
Range specified by s2
F76_A2BIN instruction execution
d
FF
9C
– 100
s[2]
s[1]
s1[0]
30
31
20
20
20
0
1
(Space)
(Space)(Space)
Extra bytes
Range specified by s2
F76_A2BIN instruction execution
d
00
64
100

Advertisement

Table of Contents
loading

Table of Contents