Panasonic FP7 Series Command Reference Manual page 702

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

Advertisement

14.11 ATOB (Conversion: ASCII → BIN)
[i]...US
[S1]... "%4b"
[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 3231
DT1
H 2C33
DT2
H 3534
DT3
H **
2C
DT4
DT0 to DT1: "123," → DT100: U 0291 (H 0123)
DT2 to DT3: "45,"
Example 7) Converting two floating point ASCII data (with comma delimiters) to two
32-bit single-precision real numbers
The conversion starts from the high byte of DT0. If there is no specification for the number of
digits, it is processed considering commas as the data delimiter. It is converted in reverse
direction (the low word side of [S2] is considered as high-order numerical data).
[i]...SF
[S1]... "%f"
[S2]...DT0
[N]...H
0002 01 01
[D]...DT100
② Conversion starting position = +1 byte
③ Amount of data to be converted = 2
[S2]
**
H 20
DT0
DT1
H 2020
DT2
H 3231
DT3
H 332E
H 20
2C
DT4
DT5
H 2020
DT6
H 3534
DT7
H 362E
H ** 2C
DT8
DT0 to DT4: " 12.3," → DT100 to DT101: SF 12.3
DT4 to DT8: " 45.6," → DT102 to DT103: SF 45.6
14-52
Converts decimal ASCII data to 16-bit BCD data (Data end: ',')
① ASCII data (reverse direction)
② Conversion starting position (0) → [S2]+0 byte
③ Amount of conversion data (2) → 2 data separated by a comma
2 1
, 3
5 4
**
,
→ DT101: U 0069 (H 0045)
Converts floating point ASCII data to 32-bit real number data
(Data end: ',')
① ASCII data (reverse direction)
② Conversion starting position (1) → [S2]+1 byte
③ Amount of data to be converted (2) → 2 data separated by a comma
(characters)
**
2 1
3 .
,
5 4
6 .
** ,
[D]
DT100
H 0123
DT101
H 0045
DT102
[D]
DT100
SF 12.3
DT101
DT102
SF 45.6
DT103
DT104
WUME-FP7CPUPGR-12

Advertisement

Table of Contents
loading

Table of Contents