高分求:谁有控制云台(Pelco协议)的代码?有具体控制代码

audioer 2005-09-12 04:46:24
jxradio@sina.com
...全文
457 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
haichao_ji 2005-09-26
  • 打赏
  • 举报
回复
PELCO "P" PROTOCOL

GENERAL
This section describes the protocol used when sending commands to an Intercept Dome in the “P” version protocol. The protocol uses no parity, one start bit, eight data bits, and one stop bit. The recommended baud rate is 4800 (4800, 8, N, 1, 1).

MESSAGE FORMAT

Byte Value Function
1 $A0 STX (start transmission)
2 $00 to $1F Address
3 Data byte 1 (see below)
4 Data byte 2 (see below)
5 Data byte 3 (see below)
6 Data byte 4 (see below)
7 $AF ETX (end transmission)
8 $00-$FF Check Sum

Byte 1 is always $A0
Byte 2 is the receiver address, set by DIP switch in the receiver
Byte 3-6, see below
Byte 7 is always $AF
Byte 8 is an XOR sum of Bytes 2-6

The protocol is “zero indexed” so that the hexadecimal address sent in the protocol for the first receiver is $00 which corresponds to address 1.

The bits within the “Data bytes” are broken up into two main groups. For Pan and Tilt commands, the functions are determined as follows:

PAN AND TILT COMMANDS

Bit number
7 6 5 4 3 2 1 0
Data 1 0 Camera On Autoscan On Camera on / off Iris Close Iris Open Focus Near Focus Far
Data 2 0 Zoom Wide Zoom Tele Tilt Down Tilt Up Pan Left Pan Right 0 (for pan / tilt)
Data 3 Pan Speed $00 to $3F and $40 for Turbo
Data 4 Tilt Speed $00 to $3F


EXTENDED COMMAND SET

The extended command set will have bit 0 of data byte 2 set and will follow the format in the following table:

Command Data byte 1 Data byte 2 Data byte 3 Data byte 4
Set Preset XX 00 03 00 01 to FF
Clear Preset XX 00 05 00 01 to FF
Go To Preset XX 00 07 00 01 to FF
Flip (rotate 180º) 00 07 00 21
Zero Pan Position 00 07 00 22
Set Aux XX 00 09 00 01 to 08
Clear Aux XX 00 0B 00 01 to 08
Remote Reset 00 0F 00 00
Zone Start 00 11 00 01 to 08
Zone End 00 13 00 01 to 08
Write char to screen 00 15 0 to 28 0 to 7F
Clear Screen 00 17 00 00
Alarm Ack 00 19 00 01 to 08
Zone Scan On 00 1B 00 00
Zone Scan Off 00 1D 00 00
Pattern Start 00 1F 00 00
Pattern Stop 00 21 00 00
Run Pattern 00 23 00 00
Zoom Lens Speed 00 25 00 00 to 03
Focus Lens Speed 00 27 00 00 to 03

The receiver will respond with an ACK.

To accommodate features of new systems and maintain compatibility with our old systems, some functions have been added through the use of some of the unused preset functions. These are:

Preset Number Function
99 Begin Auto-scan
98 Begin Frame Scan
97 Begin Random Scan
96 Stop Scan
95 Enter Menu Mode
94 Remote Reset
93 Set Right Limit Stop
92 Set Left Limit Stop
34 Home (return to 0 pan position)
33 Flip
haichao_ji 2005-09-26
  • 打赏
  • 举报
回复
谁做过pelco p的能给说说他们提供的协议到底对不对吗?我的pelco d调试好了,但是p就是不行,觉得他最后给的sample好像是错的
To SET PRESET 32 in the receiver with address 1, the command string (in Hexidecimal) would be:

A0 01 00 03 00 20 AF 17 (the last byte is the XOR sum of bytes 2 through 6)
校验不对阿
nwpulipeng 2005-09-26
  • 打赏
  • 举报
回复
jf
rabo 2005-09-13
  • 打赏
  • 举报
回复
帕尔高又分好几种协议,什么D呀,什么P呀。多着呢。我有,但是是公司的,不能给,不好意思。你的球机开发商应该要提供的。
audioer 2005-09-13
  • 打赏
  • 举报
回复
没有吗?
audioer 2005-09-13
  • 打赏
  • 举报
回复
????
weiym 2005-09-12
  • 打赏
  • 举报
回复
up
saliors 2005-09-12
  • 打赏
  • 举报
回复
搜索一下吧
bobob 2005-09-12
  • 打赏
  • 举报
回复
====非技术
wshcdr 2005-09-12
  • 打赏
  • 举报
回复
友情UP

1,649

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 非技术类
社区管理员
  • 非技术类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧