PELCO-D协议 要点整理

2023-05-16

 

消息格式:

Byte 1Byte 2Byte 3Byte 4Byte 5Byte 6Byte 7
Sync ByteAddressCommand 1Command 2Data 1Data 2Checksum


The synchronization byte (Sync Byte) is always 0xFF
 

The Address is the logical address of the receiver/driver device being controlled.
 

The Checksum is calculated by performing an 8 bit (modulo 256) sum of the payload bytes (bytes 2 through 6)
in the message.
 

CommandByte 3Byte 4Byte 5Byte 6Response Type
Standard Extended
Response
Type
Ack/
Nack
0x01/1Additional InfoAdditional InfoN/A
Set Preset000x03/300Preset idGeneral
Clear Preset000x05/500Preset idGeneral
Go To Preset000x07/700Preset idGeneral
Flip (180° about)000x07/7000x21/33General
Go To Zero Pan000x07/7000x22/34General
Set Auxiliary000x09/90001-08General
Clear Auxiliary000x0B/110001-08General
Dummy000x0D/130000None
Remote Reset000x0F/150000General
Set Zone Start000x11/170001-08General
Set Zone End000x13/190001-08General
Write Character to
Screen
000x15/21Column 00 to
0x27/39
ASCII ValueGeneral
Clear Screen000x17/230000General
Alarm Acknowledge000x19/250001-08General
Zone Scan On000x1B/270000General
Zone Scan Off000x1D/290000General
Set Pattern Start000x1F/3100Pattern idGeneral
Set Pattern Stop000x21/330000General
Run Pattern000x23/3500Pattern idGeneral
Set Zoom Speed000x25/370000-03General
Set Focus Speed000x27/390000-03General
Reset Camera defaults000x29/410000General
Auto-focus auto/on/off000x2B/430000-02General
Auto Iris auto/on/off000x2D/450000-02General
AGC auto/on/off000x2F/470000-02General
Backlight
compensation on/off
000x31/490001-02General
Auto white balance
on/off
000x33/510001-02General
Enable device phase
delay mode
000x35/530000General
Set shutter speed000x37/55Speed MSBSpeed LSBGeneral
Adjust line lock phase
delay
00-
01
0x39/57Delay MSBDelay LSBGeneral
Adjust white balance
(R-B)
00-
01
0x3B/59WB-RB MSBWB-RB LSBGeneral
Adjust white balance
(M-G)
00-
01
0x3D/61WB-MG MSBWB-MG LSBGeneral
Adjust gain00-
01
0x3F/63Gain MSBGain LSBGeneral
Adjust auto-iris level00-
01
0x41/6500AIL valueGeneral
Adjust auto-iris peak
value
00-
01
0x43/6700AIP valueGeneral
Query1000x45/69AnyAnySee “Responses” part of this document.

 

Preset Scan000x47/7100DwellGeneral
Set Zero Position000x49/730000General
Set Pan Position000x4B/75Pan position
MSB
Pan position
LSB
General
Set Tilt Position000x4D/77Tilt position
MSB
Tilt position
LSB
General
Set Zoom Position000x4F/79Zoom position
MSB
Zoom position
LSB
General
Query Pan Position000x51/810000Extended (0x59)
Query Tilt Position000x53/830000Extended (0x5B)
Query Zoom Position000x55/850000Extended (0x5D)
Download000x57/870000General
Query Pan Response000x59/89Pan position
MSB
Pan position
LSB
Not Applicable
Query Tilt Response000x5B/91Tilt position
MSB
Tilt position
LSB
Not Applicable
Query Zoom Response000x5D/93Zoom position
MSB
Zoom position
LSB
Not Applicable
Set Magnification000x5F/95Mag position
MSB
Mag position
LSB
General
Query Magnification000x61/970000Extended (0x63)
Query Magnification
Response
000x63/99Mag position MSBMag position LSBNot Applicable
Activate Echo Mode000x65/1010000General
Set Remote Baud Rate000x67/1030000-05General
Start Download000x69/1050000General
Query Device Type000x6B/1070000Extended (0x6D)
Query Device Type
Response
000x6D/109Software TypeHardware TypeNot Applicable
Query Diagnostic Info000x6F/1110000Extended (0x71)
Query Diagnostic Info
Response
000x71/113Device DependentDevice DependentNot Applicable
Version Information
Macro Opcode
Sub
Op
code
0x73/115VariousVariousExtended
(multiple)
Everest Macro OpcodeSub
Op
Code
0x75/117VariousVariousExtended
(multiple)
Return Status000xFD/2530000Firmware status
Invalid op code000xFF/2550000None

 

 

 

 

 

通讯协议

基本协议采用PELCOD协议,通讯接口为RS232,波特率为9600,固定地址为1

  1. 通讯格式:

BYTE

VALUE

FUNCTION

1

FF

STX (start transmission)

2

01 TO 1F

Address(固定为1)

3

Data byte 1

 

4

Data byte 2

 

5

Data byte 3

 

6

Data byte 4

 

7

00-FF

Checksum(add byte 2,3,4,5,6)

  1. 云台和镜头命令:

Bit number

7

6

5

4

3

2

1

0

Data1

0

0

0

0

0

Iris close

Iris open

Focus near

Data2

Focus far

Zoom wide

Zoom tele

Tilt down

Tilt   up

Pan left

Pan right

0 (for pan/tilt)

1 (extended)

Data3

Pan speed 00 to 3F and 40 for turbo

Data4

Tilt speed 00 to 3F

  1. 扩展命令:(模块控制球机云台命令分类)字节都为十六进制

COMMAND

DATA BYTE1

DATA BYTE2

DATA BYTE3

DATA BYTE4

预置位设置

00

03

00

0x01 to 0Xff

清除预置位

00

05

00

0x01 to 0Xff

调用预置位

00

07

00

0x01 to 0Xff

水平180度翻转

00

07

00

0x21

水平、俯仰零位检测

00

07

00

0x22

设置俯仰上限位

00

03/07

00

0x5A

清除俯仰上限位

00

05

00

0x5A

设置俯仰下限位

00

03/07

00

0x5B

清除俯仰下限位

00

05

00

0x5B

设置水平左限位

00

03/07

00

0x5C

清除水平左限位

00

05

00

0x5C

设置水平右限位

00

03/07

00

0x5D

清除水平右限位

00

05

00

0x5D

设置削苹果扫描

00

05

00

0x61

运行削苹果扫描

00

07

00

0x61

运行自动扫描

00

07

00

0x63

停止电机

00

03/07

00

0X60

 

 

 

 

 

辅助开关设置

00

09

00

0x01 to 0x08(02)

辅助开关清除

00

0B

00

0x01 to 0x08(02)

(取消此命令)虚拟零位设置保存

00

31

00

0x02

(取消此命令)虚拟零位设置删除

00

31

00

0x03

云台复位

00

33

00

00/01

 

 

 

 

 

 

COMMAND

DATA BYTE1

DATA BYTE2

DATA BYTE3

DATA BYTE4

自动翻转开关

00

25

00

0x01

关(默认)

00

25

00

0x00

水平扫描速度(影响自动扫描速度和削苹果扫描速度)默认10度/秒

1度/秒

00

2B

00

0x01

2度/秒

00

2B

00

0x02

。。。

。。。

。。。

。。。

。。。

40度/秒

00

2B

00

0x28

俯仰扫描速度(影响自动扫描速度和削苹果扫描速度)默认10度/秒

1度/秒

00

29

00

0x01

2度/秒

00

29

00

0x02

。。。

。。。

。。。

。。。

。。。

20度/秒

00

29

00

0x14

手动限位开关

00

2D

00

0x01

关(默认)

00

2D

00

0x00

扫描限位开关

00

2F

00

0x01

关(默认)

00

2F

00

0x00

Set Pan Position(angle)

上位机设置水平位置(角度)

00

0x4B

PAN  MSB

PAN  LSB

Set Tilt Position(angle)

上位机设置俯仰位置(角度)

00

0x4D

TIL  MSB

TIL  LSB

Query pan angle

查询水平角度

00

51

00

00

Query til angle

查询俯仰角度

00

53

00

00

Set Pan Tilt Position(angle)

上位机设置水平俯仰位置(角度)

PAN(HIG 4BIT)+TIL(HIG 4BIT)

0X55

PAN LSB

TIL LSB

Set Pan Position

上位机设置水平位置(微步)

PAN  H(24B)

0x81

PAN  M(16B)

PAN  L(8B)

Set Tilt Position

上位机设置俯仰位置(微步)

TIL  H(24B)

0x83

TIL  M(16B)

TIL  L(8B)

SET RETURN_PT ANGLE TIME

设置自动返回角度的时间(默认为500ms

00

85

00

TIME

设置 自动返回角度开/关(默认为开

设置返回开关

00

87

00

00/01

关/开

自动返回角度类型。(默认为步数+微步数返回

自动返回角度类型。

00

87

01

00/01/02

步数+微步数/角度/ 微步数/

模块发送相机型号(默认为SC110

发送相机型号

00

39

00

Various1

查询球机状态

查询球机状态

00

47

00

00

发送变倍位置

发送变倍位置

00

37

ZOOMMSB

ZOOMLSB

4.球机发送命令控制模块协议

网络板硬件复位

00

35

00

0x00

报警输入1报警

00

37

00

0x00/0x01

查询相机型号

00

45

00

00

云台返回水平位置

0x00

0x59

PAN MSB

PAN LSB

云台返回俯仰位置

0x00

0x5B

TILT MSB

TILT LSB

云台出厂复位时发送复位信息给模块

0x00

0x3B

0x00

0x00

▲光敏电阻日夜检测(相机彩转黑命令)

0x00

0x4F

0x00

0x00

0x00

0x4F

0x00

0x01

查询当前变倍

0X00

0X65

0X00

0X00

反馈云台状态

0X00

0X67

Various1

Various2

 

 

 

 

 

       

 

 

注:报警协议是云台主动发送报警信息给网络模块的。

1. 触发报警发送 0X01.报警撤消发送 0X00.

2. 当云台上电5分钟内,每分钟发一次当前的报警信息给网络模块。之后当有报警信息变化才发送信息给网络模块。

3.数据反馈通讯

 

  1. 设置水平位置:水平位置(微步数)PAN  H(24B)<<16+PAN  M(16B)<<8+PAN  L(8B).

5. 设置俯仰位置:俯仰位置(微步数)=TIL  H(24B)<<16+TIL  M(16B)<<8+TIL  L(8B).

 

注:水平位置与俯仰位置均为微步数。

 

 

 

5. 发送变倍位置

注:如日立SC110相机。模块发查询变倍指令给相机(:rF7140000)相机反馈命令(如:H’WXYZ )

模块就发命令(FF 01 00 37 WX YZ   CHECKSUM)

当云台需要查询变倍时(FF 01 00 65 00 00 66)。模块也要将变倍位置发下来。

 

 

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

PELCO-D协议 要点整理 的相关文章

随机推荐