pelco-d 协议指南

Pelco-D 是一种用在CCTV产业上颇受欢迎的PTZ(Pan水平/Tilt竖直/Zoom放大)相机控制协议。

Pelco-D的格式

Pelco-D包含7字节(本文中所有字节数据都是16进制,除非特别声明

Byte 1Byte 2Byte 3Byte 4Byte 5Byte 6Byte 7
SyncCamera AddressCommand 1Command 2Data 1Data 2Checksum
  • Byte 1 (Sync) - 同步字节, 固定为 FF
  • Byte 2 (Camera Address) - 被控制相机的逻辑地址 (地址1 表示为 01)
  • Byte 3 & 4 (命令1 和 2)  如下表所示
  • Byte 5 (Data 1) - 水平速度, 值从 00 (停止) 到 3F (高速) 和 FF 涡轮增压速度 (设备水平移动的最大速度)
  • Byte 6 (Data 2) - 竖直速度, 值从 00 (停止) 到 3F (最大速度)
  • Byte 7 (校验和) - 字节和 (不包含同步字节), 然后对100 (十进制数256)取余

命令1 and 2 详情

Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
Command 1SenseReservedReservedAuto / Manual ScanCamera On/OffIris CloseIris OpenFocus Near
Command 2Focus FarZoom WideZoom TeleTilt DownTilt UpPan LeftPan RightFixed to 0

示例 (命令 2):
水平左转 - 0 0 0 0 0 1 0 0, 这等于 04

一些其它指令:

CommandByte 3Byte 4Byte 5Byte 6
Go to Preset00070001 to FF
Set Zoom Speed00250000 to 33
Set Focus Speed00270000 to 33
Alarm Ack.001900Alarm no.

一些常用的控制指令:

FunctionByte1Byte2Byte3Byte4Byte5Byte6Byte7
Up0xFFAddress0x000x08Pan SpeedTilt SpeedSUM
Down0xFFAddress0x000x10Pan SpeedTilt SpeedSUM
Left0xFFAddress0x000x04Pan SpeedTilt SpeedSUM
Right0xFFAddress0x000x02Pan SpeedTilt SpeedSUM
Upleft0xFFAddress0x000x0CPan SpeedTilt SpeedSUM
Upright0xFFAddress0x000x0APan SpeedTilt SpeedSUM
DownLeft0xFFAddress0x000x14Pan SpeedTilt SpeedSUM
DownRight0xFFAddress0x000x12Pan SpeedTilt SpeedSUM
Zoom In0xFFAddress0x000x200x000x00SUM
Zoom Out0xFFAddress0x000x400x000x00SUM
Focus Far0xFFAddress0x000x800x000x00SUM
Focus Near0xFFAddress0x010x000x000x00SUM
Set Preset0xFFAddress0x000x030x00Preset IDSUM
Clear Preset0xFFAddress0x000x050x00Preset IDSUM
Call Preset0xFFAddress0x000x070x00Preset IDSUM
Query Pan Position0xFFAddress0x000x510x000x00SUM
Query Pan Position Response0xFFAddress0x000x59Value High ByteValue Low ByteSUM
Query Tilt Position0xFFAddress0x000x530x000x00SUM
Query Tilt Position Response0xFFAddress0x000x5BValue High ByteValue Low ByteSUM
Query Zoom Position0xFFAddress0x000x550x000x00SUM
Query Zoom Position Response0xFFAddress0x000x5DValue High ByteValue Low ByteSUM

参考文章: 

  1. PELCO-D PROTOCOL TUTORIAL
  2. PELCO-D protocol command list
  3. How to Troubleshoot PTZ Control Issues (pelco官网文档,比较全面,但是国内访问加载有问题)
TABLE OF CONTENTS DOCUMENT HISTORY.............................................................................................................................................................3 LEGAL NOTICES.......................................................................................................................................................................4 NOTICE OF DISCLAIMER..............................................................................................................................................................4 PROPRIETARY NOTICE.................................................................................................................................................................4 QUESTIONS..................................................................................................................................................................................4 WHAT THIS MANUAL COVERS.............................................................................................................................................5 THE BYTE FORMAT.................................................................................................................................................................5 THE MESSAGE FORMAT.........................................................................................................................................................5 The Standard Command Set.......................................................................................................................................................6 Extended Commands..................................................................................................................................................................7 Advanced Feature Set.................................................................................................................................................................8 Creating Labels...........................................................................................................................................................................9 EXAMPLE MESSAGES...................................................................................................................................................................9 Responses.................................................................................................................................................................................10 Opcode Descriptions.................................................................................................................................................................12 APPENDIX A..............................................................................................................................................................................16 ADVANCED FEATURE COMMANDS............................................................................................................................................16 APPENDIX B..............................................................................................................................................................................18 DETAILS OF DOCUMENT CHANGES............................................................................................................................................18 INDEX.........................................................................................................................................................................................20
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值