Panasonic FP7 Series Command Reference Manual page 708

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

Advertisement

14.11 ATOB (Conversion: ASCII → BIN)
[i]...SF
[S1]... "%10f"
[S2]...DT0
[N]...H
0002 01 01
[D]...DT100
② Conversion starting position = +1 byte
③ Amount of data to be converted = 2
[S2]
(characters)
DT0
H 20
**
DT1
H 2020
DT2
H 2020
DT3
H 3120
DT4
H 2E32
DT5
H 20
33
DT6
H 2020
DT7
H 2020
DT8
H 3420
DT9
H 2E35
DT10
36
H **
DT0 to DT5:
DT5 to DT10: "
Example 17) Converting decimal ASCII data (separated by commas, ending with
NULL) to two 16-bit binary data (decimal)
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). It is processed considering
commas as the data delimiter, and NULL as end of the data.
[i]...US
[S1]..."%d"
[S2]...DT0
[N]...H
0002 01 01
[D]...DT100
② Conversion starting position = + 1 byte
③ Amount of data to be converted = 2
[S2]
DT0
H 31
**
DT1
H 33 H32
DT2
H 2C H34
DT3
H 36 H35
DT4
H 38 H37
DT5
**
H00
DT6
DT0 to DT2: "1234" → DT100: U1234
DT3 to DT5: "5678" → DT101: U5678
14-58
Converts floating point ASCII data (10 characters) to 32-bit real number data
① ASCII data (reverse direction)
② Conversion starting position (1) → [S2]+1 byte
③ Amount of conversion data (2) → two 10-digit data
**
1
. 2
3
4
. 5
6
**
"
12.3" → DT100 to DT101: SF 12.3
45.6" → DT102 to DT103: SF 45.6
:
Converts decimal ASCII data to 16-bit data
:
① ASCII data (reverse direction)
② Conversion starting position (1) → [S2] + 1 byte
③ Amount of conversion data (2) → 2 data separated by a comma
1
**
3
2
,
4
6
5
8
7
**
NULL
[D]
DT100
SF 12.3
DT101
DT102
SF 45.6
DT103
and ending with NULL
[D]
DT100
U1234
U5678
DT101
DT102
WUME-FP7CPUPGR-12

Advertisement

Table of Contents
loading

Table of Contents