版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
Service& SIMATICS7-200,CPU 說明參數(shù)設置步驟:1,2,3,4,5,1516。要求要使用Modbus協(xié)議必須先獲得并在STEP7Micro/Win中安裝指令庫(條目 Modbus主站協(xié)議只被STEP7Micro/WinV4.0SP5及其以上版本支持。.硬件設置o)1Micro/WINPGPCCPU0Profibus纜進行連接(電3,3,8,8->01)M(26KB圖參數(shù)匹配"MBUS_INIT"and"MBUS_SLAVE"。"(40KB圖MBUS參意選0=PPI,1200,2400,4800,9600,19200,38400,57600,STEP7Micro/WIN幫助:"MODBUS主站執(zhí)MBUS_MSG時的錯誤代碼"參參意選0=讀1=wwwPLCworld0128Q0.0w
1)STEP7Micro/WIN幫助:"MODBUSMBUS_MSG時的錯誤代碼。參意選0=PPI,1200,2400,4800,9600,19200,38400,57600,參意選庫的地再被其它程序所使用(主站側(cè):"DataPtr"+"Count"從站側(cè):"HoldStart"+"MaxHold")。圖co.
(137KBwwwPLCworld保持寄存器值的傳輸見圖.04。保持寄存器是以字為單位傳輸?shù)?,它與從站的V區(qū)地址對應??梢园聪旅婀接嬎銖恼镜腣區(qū)目標指針:2*(Addr-40001)+HoldStart=2*(40002-40001)+&VB0="MaxHold>=Addr-40001+Count=40002-40001+1=(38KBFig. )條目號 日期:2008-05-HowHowdoyouimplementMODBUScommunicationwithS7-Displaypart SIMATICS7-200,CPU TakingthefollowingexampleyoucansetupasimpleMODBUSmaster-slavecommunicationbetweentwoS7-200CPUs.TheexampleconcernstheMODBUSfunctioncode6(Writetoslave-holdingregister)andcanbeconsideredasabasisforstep-by-stepchangingoftheparametersfortheotherfunctioncodessupported:1,2,3,4,5,15and16.TooperatetheMODBUSprotocolyoumustfirstprocureandinstallfirsttheSTEP7Micro/WINcommandlibrary,thenSTEP7Micro/WIN(EntryID TheMODBUS-MasterprotocolissupportedonlyfromSTEP7Micro/WINV4.0ServicePack51.Hardware2.Parameter3.Memoryaddressingforthe4.Holdingregistervalue9M.wHardware ww9M.wTheexampleissetupforaMODBUScommunicationbetweenthePorts0oftwoS7-200CPUs(preferablyeachwith2communicationinterfaces).OnthemastersideitwouldalsobepossibletoselectPort1withthecorrespondinglibraryblockselection"MBUS_CTRL_P1"and"MBUS_MSG_P1".Port1isconnectedineachcasewithaPCorPGwiththeMicro/WINsoftware.CommunicationbetweentheCPUsviaPort0ismadeviaaPROFIBUScable(serialconnectionofPins3,3,7and8->seeFig.01).Inaddition,youmustmakesurethattheencoderground(M)is(26KBFig.ForMODBUScommunication,onthemastersideyouneedlibraryblocks"MBUSCTRL"and"MBUS_MSG",and"MBUS_INIT"and"MBUS_SLAVE"ontheslaveside.InMicro/WINyoucreateanewprojectforthemasterandtheslavewiththenetworksandparametersshowninFig.02.Hereyoumustmakesurethatthe"Baud"and"Parity"parametersareidenticalandthatthe"Slave"addressofthe"MBUS_MSG"blockmatchesthe"Addr"parameterofthe"MBUS_INIT"block(seeFig.02).ThebaudratesettingforthePort0interfaceinthe"Systemdatablock"viewinMicro/WINisirrelevantfortheMODBUSprotocol("Mode"="1").(40KBFig.Thefollowingtablesdescribethemeaningsandselectionoptionsofthelibraryblock0=PPI,Transmissionratein1200,2400,4800,9600,19200,38400,0=none,1=odd,umtimeinmsforthe'Finished'ErrorTable1)SeeSTEP7Micro/WINHelp:"ErrorcodesfortheexecutionoftheMODBUSmasteroperationw.91HMI.oBUS wwwPLCworldSlave"Read"or0=read,MOBDUSinitial0..128=digitaloutputsQ0.0..Q15.710001..10128=digitalinputsI0.0..30001..30092=oginputsAIW0..40001..49999=holdingregisterNumberofbits(0xxxx,1xxxx)/words(3xxxx,Pointertostartofvariable'Finished'ErrorTable1)SeeSTEP7Micro/WINHelp:"ErrorcodesfortheexecutionoftheMODBUSmasteroperationMBUSMSG"MBUSINIT0=PPI,SlaveTransmissionratein1200,2400,4800,9600,19200,57600,0=none,1=odd,SignalstretchinginNumberofavailabledigitalinputsandNumberof oginputMax.numberofholdingregisterwordPointertothestartoftheholdingregister'Finished'ErrorTable2)The umaddressesthatcanbereallyuseddependsontheCPUtypeusedandits 3)SeeSTEP7Micro/WINHelp:"ErrorcodesfortheexecutionoftheMODBUSslave'Finished'rrorErrorTable3)SeeSTEP7Micro/WINHelp:"ErrorcodesfortheexecutionoftheMODBUSslaveMemoryaddressingfortheAftercompletionoftheprojectsyoumustdefinethememoryforthelibraryintheMicro/WINprogramblockcontainer.Whenreservingmemoryforthelibraries,makesurethattheareaselectedineachcasedoesnotoverlapthevariablememoryareaforthedata(forthemaster:"DataPtr"+"Count"andfortheslave:"HoldStart"+"MaxHold").(137KBFig.HoldingregistervalueAfterloadingtheprojectsintotheappropriateCPUyoucanwritetotheselectedmastervariablememoryareabyactivatingthetablestatusandmonitorontheslaveside.WhenthemasterinputI0.0isactivated,thecontentofvariablewordVW2issenttotheslaveCPUandwrittenheretothevariablewordVW2.ThisholdingregistervaluetransferisshowninFig.Thepointer"DataPtr"representsthestartofthevariablememorytobeThe"Count"parameterspecifiesthenumberofwordstobewrittentotheaddress"Addr"="4xxxx"(holdingregister).Thevariablememoryareaselectedwillbewrittentotheholdingregisterstartaddress"Addr"="40002"("RW"="1").TheholdingregisterworkswordforwordasaplaceholdertotheslavevariablememoryThe"HoldStart"pointerspecifiestheinitialaddressofthevariablememoryequivalenttotheholdingregisterstartaddress40001.Youcancalculatetheslavevariablememorytargetpointerasfollows:2*(Addr-40001)+HoldStart=2*(40002-40001)+&VB0=&VB2Inaddition,youmustmakesurethatthe umnumbero
溫馨提示
- 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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五版泥漿外運承包合同(含應急處理預案)4篇
- 二零二五版拌合料生產(chǎn)技術標準制定與執(zhí)行合同4篇
- 二零二五年度智能建筑暖通設備采購合同4篇
- 二零二五版門閘安全標準認證服務合同4篇
- 二零二五年度網(wǎng)絡安全年薪制勞動合同4篇
- 二零二五年度沖擊錘施工材料質(zhì)量檢測合同2篇
- 二零二五年度租賃市場合同糾紛解決策略4篇
- 二零二五年度城市更新改造項目規(guī)劃合同4篇
- 二零二五年度農(nóng)業(yè)電商數(shù)據(jù)安全與隱私保護合同樣本3篇
- 2025年度二零二五年度獼猴桃出口貿(mào)易代理合同3篇
- 2024年供應鏈安全培訓:深入剖析與應用
- 飛鼠養(yǎng)殖技術指導
- 壞死性筋膜炎
- 整式的加減單元測試題6套
- 股權架構完整
- 山東省泰安市2022年初中學業(yè)水平考試生物試題
- 注塑部質(zhì)量控制標準全套
- 人教A版高中數(shù)學選擇性必修第一冊第二章直線和圓的方程-經(jīng)典例題及配套練習題含答案解析
- 銀行網(wǎng)點服務禮儀標準培訓課件
- 二年級下冊數(shù)學教案 -《數(shù)一數(shù)(二)》 北師大版
- 晶體三極管資料
評論
0/150
提交評論