![C&B Technology AN120 Series Скачать руководство пользователя страница 12](http://html1.mh-extra.com/html/candb-technology/an120-series/an120-series_communications-manual_3069197012.webp)
- 12 -
A(V)N(P)120
’
s Protocol Version 1.1
Bytes of a packet
•
Byte 0
: Header
It must be the ASCII code ‘*’ (2A hex)
•
Byte 1
: High character of camera ID
Byte 2
: Low character of camera ID
Ex) current camera ID : 43 decimal
43 decimal = 2B hex
Byte 1 : ASCII code ‘2’(32 hex)
Byte 2 : ASCII code ‘B’(42 hex)
•
Byte 3, Byte 4 : Command
•
Byte 5 ~ Byte 8 : Option of command
•
Byte 9
: High byte of check sum
Byte 10
: Low byte of check sum
Response from the camera
If the command packet is transmitted to the
camera accurately, the camera will send the
‘response packet’
. If the camera doesn’t
receive the right command packet, it will not
send any response packet.
Check Sum Method
The value of check sum is calculated as
follows.
Check Sum = Byte0 + Byte1+ … + Byte8
Ex) if ID = 43 d (2B hex), command = 75 hex,
command option = 0000
command byte0~byte8 : * 2B 75 0000
ASCII format
: 2A 32 42 37 35 30 30 30 30
Sum = 2A+32+42+37+35+30+30+30+30
= 1CA hex
So, the Check Sum = CA
So the complete command packet
= * 2B 75 0000 CA
Response Time
Most of the response packet will be transmitted
as soon as the camera received the command
packet.
This time is more than 2ms.
0
*
1
D1
2
D2
3
D3
4
D4
5
D5
6
D6
7
D7
8
D8
9
CSH
10
CSL
Byte
Packet(11bytes)
Header
Response Data
Check Sum
0
0
1
0
1
0
1
0
X X X X X X X X
MSB
LSB
MSB
LSB
Response Packet Block