7

Pelco uses 2 different protocols to send PTZ (Pan, Tilt, Zoom) commands to cameras: Pelco D and Pelco P. I'd like to understand the difference from a high-level perspective. Are they meant for different use cases? Is one more feature-complete than the other? What are their practical differences?


What I've found so far

There are unofficial tutorials for both of them (Pelco D, Pelco P), but they just say that

Pelco-D is a popular PTZ (Pan / Tilt / Zoom) camera control protocol used in the CCTV industry.

Besides Pelco-D, Pelco-P is another popular PTZ (Pan / Tilt / Zoom) camera control protocol used in the CCTV industry.

which doesn't really help.

Then there's this thread where a user says that

  • D Protocol is a type serial protocol of sending/receiving data from the controller to camera for the pan /tilt and zoom functions. In D protocol separate data cable is required rather than the cable for video.
  • P Protocol is a type of superimposing the data signal over the video signal in the same cable (i.e. in case of coaxial cable transmission same coaxial cable will be used to carry the data signal along with the video without additional cables).

But another user replied that this description is wrong:

You are right about D Protocol but P and D are similar, both needing a separate control wire. What you think P Protocol is actually is called Coaxitron. Coaxitron sends the control over the coaxial cable. D and P differ on baud rates and max units able to control but are pretty similar. Coaxitron control needs both a coaxitron able camera plus a coaxitron able controller like a CXT or a MXB with coaxitron capability. Pelco's new network video recording system Endura also uses coaxitron. As you can probably tell Coaxitron is a Pelco thing, i'm not sure if any other manufacturer uses it. The only road block with it is that it can't send control through any active transmission system like a Signal Amplifier or a Powered UTP unit. Hope this helps.

Both messages are very old (from 2005 and 2006).

Another user there said he worked for Pelco and left his email address; by googling it I was able to find this question on Electronics Stack Exchange which says that Pelco P is an earlier version. The same employee answered and then commented that he is no longer working for Pelco.

This is all I've found. Can anybody tell me more about the difference between Pelco D and Pelco P?

1
  • the tutorials that you linked say a lot more than what you stated – jsotola Aug 23 '19 at 6:43
4

Both protocols are usually transmitted using RS485 over a pair of wires. You can have the same pair of wires running to multiple cameras with each camera having a different address. The maximum length for RS485 is about 1200m which makes it ideal for running between the cameras. There are various pieces of equipment you can use to combine the RS485 and the video signal into a single coaxial cable at one end and then split it back into 2 at the other but that is separate from the protocol.

Pelco-D
Byte 1 - Start transmission - always 0xFF
Byte 2 - Address of camera
Byte 3 - Command 1
Byte 4 - Command 2
Byte 5 - Data 1
Byte 6 - Data 2
Byte 7 - Checksum
Pelco-P
Byte 1 - Start transmission. Always 0xA0
Byte 2 - Address of camera - Range 0x00 to 0x1F
Byte 3 - Command 1
Byte 4 - Command 2
Byte 5 - Data 1
Byte 6 - Data 2
Byte 7 - End Transmission. Always 0xAF
Byte 8 - Checksum 

Pelco P addresses 32 cameras whereas Pelco D can address 256. Pelco D has extra commands for AGC, backlight compensation, white balance and gain. It also has commands to query the PTZ position and to explicitly set the PTZ position.

3

Pelco P is the older of the two protocols and is deprecated; Pelco D is newer and has more functionality. Both protocols use RS-422 at 2400, 4800, or 9600 bps, but support for the various speeds is hardware-dependent. Some cameras such as Spectra IV domes auto-sense the protocol and switch between P and D automatically, while others require that P or D be set explicitly via DIP switches.

Pelco P supports 32 cameras. It uses zero-based addressing internally, but one-based addressing for anything user facing (as you can see in the linked document). For example, to address a camera as Pelco P #1, you set all of its address DIP switches to OFF (binary 0) and set the address byte to 0 (zero) in the Pelco P message.

Pelco D, on the other hand, supports 254 cameras. Address 0 is unused, while address 255 (0xFF) is the Pelco D start flag and is, therefore, reserved. Pelco D does not have any of zero-vs-one-based addressing confusion as does P: to address a camera as Pelco D #1, you set its first address DIP switch to ON and all others to OFF (binary 1) and set the address byte to 1 in the Pelco D message.

Now, since the DIP switch setting for Pelco D #1 also happens to correspond to Pelco P #2, you can also communicate with this same camera (assuming it auto switches between D and P) by sending it a Pelco P message with the address byte set to 1. Confused yet? Also, with Pelco P, you tell the technician to set the camera to address 2 by setting the DIP switches to a binary value of 1! It's for these reasons, plus the fact that it's newer and more functional, that I prefer Pelco D in code and in practice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.