消息格式:
Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
Sync Byte | Address | Command 1 | Command 2 | Data 1 | Data 2 | Checksum |
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.
Command | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Response Type |
Standard Extended Response | Type Ack/ Nack | 0x01/1 | Additional Info | Additional Info | N/A |
Set Preset | 00 | 0x03/3 | 00 | Preset id | General |
Clear Preset | 00 | 0x05/5 | 00 | Preset id | General |
Go To Preset | 00 | 0x07/7 | 00 | Preset id | General |
Flip (180° about) | 00 | 0x07/7 | 00 | 0x21/33 | General |
Go To Zero Pan | 00 | 0x07/7 | 00 | 0x22/34 | General |
Set Auxiliary | 00 | 0x09/9 | 00 | 01-08 | General |
Clear Auxiliary | 00 | 0x0B/11 | 00 | 01-08 | General |
Dummy | 00 | 0x0D/13 | 00 | 00 | None |
Remote Reset | 00 | 0x0F/15 | 00 | 00 | General |
Set Zone Start | 00 | 0x11/17 | 00 | 01-08 | General |
Set Zone End | 00 | 0x13/19 | 00 | 01-08 | General |
Write Character to Screen | 00 | 0x15/21 | Column 00 to 0x27/39 | ASCII Value | General |
Clear Screen | 00 | 0x17/23 | 00 | 00 | General |
Alarm Acknowledge | 00 | 0x19/25 | 00 | 01-08 | General |
Zone Scan On | 00 | 0x1B/27 | 00 | 00 | General |
Zone Scan Off | 00 | 0x1D/29 | 00 | 00 | General |
Set Pattern Start | 00 | 0x1F/31 | 00 | Pattern id | General |
Set Pattern Stop | 00 | 0x21/33 | 00 | 00 | General |
Run Pattern | 00 | 0x23/35 | 00 | Pattern id | General |
Set Zoom Speed | 00 | 0x25/37 | 00 | 00-03 | General |
Set Focus Speed | 00 | 0x27/39 | 00 | 00-03 | General |
Reset Camera defaults | 00 | 0x29/41 | 00 | 00 | General |
Auto-focus auto/on/off | 00 | 0x2B/43 | 00 | 00-02 | General |
Auto Iris auto/on/off | 00 | 0x2D/45 | 00 | 00-02 | General |
AGC auto/on/off | 00 | 0x2F/47 | 00 | 00-02 | General |
Backlight compensation on/off | 00 | 0x31/49 | 00 | 01-02 | General |
Auto white balance on/off | 00 | 0x33/51 | 00 | 01-02 | General |
Enable device phase delay mode | 00 | 0x35/53 | 00 | 00 | General |
Set shutter speed | 00 | 0x37/55 | Speed MSB | Speed LSB | General |
Adjust line lock phase delay | 00- 01 | 0x39/57 | Delay MSB | Delay LSB | General |
Adjust white balance (R-B) | 00- 01 | 0x3B/59 | WB-RB MSB | WB-RB LSB | General |
Adjust white balance (M-G) | 00- 01 | 0x3D/61 | WB-MG MSB | WB-MG LSB | General |
Adjust gain | 00- 01 | 0x3F/63 | Gain MSB | Gain LSB | General |
Adjust auto-iris level | 00- 01 | 0x41/65 | 00 | AIL value | General |
Adjust auto-iris peak value | 00- 01 | 0x43/67 | 00 | AIP value | General |
Query1 | 00 | 0x45/69 | Any | Any | See “Responses” part of this document. |
Preset Scan | 00 | 0x47/71 | 00 | Dwell | General |
Set Zero Position | 00 | 0x49/73 | 00 | 00 | General |
Set Pan Position | 00 | 0x4B/75 | Pan position MSB | Pan position LSB | General |
Set Tilt Position | 00 | 0x4D/77 | Tilt position MSB | Tilt position LSB | General |
Set Zoom Position | 00 | 0x4F/79 | Zoom position MSB | Zoom position LSB | General |
Query Pan Position | 00 | 0x51/81 | 00 | 00 | Extended (0x59) |
Query Tilt Position | 00 | 0x53/83 | 00 | 00 | Extended (0x5B) |
Query Zoom Position | 00 | 0x55/85 | 00 | 00 | Extended (0x5D) |
Download | 00 | 0x57/87 | 00 | 00 | General |
Query Pan Response | 00 | 0x59/89 | Pan position MSB | Pan position LSB | Not Applicable |
Query Tilt Response | 00 | 0x5B/91 | Tilt position MSB | Tilt position LSB | Not Applicable |
Query Zoom Response | 00 | 0x5D/93 | Zoom position MSB | Zoom position LSB | Not Applicable |
Set Magnification | 00 | 0x5F/95 | Mag position MSB | Mag position LSB | General |
Query Magnification | 00 | 0x61/97 | 00 | 00 | Extended (0x63) |
Query Magnification Response | 00 | 0x63/99 | Mag position MSB | Mag position LSB | Not Applicable |
Activate Echo Mode | 00 | 0x65/101 | 00 | 00 | General |
Set Remote Baud Rate | 00 | 0x67/103 | 00 | 00-05 | General |
Start Download | 00 | 0x69/105 | 00 | 00 | General |
Query Device Type | 00 | 0x6B/107 | 00 | 00 | Extended (0x6D) |
Query Device Type Response | 00 | 0x6D/109 | Software Type | Hardware Type | Not Applicable |
Query Diagnostic Info | 00 | 0x6F/111 | 00 | 00 | Extended (0x71) |
Query Diagnostic Info Response | 00 | 0x71/113 | Device Dependent | Device Dependent | Not Applicable |
Version Information Macro Opcode | Sub Op code | 0x73/115 | Various | Various | Extended (multiple) |
Everest Macro Opcode | Sub Op Code | 0x75/117 | Various | Various | Extended (multiple) |
Return Status | 00 | 0xFD/253 | 00 | 00 | Firmware status |
Invalid op code | 00 | 0xFF/255 | 00 | 00 | None |
通讯协议
基本协议采用PELCO的D协议,通讯接口为RS232,波特率为9600,固定地址为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) |
- 云台和镜头命令:
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 |
- 扩展命令:(模块控制球机云台命令分类)字节都为十六进制
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.数据反馈通讯
- 设置水平位置:水平位置(微步数)=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(使用前将#替换为@)