PELCO D_P協(xié)議_第1頁
PELCO D_P協(xié)議_第2頁
PELCO D_P協(xié)議_第3頁
PELCO D_P協(xié)議_第4頁
PELCO D_P協(xié)議_第5頁
已閱讀5頁,還剩13頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

PELCO D、P通訊協(xié)議一、PELCO協(xié)議介紹1、PELCO主控與前端解碼器是通過RS422RS485通信格式傳輸。2、除PELCO原裝設(shè)備支持RS422和RS485兼容接口,國內(nèi)大部分廠家主控和接收設(shè)備僅支持RS485接口,RS485接口是半雙工通信模式,即發(fā)送端發(fā)過去的控制命令,只管發(fā)出去,不管你收不收得到,有的廠家連續(xù)發(fā),有的間隔發(fā),總類很多。停止命令往往發(fā)1、2條。如PELCOPANASONIC、三星等大廠做的通信接口,主控發(fā)出去命令,接收端收到命令返回SCK命令給主控,叫回答命令,告知發(fā)送端我已收到命令,不用再發(fā)了,這就是RS422通信模式的一種用途。3、PELCO協(xié)議內(nèi)容包括云臺控制命令、攝像機控制命令、輔助控制命令、預(yù)置位設(shè)置和調(diào)用命令。注意:網(wǎng)上PELCO協(xié)議版本眾多,建議看家選擇英文版本,中文版本很多錯誤。4、Pelco P protocol details are proprietary, non-public documents. In almost all cases, Pelcos publicly available ASCII, G, or D protocols can be used in place of Pelco P with the appropriate translator. Pelco Product Support technicians may be able to assist you in obtaining the use of these protocols for your application. ASCII, G, and D protocols can be obtained be filling out our online registration form locatedhere. For further assistance please contact Pelco Product Support at (800)298-9100 or (559)292-1981. 二、PELCO-D協(xié)議數(shù)據(jù)格式:1位起始位、8位數(shù)據(jù)、1位停止位,無效驗位。波特率:2400bps.命令格式:Byte 1Byte 2Byte 3Byte 4Byte 5Byte 6Byte 7同步字地址碼命令字1命令字2數(shù)據(jù)1數(shù)據(jù)2校驗碼1.該協(xié)議中所有數(shù)值都為十六進制數(shù) 2.同步字節(jié)始終為FFH 3.地址碼為攝像機的邏輯地址號,地址范圍:00HFFH 4.指令碼表示不同的動作,在有關(guān)預(yù)制點的操作時,數(shù)據(jù)2表示預(yù)制點值5.數(shù)據(jù)1、2分別表示水平、垂直方向速度(00-3FH),F(xiàn)FH表示“turbo”速度6.校驗碼 = MOD(字節(jié)2 + 字節(jié)3 + 字節(jié)4 + 字節(jié)5 + 字節(jié)6)/100H 命令字 1和命令字2設(shè)置如下: Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0命令字1Sence碼00自動/手動掃描攝像機打開/關(guān)閉光圈關(guān)閉光圈打開焦距拉遠(yuǎn)命令字2焦距拉近視角變寬視角變窄下上左右0Sence碼與Bit4和Bit3有關(guān)。在Bit4和Bit3為1的情況下,如果Sence碼為1,則命令就是自動掃描和和攝像機打開;如果Sence碼為0,則命令就是手動掃描和攝像機關(guān)閉。當(dāng)然如果Bit4或Bit3為0的話那命令就無效了。常用命令列表:序號命令字功能10x00 0x08上 20x00 0x10下 30x00 0x04左 40x00 0x02右 50x00 0x20變倍短 60x00 0x40變倍長 70x00 0x80聚焦近 80x01 0x00聚焦遠(yuǎn) 90x02 0x00光圈小 100x04 0x00光圈大 110x00 0x0b燈光關(guān) 120x00 0x09燈光開 130x00 0x07轉(zhuǎn)至預(yù)置點140x00 0x03設(shè)置預(yù)置點150x00 0x05刪除預(yù)置點160x00 0x00停止關(guān)于云臺自動功能如何實現(xiàn),云臺的自動功能是做到解碼板電路,有多種硬件電路方法,也有軟件檢測限位開關(guān)或者光耦中斷來控制左和右自動掃描。但上面協(xié)議表是沒有自動命令,在P協(xié)議里AUTOPAN命令是CALL 99號預(yù)置位。在D協(xié)議里是沒有定義,編程者可以定義CALL #NO來實現(xiàn)。D協(xié)議特殊命令控制表:CommandWord 3Word 4Word 5Word 6Set Preset000300 常用01 to 20Clear Preset000500 常用01 to 20Go To Preset000700 常用01 to 20Flip (180 about)000700 常用21Go To Zero Pan000700 常用22Set Auxiliary000900 常用01 to 08Clear Auxiliary000B00 常用01 to 08Remote Reset000F00 常用00Set Zone Start001100 不常用01 to 08Set Zone End001300 不常用01 to 08Write Char. To Screen0015X Position 00 to 28 不常用ASCII ValueClear Screen001700不常用00Alarm Acknowledge001900不常用Alarm No.Zone Scan On001B00不常用00Zone Scan Off001D00不常用00Set Pattern Start001F00不常用00Set Pattern Stop002100不常用00Run Pattern002300不常用00Set Zoom Speed002500不常用00 to 03Set Focus Speed002700不常用00 to 03以地址碼0x01為例: 0xff,0x01,0x00,0x08,0x00,0xff,0x08,/上 0xff,0x01,0x00,0x10,0x00,0xff,0x10,/下 0xff,0x01,0x00,0x04,0xff,0x00,0x04,/左 0xff,0x01,0x00,0x02,0xff,0x00,0x02,/右 0xff,0x01,0x00,0x20,0x00,0x00,0x21,/變倍短 0xff,0x01,0x00,0x40,0x00,0x00,0x41,/變倍長 0xff,0x01,0x00,0x80,0x00,0x00,0x81,/聚焦近 0xff,0x01,0x01,0x00,0x00,0x00,0x02,/聚焦遠(yuǎn) 0xff,0x01,0x02,0x00,0x00,0x00,0x03,/光圈小 0xff,0x01,0x04,0x00,0x00,0x00,0x05,/光圈大 0xff,0x01,0x00,0x0b,0x00,0x01,0x0d,/燈光關(guān) 0xff,0x01,0x00,0x09,0x00,0x01,0x0b,/燈光開 0xff,0x01,0x00,0x07,0x00,0x01,0x09,/轉(zhuǎn)至預(yù)置點001 0xff,0x01,0x00,0x03,0x00,0x01,0x05,/設(shè)置預(yù)置點001 0xff,0x01,0x00,0x05,0x00,0x01,0x07,/刪除預(yù)置點001 以上對應(yīng)的停命令均是: 0xff,0x01,0x00,0x00,0x00,0x00,0x01,/停命令 三、PELCO-P協(xié)議PELCO-P協(xié)議一般采用RS-485傳輸。數(shù)據(jù)格式:波特率為4800,1位起始位和停止位,8位數(shù)據(jù)位,無校驗。命令格式:ByteValueFunction1$A0起始碼STX2$00 to $1F地址碼3Data byte 1數(shù)據(jù)位1(指令碼1)4Data byte 2 數(shù)據(jù)位2(指令碼2)5Data byte 3 數(shù)據(jù)位36Data byte 4 數(shù)據(jù)位47$AF 停止碼ETX8$00-$FF校驗碼1.該協(xié)議中所有數(shù)值都為十六進制數(shù)2.STX始終為A0H3.地址碼為攝像機的邏輯地址號,地址范圍:00H1FH4.指令碼表示不同的動作 5.數(shù)據(jù)碼1、2分別表示水平、垂直方向速度(00-3FH),在有關(guān)預(yù)制點的操作時,數(shù)據(jù)碼2表示預(yù)制點值6.ETX始終為AFH7.校驗碼(XOR sum of Bytes 2-6) = 字節(jié)2 字節(jié)3 字節(jié)4 字節(jié)5 字節(jié)6指令碼1和指令碼2的設(shè)置:Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0Data 10相機開自動瀏覽器開相機開/關(guān)光圈關(guān)光圈開聚焦近聚焦遠(yuǎn)Data 20變倍遠(yuǎn)變倍近下上左右0 (for pan / tilt)常用命令列表:序號命令字功能10x00 0x08上 20x00 0x10下 30x00 0x04左 40x00 0x02右 50x00 0x20變倍短 60x00 0x40變倍長 70x02 0x00聚焦近 80x01 0x00聚焦遠(yuǎn) 90x08 0x00光圈小 100x04 0x00光圈大 110x00 0x96自動巡航 120x00 0x99關(guān)閉自動巡航130x00 0x07轉(zhuǎn)至預(yù)置點140x00 0x03設(shè)置預(yù)置點150x00 0x05刪除預(yù)置點160x00 0x00停止P協(xié)議特殊命令控制表:CommandData byte 1Data byte 2Data byte 3Data byte 4Set Preset XX0003 常用0001 to FFClear Preset XX0005 常用0001 to FFGo To Preset XX0007 常用0001 to FFFlip (rotate 180o)0007 常用0021Zero Pan Position0007 常用0022Set Aux XX0009 常用0001 to 08Clear Aux XX000B 常用0001 to 08Remote Reset000F 不常用0000Zone Start0011 不常用0001 to 08Zone End0013 不常用0001 to 08Write char to screen0015 不常用0 to 280 to 7FClear Screen0017 不常用0000Alarm Ack0019 不常用0001 to 08Zone Scan On001B 不常用0000Zone Scan Off001D 不常用0000Pattern Start001F 不常用0000Pattern Stop0021 不常用0000Run Pattern0023 不常用0000Zoom Lens Speed0025 不常用0000 to 03Focus Lens Speed0027 不常用0000 to 03以地址碼0x01為例: 0xa0,0x01,0x00,0x08,0x00,0x30,0xaf,0x39,/上 0xa0,0x01,0x00,0x10,0x00,0x30,0xaf,0x21,/下 0xa0,0x01,0x00,0x04,0x10,0x00,0xaf,0x15,/左 0xa0,0x01,0x00,0x02,0x10,0x00,0xaf,0x13,/右 0xa0,0x01,0x00,0x40,0x00,0x00,0xaf,0x41,/變倍短 0xa0,0x01,0x00,0x20,0x00,0x00,0xaf,0x21,/變倍長 0xa0,0x01,0x02,0x00,0x00,0x00,0xaf,0x03,/聚焦近 0xa0,0x01,0x01,0x00,0x00,0x00,0xaf,0x00,/聚焦遠(yuǎn) 0xa0,0x01,0x08,0x00,0x00,0x00,0xaf,0x09,/光圈小 0xa0,0x01,0x04,0x00,0x00,0x00,0xaf,0x05,/光圈大 無命令字發(fā)送/燈光關(guān) 無命令字發(fā)送/燈光開 0xa0,0x01,0x00,0x96,0x00,0x20,0xaf,0xb7,/自動巡航 0xa0,0x01,0x00,0x99,0x00,0x20,0xaf,0xb8,/關(guān)閉自動巡航 0xa0,0x01,0x00,0x07,0x00,0x01,0xaf,0x07,/轉(zhuǎn)至預(yù)置點001 0xa0,0x01,0x00,0x03,0x00,0x01,0xaf,0x03,/設(shè)置預(yù)置點001 0xa0,0x01,0x00,0x05,0x00,0x01,0xaf,0x01,/刪除預(yù)置點001 以上對應(yīng)的停命令均是(上下左右、變倍、聚焦、光圈均有停命令): 0xa0,0x01,0x00,0x00,0x00,0x00,0xaf,0x01,PELCO P PROTOCOLGENERALThis 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 FORMATByteValueFunction1$A0STX (start transmission)2$00 to $1FAddress3Data byte 1 (see below)4Data byte 2 (see below)5Data byte 3 (see below)6Data byte 4(see below)7$AFETX (end transmission)8$00-$FFCheck SumByte 1 is always $A0Byte 2 is the receiver address, set by DIP switch in the receiverByte 3-6, see belowByte 7 is always $AFByte 8 is an XOR sum of Bytes 1-7The 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 COMMANDSBit number76543210Data 10Camera OnAutoscan OnCamera on / offIris CloseIris OpenFocus NearFocus FarData 20Zoom WideZoom TeleTilt DownTilt UpPan LeftPan Right0 (for pan / tilt)Data 3Pan Speed $00 to $3F and $40 for TurboData 4Tilt Speed $00 to $3FEXTENDED COMMAND SETThe extended command set will have bit 0 of data byte 2 set and will follow the format in the following table:CommandData byte 1Data byte 2Data byte 3Data byte 4Set Preset XX00030001 to FFClear Preset XX00050001 to FFGo To Preset XX00070001 to FFFlip (rotate 180)00070021Zero Pan Position00070022Auto scan00090000Stop auto scan000B0000Remote Reset000F0000Zone Start00110001 to 08Zone End00130001 to 08Write char to screen00150 to 280 to 7FClear Screen00170000Alarm Ack00190001 to 08Zone Scan On001B0000Zone Scan Off001D0000Pattern Start001F0000Pattern Stop00210000Run Pattern00230000Zoom Lens Speed00250000 to 03Focus Lens Speed00270000 to 03The receiver will respond with an ACK.To accommodate features of new systems and maintain compatibility with our

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論