Panasonic FP7 Series Command Reference Manual page 692

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

Advertisement

14.9 BTOA (Conversion: BIN → ASCII)
Example 12) Converting 32-bit single-precision floating point real number data (2
data) to exponential notation ASCII data (10 digits x 2)
The low byte of DT100 is set as the beginning of the storage area. 2 digits after the decimal
point. Exponential notation is used. For a positive number, a space is inserted.
[i]...SF
[S1]..."%-10.2e"
[S2]...DT0
[N]...H
0002 00 01
[D]...DT100
③ Conversion data amount = 2
[S2]
[S2]
DT0
[S2+1]
DT1
DT2
[S2+2]
DT3
[S2+3]
DT4
DT0 to DT3: 123.4567
DT4 to DT7: -12.34567
Example 13) Converting 32-bit single-precision floating point real number data (2
data) to floating point ASCII data or exponential notation ASCII data (9 digits x 2)
The high byte of DT100 is set as the beginning of the storage area. It is stored left-aligned (low
word side). The data is converted to 7 significant figure floating point ASCII data before storing.
● The conversion is either to floating point ASCII data or to exponential notation ASCII data,
whichever is shorter.
14-42
Convert 32-bit single precision real number data into exponential ASCII data (10 digits)
① ASCII data (reverse direction)
② Storage start position (0)
③ Conversion data amount (2)
123.4567
-12.34567
→ DT100 to DT104: "1.23e+02
→ DT105 to DT109: "-1.23e+01
[D]+0 bytes
Convert [S2] and [S2]+2
② Storage start position = +0 bytes
[D]
(characters)
H 3120
DT100
DT101
H 322E
DT102
H 6533
DT103
H 302B
DT104
H 2032
DT105
H 312D
DT106
H 322E
DT107
H 6533
DT108
H 302B
DT109
H 2031
DT110
"
"
. 1
3 2
+ e
2 0
1 -
2 .
e 3
0 +
1
WUME-FP7CPUPGR-12

Advertisement

Table of Contents
loading

Table of Contents