Panasonic FP7 Series Command Reference Manual page 704

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

Advertisement

14.11 ATOB (Conversion: ASCII → BIN)
[i]...US
[S1]... "%5d"
[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 3231
DT2
H 3433
DT3
H 3536
DT4
H 3834
DT5
H **
30
DT6
DT0 to DT2: " 1234" → DT100: U 1234 (H 04D2)
DT3 to DT5: "65480" → DT101: U 65480 (H FFC8)
Example 10) Converting two decimal ASCII data (5 digits) to two 16-bit signed 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).
[i]...SS
[S1]..."%5d"
[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 3231
DT2
H 3433
DT3
H 2020
DT4
H 352D
DT5
H **
36
DT6
DT0 to DT2: " 1234" → DT100: K 1234 (H 04D2)
DT3 to DT5: " -56"
Example 11) Converting two decimal ASCII data (10 digits) to two 32-bit unsigned
binary data (decimal)
The conversion starts from the low byte of DT0. It is converted in reverse direction (the low
word side of [S2] is considered as high-order numerical data).
14-54
Converts decimal ASCII data (5-digits) to 16-bit data (unsigned)
① ASCII data (reverse direction)
② Conversion starting position (1) → [S2]+1 byte
③ Amount of conversion data (2) → two 5-digit data
**
2 1
4 3
5 6
8 4
0
**
Converts decimal ASCII data (5-digit) to 16-bit data
① ASCII data (reverse direction)
② Conversion starting position (1) → [S2]+1 byte
③ Amount of conversion data (2) → two 5-digit data
**
2 1
4 3
5 -
6
**
→ DT101: K -56
[D]
DT100
H 04D2
DT101
H FFC8
DT102
[D]
DT100
H 04D2
DT101
H FFC8
DT102
(H FFC8)
U 1234
U 65480
K 1234
K -56
WUME-FP7CPUPGR-12

Advertisement

Table of Contents
loading

Table of Contents