Panasonic FP7 Series Command Reference Manual page 685

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

Advertisement

Conversion example
Example 1) Converting unsigned 16-bit binary data (2 data) to decimal ASCII data (6
digits + comma) x 2
The high byte of DT100 is set as the beginning of the storage area. It is left-aligned (low word
side), and a comma is added before the data is stored. If it is fewer than 6 digits, spaces are
inserted.
[i]...US
[S1]..."%-6u,"
[S2]...DT0
[N]...H
0002 01 01
[D]...DT100
③ Conversion data amount = 2
[S2]
[S2]
DT0
H 04D2
[S2]+1
DT1
H FFC8
DT2
DT0 : U 1234 (H 04D2) → DT100 to DT103 : "1234 , "
DT1 : U 65480 (H FFC8) → DT104 to DT107 : "65480 ,"
Example 2) Converting signed 16-bit binary data (2 data) to decimal ASCII data (5
digits x 2)
The high byte of DT100 is set as the beginning of the storage area. Zero padding is used to
store the data.
[i]...SS
[S1]..."%05d"
[S2]...DT0
[N]...H
0002 01 01
[D]...DT100
③ Conversion data amount = 2
[S2]
H 04D2
[S2]
DT0
H FFC8
[S2]+1
DT1
DT2
DT0: K 1234 (H 04D2) → DT100 to DT102: "01234"
DT1: K
WUME-FP7CPUPGR-12
Convert 16-bit data into decimal ASCII data (6 digits)
① ASCII data (reverse direction)
② Storage start position (1)
③ Conversion data amount (2)
U 1234
U 65480
Convert 16-bit data into decimal ASCII data (5 digits) (0 padding)
① ASCII data (reverse direction)
② Storage start position (1)
③ Conversion data amount (2)
K 1234
K
-56
-56 (H FFC8) → DT103 to DT105: "-0056"
14.9 BTOA (Conversion: BIN → ASCII)
[D]+1 bytes
Convert [S2] and [S2]+1
② Storage start position = +1 bytes
[D]
(characters)
1
DT100
H 31
**
DT101
3 2
H 3332
DT102
_ 4
H 2034
DT103
H 2C20
, _
DT104
H 3536
5 6
DT105
H 3834
8 4
DT106
_ 0
H 2030
DT107
H **
2C
**
[D]+1 bytes
Convert [S2] and [S2]+1
② Storage start position = +1 bytes
[D]
(characters)
DT100
H 30 **
0
DT101
H 3231
2 1
DT102
4 3
H 3433
DT103
H 302D
0 -
DT104
5 0
H 3530
DT105
H ** 36
**
DT106
**
,
**
6
14-35

Advertisement

Table of Contents
loading

Table of Contents