線性百分測微計及集線器說明書_第1頁
線性百分測微計及集線器說明書_第2頁
線性百分測微計及集線器說明書_第3頁
線性百分測微計及集線器說明書_第4頁
全文預覽已結束

下載本文檔

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

文檔簡介

線性百分測微計及集線器說明書多路測微計連接方式示意圖線性百分測微計插頭型0-10mm0-25mm引線型0-10mm0-25mm集線器可訂制拼接多路集線器四路集線器分以及主八路集線器分以及主測微計連接方式示意圖注:1.主集線器不能單獨使用,只有在8個以上的多測微計級聯(lián)時才使用,連接線RS232串口線RS232串口轉USB線(選配件)電腦端連接方式示意圖3.2通過分集線器的“RS232”輸出口和主集線器輸入端口相連3.3測微計的地址編號原則:電源編號NUM=(n-1)+m其中m是分集線器上面的編號,n是該集線器接集線器專用12V電源到主集線器上的端口編號。參見上面圖示,第一個分集線器上測微計編號是1到8,第二個分集線器編號是9到16,以此類推。注:當分集線器連接到主集線器時,請按1到4的順序連接,不能有間隔,否則讀取的數(shù)據(jù)會有錯誤。例如當只有兩個集線器級聯(lián)時,只能接主集線器的1和2接口,不能接到其他位置。4.測微計系統(tǒng)接電腦USB口一.測微計和集線器使用說明現(xiàn)在大部分電腦沒有9針串行接口,可采用專用串口轉USB連接線(選配件),把集線器的RS232口與電腦的USB口相連。在電腦端需要安裝配套的USB驅動程序,在電腦內(nèi)模擬出一個串口,后續(xù)的軟件處理和串口操作相同。測微計接電腦1.單路測微計數(shù)據(jù)采集通過單路集線器接電腦的串口,采用九針串口線測微計接PLC(可編程控制器)測微計和PLC連接與電腦方式相同,把集線器的RS232口和PLC的RS232口相連,由于測微計的協(xié)議為標準MODBUS協(xié)議,大部分的PLC帶MODBUS通訊模塊,所以連接非常方便,減少開發(fā)難度。集線器數(shù)據(jù)輸出口說明2.2路到八路測微計的數(shù)據(jù)采集,以下是4路連接示意圖。RS485引腳說明:引腳編號功能A(+)B(-)地235集線器連電腦示意圖集線器連測微計示意圖2.12路到4路測微計數(shù)據(jù)采集,采用四路集線器5010-311,集線器輸入接口編號就是測微計的地址編號。RS232引腳說明:2.22.3請用四路集線器的“RS232”輸出端連接電腦5路到8路測微計數(shù)據(jù)采集,采用八路集線器5010-411,集線器輸入接口編號就是測微計的地址編號。引腳編號功能RXDTXD地2352.4請用八路集線器的“RS232”輸出端連接電腦3.9路到32路測微計數(shù)據(jù)采集二.規(guī)格參數(shù)3.1超過8路的測微計采用兩級連接方式,利用一個主集線器5010-321(421),連接多個分集線器,最多可接63路測微計,下圖為32測微計1從機回應的地址和功能碼和主機請求命令相同,數(shù)據(jù)長度和主機的數(shù)據(jù)長規(guī)格度相同,數(shù)據(jù)內(nèi)容字節(jié)數(shù)和數(shù)據(jù)長度有關,字節(jié)數(shù)n=數(shù)據(jù)長度L*2型號0-10mm 0-25mm0-10mm 0-25mm2.功能代碼:檢測系統(tǒng)測量范圍分辨率容柵測量系統(tǒng),玻璃材料傳感器0x030x06讀數(shù)據(jù)寫數(shù)據(jù)12.7mm25.4mm0.01mm0.01mm0.03mm0.01mm0.01mm0.01mm0.03mm0.01mm0.01mm0.03mm注:1.0x03表示十六進制數(shù)據(jù)03。重復定位精度全程精度0.01mm2.用戶可無需了解MODBUS,參照附錄二的指令表提供的指令操作0.03mm三、具體指令說明:1.取單個測微計工作電壓工作電流測量力5V主機請求命令:<18mA1.2N地址功能代碼0x03起始地址數(shù)據(jù)長度CRC數(shù)據(jù)更新速度10ms(100次/S)IP54n0x00000x0002xxxx從機回應命令功能代碼0x03外殼保護等級使用壽命出線方式引線長度尺寸反復測量1000萬次以上(保證精度)地址數(shù)據(jù)長度數(shù)據(jù)內(nèi)容CRCDB9針DB9針四芯出線四芯出線n02xxxxxxxxxxxx2m舉例:取1號測微計長135或149*直徑24.5mm夾持位置直徑8mm主機發(fā)送:010300000002C40B測微計回應:0103020100123578BF注:a.地址n范圍1至127b.本機CRC效驗碼采用為16位CRC效驗碼,多項式為X^16+X^15+X^2+1,查表算法舉例見附錄1c.數(shù)據(jù)內(nèi)容說明集線器:數(shù)據(jù)內(nèi)容四個字節(jié)(高位在前):最高位字節(jié)為標志字節(jié),第二個字節(jié)為零,最后兩個字節(jié)共16bit組成十六進制位移數(shù)據(jù)位移數(shù)據(jù)(Data)。數(shù)據(jù)字節(jié)一規(guī)格型號可訂制4路分8路分4路主8路主工作電壓電流9-24VSign7Sign6Sign5Sign4Sign3Sign2Sign1Sign0小于100mA(不接測微計)輸入端口數(shù)量1路4路8路4路8路數(shù)據(jù)字節(jié)二功能分集線器分集線器分集線主集線主集線器00000000器器輸出端口通訊協(xié)議尺寸(mm)RS232和RS485MODBUS協(xié)議RTU模式數(shù)據(jù)字節(jié)三50*45*22119*50*97204*120*49*119*50*97204*120*49Data15Data07Data14Data06Data13Data12Data11Data10Data09Data08測微計MODBUS通訊協(xié)議一、數(shù)據(jù)幀格式:數(shù)據(jù)字節(jié)四Data05Data04Data03Data02Data01Data00RTU模式符號字節(jié)Sign說明通訊參數(shù):波特率38400數(shù)據(jù)幀:1個起始位,8個數(shù)據(jù)位,無奇偶校驗,2個停止位Sign0為正負號標志,0為正數(shù),1為負數(shù)Sign1為正負號標志,0為正數(shù),1為負數(shù)二、MODBUS協(xié)議簡單說明1.幀基本格式Sign2為數(shù)據(jù)確認標志,1為數(shù)據(jù)被確認(集線器外接開關觸發(fā))位移數(shù)據(jù)說明:主機請求命令地址(1功能代碼起始地址(2個字節(jié))數(shù)據(jù)長度CRC(2Data00---Data15共16位,為十六進制數(shù)個字節(jié))(1個字節(jié))(2個字節(jié))個字節(jié))例如:4個數(shù)據(jù)字節(jié)為:0x010x000x120x35符號字節(jié)0x01表示數(shù)據(jù)為負數(shù)且最小分辨率為0.001mm從機回應命令地址(1功能代碼數(shù)據(jù)長度數(shù)據(jù)內(nèi)容(nCRC(2位移數(shù)據(jù)0x120x35表示位移為1235(十六進制)=4661(十進制)個單位實際位移=-4661um=-4.661mm個字節(jié))(1個字節(jié))(1個字節(jié))個BYTE)BYTE)22.單個測頭清零位主機請求命令從機回應數(shù)據(jù)從機地址功能代碼起始地址(2BYT數(shù)據(jù)內(nèi)容(2BYTE)CRC(2BYTE)地址功能代碼起始地址(2BYTE)0X0800數(shù)據(jù)內(nèi)容(2BYTCRC(2BYTE)E)E)0x800x060X08000XAB56XXXXn0x060XAB56XXXX舉例:測微計回應數(shù)據(jù)主機發(fā)送數(shù)據(jù):80060800AB566AB5設備回應數(shù)據(jù):80060800AB566AB5地址功能代碼起始地址(2BYTE)0X0800數(shù)據(jù)內(nèi)容(2BYTE)CRC(2BYTE)注:該命令可以把集線器上所有測微計一次清零,級聯(lián)時效果也一樣。清零命令處發(fā)送完后,在下一個取數(shù)命令發(fā)送前請延時200MS以上,確保所有測微計能完成清零的任務。n0x060XAB56XXXX舉例:地址1的測微計數(shù)據(jù)清零主機發(fā)送:01060800AB5674A4設備回應:01060800AB5674A4附錄一:CRC算法舉例unsignedshortCRC16(unsignedchar*puchMsg,unsignedshortusDataLen)3.取多測微計位移值//unsignedchar*puchMsg要進行CRC校驗的數(shù)據(jù)主機請求命令//unsignedshortusDataLen數(shù)據(jù)字節(jié)數(shù)地址功能代起始地址(2BYTE)數(shù)據(jù)長度(2BYTCRC(2BY{碼E)TE)unsignedcharuchCRCHi=0xFF;unsignedcharuchCRCLo=0xFF;unsignedshortuIndex;/*高CRC字節(jié)初始化*//*低CRC字節(jié)初始化*//*CRC循環(huán)中的索引*//*傳輸消息緩沖區(qū)*/0x800x030X00000X00nnXXXX當取四路測微計時,數(shù)據(jù)長度=0x0008取八路測微計時,數(shù)據(jù)長度=0x0010while(usDataLen--)取12路測微計時,數(shù)據(jù)長度=0x0018{以此類推。uIndex=uchCRCHi^*puchMsg++;uchCRCHi=uchCRCLo^auchCRCHi[uIndex];uchCRCLo=auchCRCLo[uIndex];}/*計算CRC*/4.3.2從機回應命令地址功能代碼數(shù)據(jù)長度數(shù)據(jù)內(nèi)容CRC(2BYTE)XXXX0x800x030Xxxxxxxxxxx該命令與連接的集線器有關:return((uchCRCHi<<8)|uchCRCLo);連接四路集線器,設備回應內(nèi)容包括四個測微計的數(shù)據(jù),共16字節(jié)(每個測微計4個字節(jié)),按照測微計編號順序排列,所以數(shù)據(jù)為(0x10)連接八路集線器,設備回應內(nèi)容包括八個測微計的數(shù)據(jù),32個字節(jié),命令中數(shù)據(jù)長度為(0x20)。}/*CRC高位字節(jié)值表*/staticunsignedcharauchCRCHi[]={0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,連接8路以上的設備,數(shù)據(jù)格式也一樣。舉例:采集集線器(四路)數(shù)據(jù)主機發(fā)送數(shù)據(jù):800300000002DA1A設備回應數(shù)據(jù):80031000001111000022220000333300004444XXXX地址一地址二地址三地址四CRC下劃線為四個測微計的移動數(shù)據(jù)。4.多測頭清零位主機請求命令從機地址功能代碼起始地址(2BYTE)數(shù)據(jù)內(nèi)容(2BYCRC(2BYTTE)E)0x800x060X08000XAB56XXXX313141516171819202122232425262728293031320D0300000002C4C70E0300000002C4F40F0300000002C525100300000002C74A110300000002C69B120300000002C6A8130300000002C779140300000002C6CE150300000002C71F160300000002C72C170300000002C6FD180300000002C602190300000002C7D31A0300000002C7E01B0300000002C6311C0300000002C7861D0300000002C6571E0300000002C6641F0300000002C7B5200300000002C2BA0D060800AB5674680E060800AB56745B0F060800AB56758A10060800AB5677E511060800AB56763412060800AB56760713060800AB5677D614060800AB56766115060800AB5677B016060800AB56778317060800AB56765218060800AB5676AD19060800AB56777C1A060800AB56774F1B060800AB56769E1C060800AB5677291D060800AB5676F81E060800AB5676CB1F060800AB56771A20060800AB5672150x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40};/*CRC低位字節(jié)值表*/staticcharauchCRCLo[]={0x00,0xC0,0xC1,0x01,0xC3,0x03,0x02,0xC2,0xC6,0x06,0x07,0xC7,0x05,0xC5,0xC4,0x04,0xCC,0x0C,0x0D,0xCD,0x0F,0xCF,0xCE,0x0E,0x0A,0xCA,0xCB,0x0B,0xC9,0x09,0x08,0x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0x80,0x40};多測微計命令測微計個數(shù)4個取數(shù)命令(十六進制)清零命令(十六進制)8003000000085A1D8003000000105A178003000000185BD18003000000205A038003000000285BC58003000000305BCF80060800

溫馨提示

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

評論

0/150

提交評論