北京天宇海视科技有限公司

智慧城市网试用16

收藏

PELCO-D协议

时间:2011-07-21      阅读:9087

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Protocol Manual for
 
Coaxitron
 
Extended Coaxitron
 
32 bit Coaxitron
 
“D” (Digital Coaxitron)
 
 
March 26, 1997
Table of Contents
 
Legal Notices............................................................................................................................................................................................ 3
Notice of Disclaimer................................................................................................................................................................................ 3
Proprietary Notice................................................................................................................................................................................... 3
Questions....................................................................................................................................................................................................... 3
What this manual covers................................................................................................................................................................ 4
Origins (15 bit Coaxitron)................................................................................................................................................................. 4
First Expansion (extended 15 bit Coaxitron)................................................................................................................... 5
Second Expansion (32 bit Coaxitron)....................................................................................................................................... 6
Extended Command Set............................................................................................................................................................................... 7
Digital Coaxitron.................................................................................................................................................................................. 8
Index................................................................................................................................................................................................................ 11
 

Legal Notices
 
Notice of Disclaimer
 
Pelco makes no claims, expressed or implied, regarding the usefulness of this protocol, it’s implementation, or it’s correctness. Any use of this protocol is the sole responsibility of the agency implementing the protocol. The contents of this document and the function of the protocol are subject to change without notice.
 
 
Proprietary Notice
 
The contents of this document are considered to be the property of Pelco. Users of this protocol agree to use the protocol only in the interests of Pelco. Any use of this protocol to Pelco’s detriment is prohibited.
 
Those receiving this protocol cannot redistribute the protocol without the expressed written consent of Pelco.
 
 
Questions
 
Questions regarding this protocol, it’s implementation, use, and distribution should be addressed to:
Pelco                                                        (209) 292-1981 Voice
300 West Pontiac Way                                   (209) 292-1018
Clovis, California, USA 93612-5699
 

 
What this manual covers
 
This manual covers the two versions of the Coaxitron (see below) protocol and a 422/485 version of the protocol. The two versions of Coaxitron are divided up between the 15 bit (fixed speed only) version and the 32 bit variable speed) version. The 422/485 version adds some framing for transmission over an asynchronous medium and is explained in the section marked “Digital Coaxitron”.
 
This manual covers the protocols used to speak to Coaxitron series equipment and with Pelco’s “D” version receivers.
 
Coaxitron is Pelco’s name for a method of sending control signaling from a controller to a pan and tilt, receiver driver, or camera and lens on the video signal (also known as “up the coax” or “UTC错误!未找到引用源。”). This document will present the protocol from a historical perspective because the current state of the protocol is most easily understood from an evolutionary viewpoint.
 
Origins (15 bit Coaxitron)
 
Coaxitron is a pulse width modulated (PWM) signal that is inserted into the unused video lines (the vertical blanking interval). A 2ms pulse represents a one (1) and a 1 ms pulse represents a zero (0).
 
Coaxitron originated as a fifteen (15) bit protocol to control basic functions of a remote device. The data is transmitted during line eighteen (18) of the vertical blanking interval of a video signal. The transmitted bits of one Coaxitron field are:
 

Motion Control
Camera Control
Other Features

 
 
The “sense” bit determines the functions of the next three bits in the message. If the sense bit is on, then the next three bits reflect the state of Aux4, Aux2, and the manual scan mode. If the sense bit is off, the next three bits reflect the state of Aux3, Aux1, and the auto scan mode.
 
You can, for example, control the state of the autoscan by setting (turn it on) or clearing (turn it off) bit 4 with the sense bit off. If the sense bit is off and bit 4 is on, autoscan is enabled. If the sense bit is off and bit 4 is off, autoscan is disabled.
 
With this protocol, it’s easy to see that we can send multiple control actions in the same message. That is, for example, you can move left and up at the same time you’re opening the iris and zooming in.

 
First Expansion (extended 15 bit Coaxitron)
 
Following this implementation, a feature was added that allowed the remote device to remember a position. This position is called a preset and contains information regarding the pan, tilt, zoom, focus, and iris positions. Since this information is stored (remembered) by the remote device, the protocol had to be expanded to allow the user to l the remote to: remember a position, recall a position, recall a series of positions (preset scan), and clear a remembered position.
 
To do this, a series of Coaxitron fields were transmitted and the information about the preset and the command were transmitted serially within the Coaxitron field. The bits used for this were Man/Auto (or scan bit) and the Aux4/Aux3 bit.
 
The scan bit is used to “clock” the information through the system. The bit is set high to indicate a field where the data bit (the Aux bit) is valid, and is set low in the next field to provide framing. This bit will alternate between high (read) and low (clear) for each field of 24 video fields allowing the transmission of 12 bits of data (every other field).
 
The Aux4/Aux3 bit is used to transmit the command (4 bits) and the data (8 bits) as follows:
 
 
Command
Data
Bits
1
2
3
4
5
6
7
8
9
10
11
12
 
The meaning of the command bits are:
 
Command
Meaning
Data Represents
0000
Set Preset
Preset Number
0001
Go To Preset
Preset Number
0010
Preset Scan
Dwell Time
0011
Preset Clear
 
 
So, for example, the command to set preset 1 would consist of 12, 0 bits. It will take 24 video fields to send the command with valid command and data bits being present during every other video field (when the clock bit (AKA scan bit) is high).
 

The following diagram shows the timing of a message to go to preset 2. Please note that, while the diagram shows data in the Aux4/Aux3 bit at all times, valid data is not guaranteed to be present when the clock bit (scan bit) is low.
 
 
In this example, data bits 4 and 12 are “on”. This gives us the pattern for the go to preset 2 command, 000100000001.
 
Note that the data bit is held high through the clock cycle. Technically this should not be necessary but this process should be followed to ensure compatibility with future revisions of the Coaxitron product line.
 
In addition to the stream shown above, a preamble is sent to ensure the correct state of the video, and receiver. The preamble consists of two stop commands sent back to back ($0000, $0000). This helps to ensure that the video signal is on and that the receiver is in condition to receive the command.
 
Second Expansion (32 bit Coaxitron)
 
A second expansion of Coaxitron abilities took place with the introduction of variable speed receiver/drivers. The protocol had to be expanded to include speed information in a real time environment. To do this, an extra data line was added. Line 19 of the video holds speed information (line 18 is implemented as shown in the 15 bit format shown above).
 

Pan Speed
Tilt Speed
 

 
 

The speed settings are in the range $00 to $3F and $FF for turbo (high speed) operation.
 
An extended command set was established that uses more of the protocol’s capabilities. For the purposes of this documentation, the Coaxitron signal can be divided up into four, eight-bit bytes. These bytes are frequently referred to as bytes 3 through 6 (see “Digital Coaxitron” below).
 

 
Extended Command Set
 
In addition to “real” Coaxitron, there is a digital version of the protocol that is used with systems supporting a separay wired data channel. This protocol is seven bytes long and is constructed as follows:
 
Cmd 1
Cmd 2
Data 1
Data 2
 
The extended command set to support presets and auxiliaries includes the following commands:
 
Cmd 1 is not used and must be $00.
 
Cmd 2 is:
 
Command
Bits
Hex
 
7
6
5
4
3
2
1
0
 
Set Preset
0
0
0
0
0
0
1
1
$03
Go To Preset
0
0
0
0
0
1
1
1
$07
Set Aux
0
0
0
0
1
0
0
1
$09
Clear Aux
0
0
0
0
1
0
1
1
$0B
Program Aux
0
0
0
0
1
1
0
1
$0D
 
Data 1 is not used and must be $00.
 
Data 2 contains either the preset number (1-32) or the auxiliary number (1-8).
 

 
Digital Coaxitron
 
An extension that allows us to use the same basic protocol contents over a normal asynchronous port (232, 422, 485) is available and is commonly called the “D” protocol.
 
The “D” protocol has some added overhead to improve the reliability of transmissions. The format for a message is:
 
Word 1
Word 2
Word 3
Word 4
Word 5
Word 6
Word 7
Synch Byte
Address
Command 1
Command 2
Data 1
Data 2
Check Sum
 
All values below are shown in hexadecimal (base 16).
 
The synchronization byte is always $FF.
 
The address is the logical address of the receiver/driver being controlled.
 
Command 1 and 2 are as follows:
 
 
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Command 1
Sense
Reserved
Reserved
Auto / Manual Scan
Camera On / Off
Iris Close
Iris Open
Focus Near
Command 2
Focus Far
Zoom Wide
Zoom e
Down
Up
Left
Right
Always 0
 
The sense bit (command 1 bit 7) indicates the meaning of bits 4 and 3. If the sense bit is on and bits 4 and 3 are on the command will enable autoscan and turn the camera on. If the sense bit is off and bits 4 and 3 are on the command will enable manual scan and turn the camera off. Of course, if either bit 4 or bit 3 are off then no action will be taken for those features.
 
The reserved bits (6 and 5) should be set to 0.
 
Word 5 contains the pan speed. Pan speed is in the range $00 (stop) to $3F (high speed) and $FF for “turbo” speed. Turbo speed is the maximum speed the device can obtain and is considered separay because it is not generally a smooth step from high speed to turbo. That is, going from one speed to the next usually looks smooth and will provide for smooth motion with the exception of going into and out of turbo speed.
 
Word 6 contains the tilt speed. Tilt speed is in the range $00 (stop) to $3F (maximum speed).
Word 7 is the check sum. The check sum is the sum of bytes (excluding the synchronization byte) modulo 256.
In addition to the “PTZ” commands shown above, there are control commands that allow you access to the more advanced features of some equipment.
Command
Word 3
Word 4
Word 5
Word 6
Set Preset
00
03
00
01 to 20
Clear Preset
00
05
00
01 to 20
Go To Preset
00
07
00
01 to 20
Flip (180° about)
00
07
00
21
Go To Zero Pan
00
07
00
22
Set Auxiliary
00
09
00
01 to 08
Clear Auxiliary
00
0B
00
01 to 08
Remote Reset
00
0F
00
00
Set Zone Start
00
11
00
01 to 08
Set Zone End
00
13
00
01 to 08
Write Char. To Screen
00
15
X Position 00 to 28
ASCII Value
Clear Screen
00
17
00
00
Alarm Acknowledge
00
19
00
Alarm No.
Zone Scan On
00
1B
00
00
Zone Scan Off
00
1D
00
00
Set Pattern Start
00
1F
00
00
Set Pattern Stop
00
21
00
00
Run Pattern
00
23
00
00
Set Zoom Speed
00
25
00
00 to 03
Set Focus Speed
00
27
00
00 to 03
 
The response to one of these commands is four bytes long. The first byte is the synchronization character (FF), the second byte is the receiver address, the third byte contains the alarm information and the fourth byte is the check sum.

Example messages (all message values are in hexadecimal):
 
Message to send
Message
Receiver 1, Camera on
FF, 01, 88, 00, 00, 00, 89
Receiver 1, Camera off
FF, 01, 08, 00, 00, 00, 09
Receiver 2, Left 1/2 speed
FF, 02, 00, 04, 00, 20, 26
Receiver 2, Stop
FF, 02, 00, 00, 00, 00, 02
Receiver 10, Camera on, Focus far, Left, turbo speed
FF, 0A, 88, 90, 00, 40, 62
 
Note: the check sum calculation for the last message looks like this:
 
0A    00001010
88    10001000
Subtotal 10010010 92
90    10010000
Subtotal 00100010 22 (modulo 256 allows the high bit to roll off)
00    00000000
Subtotal 00100010 22
40    01000000
01100010 62 Final check sum value
 

 
Index
 


422/485....................................................................................... 4
Address................................................................................... 3, 8
Asynchronous........................................................................ 4, 8
Auto scan.................................................................................... 4
Autoscan..................................................................................... 8
Aux1............................................................................................ 4
Aux2............................................................................................ 4
Aux3................................................................................... 4, 5, 6
Aux4................................................................................... 4, 5, 6
Camera off................................................................................. 8
Camera on............................................................................. 6, 8
Check sum........................................................................... 8, 10
Check Sum................................................................................. 8
Clear Aux.................................................................................... 7
Command 1........................................................................... 7, 8
Command 2........................................................................... 7, 8
Data 1..................................................................................... 7, 8
Data 2..................................................................................... 7, 8
Digital Coaxitron............................................................... 8
Dwell Time.................................................................................. 5
Examples.................................................................................. 10
Extended Command Set.................................................... 7
First Expansion (extended 15 bit Coaxitron).......... 5
Fixed speed................................................................................. 4
Go to preset................................................................................ 6
Go To Preset........................................................................... 5, 7
Legal Notices.............................................................................. 3
Manual scan.......................................................................... 4, 8
Notice of Disclaimer................................................................. 3
Origins (15 bit Coaxitron)................................................ 4
Pan speed.................................................................................... 8
Phone........................................................................................... 3
Preset Clear................................................................................. 5
Preset Number............................................................................ 5
Preset Scan................................................................................. 5
Program Aux.............................................................................. 7
Proprietary Notice..................................................................... 3
Pulse width modulated............................................................. 4
PWM............................................................................................ 4
Questions.................................................................................... 3
Scan bit....................................................................................... 5
Second Expansion (32 bit Coaxitron).......................... 6
Sense bit.................................................................................. 4, 8
Set Aux........................................................................................ 7
Set Preset................................................................................ 5, 7
Speed settings............................................................................. 6
Synchronization........................................................................ 8
Tilt speed..................................................................................... 8
Turbo speed........................................................................... 6, 8
Up the coax (UTC).................................................................... 4
Variable speed....................................................................... 4, 6
Vertical blanking interval......................................................... 4
What this manual covers................................................ 4
Word 1......................................................................................... 8
Word 2......................................................................................... 8
Word 3......................................................................................... 8
Word 4......................................................................................... 8
Word 5......................................................................................... 8
Word 6......................................................................................... 8
Word 7......................................................................................... 8


 
上一篇: PELCO CM9765矩阵切换器 下一篇: PELCO-P协议

下载此资料需要您留下相关信息

对本公司产品近期是否有采购需求?

提示

请选择您要拨打的电话: