Panasonic FP7 Series Command Reference Manual page 701

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

Advertisement

[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]
(characters)
H 31
**
DT0
DT1
H 33
32
DT2
H 2C
34
DT3
H 36
35
DT4
H 38
37
DT5
H
2C
**
DT6
DT0 to DT2: "1234," → DT100: U 1234 (H 04D2)
DT3 to DT5: "5678," → DT101: U 5678 (H 162E)
Example 5) Converting two hexadecimal ASCII data (separated by commas) to two
16-bit binary data (hexadecimal)
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]...US
[S1]... "%x"
[S2]...DT0
0002 01 01
[N]...H
[D]...DT100
② Conversion starting position = + 1 byte
③ Amount of data to be converted = 2
[S2]
(characters)
DT0
H 20
**
H 3231
DT1
DT2
H 2C33
DT3
H 3420
DT4
H 4241
DT5
H **
2C
DT6
DT0 to DT2: "123," → DT100: H 0123
DT3 to DT5: "4AB," → DT101: H 04AB
Example 6) Converting two decimal ASCII data (4 digits) to two 16-bit BCD data (if
there is a comma at the end of the data)
The conversion starts from the low byte of DT0. If the data includes a comma, it is processed as
a data delimiter even if the number of digits is less than specified. It is converted in reverse
direction (the low word side of [S2] is considered as high-order numerical data).
WUME-FP7CPUPGR-12
Converts decimal ASCII data to 16-bit data (Data end: ',')
① ASCII data (reverse direction)
② Conversion starting position (1) → [S2]+1 bytes
③ Amount of conversion data (2) → 2 data separated by a comma
**
1
3 2
, 4
6 5
8 7
**
,
Converts hexadecimal ASCII data to 16-bit data (Data end: ',')
① ASCII data (reverse direction)
② Conversion starting position (1) → [S2]+1 byte
③ Amount of conversion data (2) → 2 data separated by a comma
**
2 1
, 3
4
B A
**
,
14.11 ATOB (Conversion: ASCII → BIN)
[D]
DT100
H 04D2
DT101
H 162E
DT102
[D]
DT100
H 0123
H 04AB
DT101
DT102
U 1234
U 5678
14-51

Advertisement

Table of Contents
loading

Table of Contents