Panasonic FP7 Series Command Reference Manual page 707

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

Advertisement

Example 15) Converting two decimal ASCII data (7 digits) to two 32-bit BCD data
The conversion starts from the low byte of DT0. It is converted in reverse direction (the low
word side of [S2] is considered as high-order numerical data). For empty digits of the storage
area, zeros (0) are inserted.
[i]...UL
[S1]..."%7b"
[S2]...DT0
[N]...H
0002 00 01
[D]...DT100
② Conversion starting position = +0 byte
③ Amount of data to be converted = 2
[S2]
(characters)
DT0
H 3030
DT1
H 3030
DT2
H 3231
DT3
H 31
33
DT4
H 3332
DT5
H 3534
H 3736
DT6
DT0 to DT3: "0000123" → DT100 to DT101: H 0000 0123
DT3 to DT6: "1234567" → DT102 to DT103: H 0123 4567
Example 16) Converting two floating point ASCII data (10 digits) to two 32-bit single-
precision real number data
The conversion starts from the high byte of DT0. It is converted in reverse direction (the low
word side of [S2] is considered as high-order numerical data).
WUME-FP7CPUPGR-12
Converts decimal ASCII data (7-digit) to 32-bit BCD data
① ASCII data (reverse direction)
② Conversion starting position (0) → [S2]+0 byte
③ Amount of conversion data (2) → two 7-digit data
0 0
0 0
2 1
1
3
3 2
5 4
7 6
14.11 ATOB (Conversion: ASCII → BIN)
[D]
DT100
H 0123
DT101
H 0000
DT102
H 4567
DT103
H 0123
DT104
* When the number of characters is smaller than
the number of converted bits, the portions that are
lacking are padded with "0".
H 00000123
H 01234567
14-57

Advertisement

Table of Contents
loading

Table of Contents