版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Service& SIMATICS7-200,CPU 说明参数设置步骤:1,2,3,4,5,1516。要求要使用Modbus协议必须先获得并在STEP7Micro/Win中安装指令库(条目 Modbus主站协议只被STEP7Micro/WinV4.0SP5及其以上版本支持。.硬件设置o)1Micro/WINPGPCCPU0Profibus缆进行连接(电3,3,8,8->01)M(26KB图参数匹配"MBUS_INIT"and"MBUS_SLAVE"。"(40KB图MBUS参意选0=PPI,1200,2400,4800,9600,19200,38400,57600,STEP7Micro/WIN帮助:"MODBUS主站执MBUS_MSG时的错误代码"参参意选0=读1=wwwPLCworld0128Q0.0w
1)STEP7Micro/WIN帮助:"MODBUSMBUS_MSG时的错误代码。参意选0=PPI,1200,2400,4800,9600,19200,38400,57600,参意选库的地再被其它程序所使用(主站侧:"DataPtr"+"Count"从站侧:"HoldStart"+"MaxHold")。图co.
(137KBwwwPLCworld保持寄存器值的传输见图.04。保持寄存器是以字为单位传输的,它与从站的V区地址对应。可以按下面公式计算从站的V区目标指针: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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026农业农药行业市场深度调研及发展趋势和前景预测研究报告
- 2026儿童益智玩具用户画像与产品创新方向调研报告
- 2025中国铁建国际集团有限公司海外管理岗位公开招聘笔试参考题库及答案
- 2026届江苏省南京雨花台区七校联考中考适应性考试历史试题含解析
- 2025世界知识产权日知识竞赛试题(附完整答案)
- 2026年晋升副主任护师病例分析专题报告急性心肌梗死患者的护理要点
- 厂内车辆碰撞伤人应急演练脚本
- 电工岗位职责的说明书(4篇)
- 工艺技术员岗位职责岗位说明书
- 2026年包商银行校园招聘面试真题
- YS/T 433-2016银精矿
- GB/T 6074-2006板式链、连接环和槽轮尺寸、测量力和抗拉强度
- GB 29415-2013耐火电缆槽盒
- 2022年天津市河西区中考数学一模试题及答案解析
- GA/T 1444-2017法庭科学笔迹检验样本提取规范
- 2022年大理白族自治州大理财政局系统事业单位招聘笔试试题及答案解析
- 诺和龙诺和龙在糖尿病心脑血管方面的作用专家讲座
- 阿片类药物中毒的急救处理课件
- 种业现状及发展思考课件
- 某大型化工集团公司导入WCM世界级制造策划资料课件
- DBJ∕T13-354-2021 既有房屋结构安全隐患排查技术标准
评论
0/150
提交评论