Panasonic FP7 Series Command Reference Manual page 686

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

Advertisement

14.9 BTOA (Conversion: BIN → ASCII)
Example 3) Converting signed 32-bit binary data (2 data) to decimal ASCII data
(number of digits not specified)
The low byte of DT100 is set as the beginning of the storage area. For a positive number, a
space is inserted. Since the number of digits is not specified, the number of characters after
conversion and the size of the area where the data is stored will vary according to the value of
the binary data that is converted.
[i]...SL
[S1]..."%␣d"
[S2]...DT0
[N]...H
0002 00 01
[D]...DT100
③ Conversion data amount = 2
[S2]
[S2]
DT0
H 04D2
[S2+1]
DT1
H 0000
DT2
H FFC8
[S2+2]
[S2+3]
DT3
H FFFF
DT4
DT0 to DT1: U
DT2 to DT3: U 4294967240 (H FFFF FFC8) → DT102 to DT103: "-56"
Example 4) Converting signed 32-bit binary 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 right-aligned (high word
side), and a space is inserted before the data is stored.
[i]...SL
[S1]..."%10d"
[S2]...DT0
[N]...H
0002 00 01
[D]...DT100
③ Conversion data amount = 2
[S2]
DT0
H 04D2
[S2]
[S2+1]
DT1
H 0000
DT2
H FFC8
[S2+2]
DT3
H FFFF
[S2+3]
DT4
DT0 to DT1: U
DT2 to DT3: U 4294967240 (H FFFF FFC8) → DT105 to DT109: "
14-36
Convert 32-bit data into decimal ASCII data
(For a positive number, a space is inserted)
① ASCII data (reverse direction)
② Storage start position (0) → [D]+0 bytes
③ Conversion data amount (2) → Convert [S2] and [S2]+2
K 1234
K -56
1234 (H 0000 04D2) → DT100 to DT102: "␣1234 "
Convert 32-bit data into decimal ASCII data (10 digits)
① ASCII data (reverse direction)
② Storage start position (0) → [D]+0 bytes
③ Conversion data amount (2) → Convert [S2] and [S2]+2
K 1234
K -56
1234 (H 0000 04D2) → DT100 to DT104: "
② Storage start position = +0 bytes
[D]
(characters)
DT100
H31 H20
DT101
H33 H32
DT102
H2D
H34
DT103
H36 H35
DT104
② Storage start position = +0 bytes
[D]
(characters)
␣ ␣
DT100
H 2020
␣ ␣
DT101
H 2020
␣ ␣
DT102
H 2020
DT103
H 3231
DT104
H 3433
DT105
H 2020
DT106
H 2020
DT107
H 2020
DT108
H 2D20
DT109
H 3635
DT110
␣␣ ␣ ␣ ␣ ␣
␣␣ ␣ ␣ ␣ ␣ ␣
1
3
2
-
4
6
5
2 1
4 3
␣ ␣
␣ ␣
␣ ␣
- ␣
6 5
1234"
-56"
WUME-FP7CPUPGR-12

Advertisement

Table of Contents
loading

Table of Contents