13
(2) Read (receive) data (slave to master)
(a) Command data are converted into ASCII code and transmitted.
(b) Comms byte quantity is 10.
(c) Comms data format (transmission sequence)
・
STX (start code)
: Code indicating start of text.
1 byte (02H)
・
Text data
: Transmit / receive data.
6 byte (ASCII code)
・
ETX (end code)
: Code indicating end of text.
1 byte (03H)
・
SUM
: XOR result (FFH), of adding STX, Text data, and ETX.
2 byte (ASCII code)
(d) Text data details (transmission sequence)
・
Data (note)
:
Sets Read data to be transmitted.
2 byte x 3 (ASCII code)
Note: Data transfer sequence
Data bytes
1st byte
2nd byte
3rd byte
1
Data
0x00
0x00
2
Upper
Lower
0x00
3
Upper
Mid
Lower
5. Calculation method of checksum
Example
1
2
3
4
5
6
7
STX
STATUS ID NO
AREA
ADDRESS
RELATIVE NO
DATA
ETX
SUM
02
01
FF
01
04
00
00
00
03
28
1.
STAUTUS to DATA are transformed into hexadecimal number on the basis of the ASCII code.
'0'
→
(30)
16
'1'
→
(31)
16
'4'
→
(34)
16
'F'
→
(46)
16
STX: (02)
16
ETX: (03)
16
2.
STX to ETX are added all.
(02)
16
+(30)
16
+(31)
16
+(46)
16
+(46)
16
+(30)
16
+(31)
16
+(30)
16
+(34)
16
+(30)
16
+(30)
16
+(30)
16
+(30)
16
+(30)
16
+(30)
16
+(03)
16
=
(2D7)
16
STX STATUS ID
AREA
RELATIVE
DATA
ETX
3.
The XOR (Exclusive OR) between the value obtained in 2 clause and (FF)
16
are taken, then two column
under the answer become SUM
(2D7)
16
XOR (FF)
16
=
(
228
)
16
S T X
1 byte
Text data
6 byte
E T X
1 byte
S U M
2 byte
10 byte
Data
2 byte x 3
6 byte
Summary of Contents for KP-FM200WCL
Page 6: ...E ...