Panasonic FP7 Series Command Reference Manual page 690

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

14.9 BTOA (Conversion: BIN → ASCII)
Example 9) Converting unsigned 16-bit BCD data (2 data) to decimal ASCII data (5
digits x 2)
The low byte of DT100 is set as the beginning of the storage area. It is stored left-aligned (low
word side) for 5 significant figures. Zero padding is used.
[i]...US
[S1]..."%05b"
[S2]...DT0
[N]...H
0002 00 00
[D]...DT100
③ Conversion data amount = 2
[S2]
[S2]
DT0
H 0123
[S2]+1
DT1
H 3456
DT2
DT0: H 0123 → DT100 to DT102: "23010" is the data that is converted from H0123.
DT1: H 3456 → DT102 to DT104: "56340" is the data that is converted from H3456.
Example 10) Converting unsigned 32-bit BCD data (2 data) to decimal ASCII data (10
digits x 2)
The low byte of DT100 is set as the beginning of the storage area. It is stored right-aligned
(high word side). Zero padding is used within the 7 significant figures. Spaces are inserted for
the remaining digits.
14-40
Convert 16-bit BCD data into decimal ASCII data (5 digits) (zero padding)
① ASCII data (forward direction)
② Storage start position (0)
③ Conversion data amount (2)
H 123
H 3456
[D]+0 bytes
Convert [S2] and [S2]+1
② Storage start position = +0 bytes
[D]
(characters)
DT100
H 3332
3 2
DT101
H 3130
1 0
DT102
5
30
H 35
DT103
H 3336
3 6
0 4
DT104
H 3034
DT105
WUME-FP7CPUPGR-12
0

Advertisement

Table of Contents
loading

Table of Contents