Hitachi Kokusai Electric KP-F520WCL Operation Manual page 23

High resolution ccd camera
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

Table of Contents