GFK2220-GE-PLCmodbus主站通信

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

GFK-2220B1ModbusRTUMasterCommunicationsThisdocumentdescribestheoperationofModbus®RTUMasterfromtheuserinterfacepointofview.UsethisinformationasasupplementtotheSerialCommunicationsUser’sManual(GFK-0582).Thisdocumentcontainsthefollowinginformation:OverviewSupportedProductsModeofOperationCOMMREQsTimeConstraintsSerialConnectionsStandardsMultidropConnectionsDriversandReceiversCableGroundingConnectorWiringFour-WireTwo-WirePoint-to-PointCOMMREQFunctionBlockFormatCOMMREQFunctionBlockParametersCOMMREQFunctionBlockOutputCOMMREQCommandDataBlockModbusRTUMasterStatusWordFormatQueueLimitationsforModbusRTUMasterCOMMREQsLocalDataModbusRTUMasterDiagnosticStatusWordsModbusRTUMasterCommandsInitializeRTUMasterPort:65520(FFF0)ClearRTUMasterDiagnosticStatusWords:08000(1F40)ReadRTUMasterDiagnosticStatusWords:08001(1F41)SendRTURead/Force/PresetQuery:08002(1F42)SendRTUDiagnosticQuery:08003(1F43)ErrorCodesExampleApplication®ModbusisaregisteredtrademarkofSchneiderElectric.2ModbusRTUMasterCommunications-December2003GFK-2220BOverviewModbusSerialLineprotocolisanopenstandardfordatacommunicationsbetweenPLCsandrelateddevices.TheModbusSerialLinestandardprovidesforcommunicationusingeitherprintablecharactersexclusively(ModbusASCII),orbinarydata(ModbusRTU).ThisdocumentdescribesModbusRTUMastercommunicationsonGEFanucPLCCPUs.SupportedProductsModbusRTUMastercommunicationsiscurrentlyavailableontheSeries90™-30IC693CPU363andVersaMax®modularCPUmodelsIC200CPU001,IC200CPU002,IC200CPU005andIC200CPUE05.ModeofOperationAModbusRTUmasterdevice(theclient)sendsquerymessagestooneormoreslavedevices(theservers)onaserialnetwork.Queriesmaycontaindata,requestsfordataorstatus,orcommands.Eachslaveonthenetworkhasauniquedeviceaddress.Anyquerymaybeaddressedeithertoaspecificslavedeviceortoaspecialbroadcastaddress.Queriesaddressedtothebroadcastaddressarecalledbroadcastqueries.Queriesthatrequirearesponsemaynotbeaddressedtothebroadcastaddress.Aslavethatreceivesawell-formed,non-broadcastquerymustsendaresponsemessagetothemaster.Thequery/responsetransactioncompleteswhenthemasterreceivesawell-formedresponse.Slavesdonotrespondtobroadcastqueries.Aftersendingabroadcastquery,themastermustwaitaspecifiedtimebeforecompletingthetransactionandsendingthenextquery.Somebroadcastqueriescontaincommandsthatrequiretheslavestotakespecifiedactions.COMMREQsTheapplicationprogramrunninginthePLCCPUcontrolsthetimingandcontentofeachquerybysendingaCOMMREQmessage.TheCOMMREQmustbeaddressedtotheCPUserialportthatisconnectedtotheModbusRTUserialnetwork.COMMREQdataspecifiesthecontentofthequery.Whenthequery/responsetransactioncompletes,aCOMMREQstatusvalueindicatesthesuccessorfailureofthetransaction.SeetheCOMMREQFunctionBlockFormatsectionofthisdocumentandthesectionsthatfollowitfordetails.TimeConstraintsTheModbusoverSerialLineSpecificationandImplementationguideV1.01containsseveralimportanttimingrequirements.SerialConnections™Series90andVersaMaxaretrademarksofGEFanucAutomation.1ThecurrentModbusRTUspecificationisavailableonlineinthedocumentsModbusApplicationProtocolSpecificationV1.1andModbusoverSerialLineSpecificationandImplementationguideV1.0at(upto247)slavedevices.Aserialnetworkinterconnectsallthesedevices.Ifthereisonlyoneslave,apoint-to-pointconnectionisused.Amultidropconnectionisneededfortwoormoreslaves.StandardsVirtuallyallPLCserialcommunicationsports(includingallserialportsonGEFanucPLCCPUs)supportone(ortwoorthreeinsomecases)ofthreephysicallayerstandardsforasynchronousserialcommunications.ThecurrentrevisionsofallthreemaybepurchasedfromtheTelecommunicationsIndustriesAssociationat:InterfaceBetweenDataTerminalEquipmentandDataCircuit-TerminatingEquipmentEmployingSerialBinaryDataInterchange(ANSI/TIA/EIA-232-F-1997)Thisstandardiscommonlyreferredtoas“RS-232”or“RS-232C”becausethedefinitiveearlierrevisionwastitled“RS-232-C”.RS-232portstransmitandreceivedataandcontrolsignalsonunbalancedcircuits.Thatis,oneSignalCommon(orSignalGround)wireservesasthereturnpathforallthedataandcontrolcircuits.RS-232portsaresuitableforpoint-to-pointconnectionsuptoabout25metersinlength,butnotforlongerlinesormultidropconnections.Thespecificationrecommendslimitingthedatarateto(ineffect)19,200bitspersecond(bps)orless,butratesup115,200bpsarefrequentlyusedwithshortcables(typicallyabout2meters).EIA/TIA-422-B:ElectricalCharacteristicsofBalancedVoltageDigitalInterfaceCircuits(ANSI/TIA/EIA-422-B-94,revised2000)Thisstandardisusuallycalled“RS-422”becausetheinitialrevisionhadthattitle.Itspecifiestwisted-paircablingandabalancedlinedriverandreceiverforeachcircuit.RS-442supportshigherdataratesandlongerdistancesthanRS-232.A100-ohmnominalimpedanceisrecommendedfortwistedpaircircuitsincables,and100-ohmterminatingresistorsarerecommendedforthereceivingendofeachcircuit.SomeRS-422portssupportmultidrop(multipoint)operation.However,thiscapabilityisnotguaranteedbythestandard.Usecautionwhenattemptingt

1 / 38
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功