Panasonic FP7 Series Command Reference Manual page 700

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

Advertisement

14.11 ATOB (Conversion: ASCII → BIN)
Example 3) Converting two hexadecimal ASCII data (6 digits) to two 32-bit binary
data (hexadecimal)
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). For empty digits of the storage
area, zeros (0) are inserted.
[i]...UL
[S1]..."%6x"
[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 3030
DT1
H 3130
DT2
H 3332
DT3
H 3938
DT4
H 4241
DT5
H 4443
DT6
DT0 to DT2: "000123" → DT100: H 0000 0123
DT3 to DT5: "89ABCD" → DT101: H 0089 ABCD
Example 4) Converting two hexadecimal ASCII data (separated by commas) to two
10-bit binary data (decimal)
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).
14-50
Converts hexadecimal ASCII data (6-digit) to 32-bit data
① ASCII data (reverse direction)
② Conversion starting position (0) → [S2]+0 byte
③ Amount of conversion data (2) → Converts two 6-digit data
0 0
1 0
3 2
9 8
B A
D C
[D]
DT100
H 0123
H
DT101
H 0000
DT102
H ABCD
H 89ABCD
DT103
H 0089
DT104
* When the number of characters is smaller than
the number of converted bits, the portions that are
lacking are padded with "0".
123
WUME-FP7CPUPGR-12

Advertisement

Table of Contents
loading

Table of Contents