Pelco-D is a popular PTZ (Pan / Tilt / Zoom) camera control protocol used in the CCTV industry. (Click here to visit Pelco's website.)
This page will explain the following topics in details:
1) The format of Pelco-D
2) How to calculate the checksum byte by using 232Analyzer
3) Pelco-D command string examples
4) How to use 232Analyzer to control the Pelco-D cameras
5) Have fun playing with 232Analyzer and Pelco-D cameras
After reading this page and testing the camera with the 232Analyzer software , you should be able to understand the ease of using the Pelco-D protocol, and
control any Pelco-D cameras in five minutes' time.
Notes:
1) Before you can control any Pelco-D cameras, you need to prepare the following items:
- A PC running 232Analyzer program
- An RS-232 port (or USB / RS-232 converter)
- An RS232 / RS485 converter
2) Make sure your COM port settings in the 232Analyzer program matches with camera's settings (Pelco-D cameras use No parity, 8 Data bits and 1 Stop bit, baud
rate depends on your camera setting)
(Click here to download the 232Analyzer FREE Version. Click here to download Pelco-D / P device profiles)
1) The format of Pelco-D
Pelco-D consists of 7 hexadecimal bytes (all byte data used in this page are in Hexadecimal format unless otherwise specified).
Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7
Sync
Camera
Address
Command 1 Command 2 Data 1 Data 2 Checksum
Byte 1 (Sync) - the synchronization byte, fixed to FF
Byte 2 (Camera Address) - logical address of the camera being controlled (Address 1 is 01)
Byte 3 & 4 (Command 1 and 2) are shown below
Byte 5 (Data 1) - pan speed, range from 00 (stop) to 3F (high speed) and FF for "turbo" speed (the maximum pan speed that the device can go)speed speed speed speed
Byte 6 (Data 2) - tilt speed, range from 00 (stop) to 3F (maximum speed)speed speed
Byte 7 (Checksum) - sum of bytes (excluding the synchronization byte), then modulo 100 (Decimal code: 256)
Command 1 and 2 details
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 Tele Tilt Down Tilt Up Pan Left Pan Right Fixed to 0
Example (Command 2):
Pan Left - 0 0 0 0 0 1 0 0, which equals to 04 (both hexadecimal and decimal)
Some other commands
Command Byte 3 Byte 4 Byte 5 Byte 6
COMMUNITY
评论5