上海交通大学硕士学位论文DeviceNet设备的设计与实现姓名:赵雷申请学位级别:硕士专业:@指导教师:陈坚20090101IDeviceNetDeviceNetAllen-Bradley(Rockwell)CANI/ODeviceNetDeviceNetDeviceNetDeviceNetHMSANYBUS-SDeviceNetDeviceNetDeviceNetDeviceNetDeviceNetDeviceNetARM9IIDeviceNetDeviceNetDeviceNetDeviceNetABSTRACTIIIDeviceNetEquipmentDesignandImplementationABSTRACTDeviceNetisaCAN–basedopenfield-busstandardwhichisdevelopedbyAllen-Bradley(RockwellAutomation).Itisadigitalmulti-pointnetwork,whichestablishescommunicationsbetweencontrollerandIOdevices.Asacommunicationprotocolwithhighperformance,DeviceNetenjoysaleadingpositioninindustrialmarketsinAmericaandAsia,anditssystemsolutionshavealsoachievedremarkablegrowthinEurope.Athome,DeviceNethasalsobeenanationalstandard.Inordertoadapttothedevelopmentofindustryinourcountry,researchanddevelopmentofourownDeviceNetproductsisquitenecessary.However,duetothecomplicatedprotocol,specialprotocolconversionchipssuchasANYBUS-SserialsproducedbyHMSareusuallyadoptedtoconnecttoDeviceNet.Therearetwoshortcomingswhenadoptinghardchipsassolutions.Oneisthehighcostanddisadvantageincompetition.Theotheristhelackofindependentintellectualpropertyrightsandlimitationindevelopmentbyforigncompanys.Inordertoimprovethepassivesituation,thispaperhasanalysedtheprotocolstandardofDeviceNetindetailandrealizetheprotocolstackofDeviceNetequipmentsinsoftwareswhichhasreducedthecostalotandincreasedeconomicbenefitscomparingtosolutionsofhardwarechips.Inaddition,theindependentdesignationoftheprotocolisremarkablymeaningfulbecausewewillneverrelyontheconversionchipsofforeigncountriesandimprovethecriticalcompetitivenessinthedevelopmentofproducts.TheresearchofDeviceNetisgenerallyregardedasalong-termworkbecauseitsprotocolstandardisquitecomplicatedandlarge.InordertoprovideaconvenientenvironmentfortheresearchonDeviceNetintheABSTRACTIVfurture,wehavedesignedaspecialplatformbasedonARM9andabundantperipheralequipments.WithvarioushardwareresourcestheresearchercandevotehismindontheprotocolitselfeasilywithnoregardonthelimitationofhardwareswhichhasreducedthedifficultyofresearchonDeviceNetalot.Finally,inordertovalidatetheprotocolstackandrelatedsoftwarestoworkwell,wehavedesignedacontrollerofautodoorinthepaper.IthasbeenconnectedtoDeviceNetthroughtheconversionbetweenDeviceNetandself-definedcommunicationprotocoloftheautodoor.TheexperimentshaveprovedthattheprotocolstackofslavestationofDeviceNetcanoperatewellinindustrialfields.Keywords:DeviceNet,FieldBus,Autodoor,ProtocolStack20092252009225200922511.1PLCI/O/PLC2080FCSPLCDCS2090InternetIntranet[1]-[3]12234ProfiBusCANWorldFIPDeviceNetLonWorksHARTDeviceNetROCKWELL199440DeviceNet[1]-[3]1.2DeviceNet/DeviceNetDeviceNetDeviceNetDeviceNetODVAODVAABBRockwellGESSTYokogawa[4]DeviceNet3DeviceNetDeviceNetHMSANYBUS-SDeviceNet1.31ARM9DeviceNetPCBuC/OS-IIDeviceNetEDSDeviceNetRockwellRSNetWorx2PIC18F4520PCBDeviceNetDeviceNetDeviceNetDeviceNetDeviceNetDeviceNet41.46DeviceNetDeviceNetDeviceNet52.1DeviceNetDeviceNetDeviceNetDeviceNetDeviceNetDeviceNetDeviceNetIODeviceNetDeviceNetDeviceNetDeviceNetDeviceNetDeviceNet2-1DeviceNetRS232CompactLogixEtherNet2-1DeviceNetFig.2-1SimpleDeviceNetnetworksDeviceNetAllen-BradleyCompactLogix6PLCCPUCPUCompactLogixDeviceNetDeviceNetDeviceNet[5][6]DeviceNetDeviceNetDeviceNetDeviceNetDeviceNetDeviceNet2.2DeviceNet2-2AT91RM9200MemoryRS232/RS485CANCtrlMCP2510CANPHYPCA82C250PowerUSB10/100MbpsEtherNetPHYRTC/EEPROM/Reset/GPIO2-2Fig.2-2ProtocolmoduleblockdiagramDeviceNetDeviceNetARM92DeviceNetDeviceNet10/100MUSB485ARM9DeviceNetDeviceNet472-3PIC18F4520RS232LCD/LED/Keys//EEPROMPower2-3Fig.2-3AutodoorcontrollerblockdiagramIODeviceNet52.3DeviceNetDeviceNetDeviceNetDeviceNet8DeviceNet3.1DeviceNetDeviceNetDeviceNetDeviceNetI/O[7]DeviceNetDeviceNetODVAOpenDeviceNetVendorAssociationODVADeviceNetDeviceNetODVAVendormembersDistributormemberODVA300ABBRockwellPhoenixContactsOmronHitachiCutler-HammerODVADeviceNetDeviceNetDeviceNetDeviceNetDeviceNetDeviceNetDeviceNetODVAhppt:\\[8][9]DeviceNet3-13-1DeviceNet[10][11][12]DeviceNet-64DeviceNet9DeviceNetFLEXI/OMMII/ODeviceNet3-1DeviceNetFig.3-1TypicalstructureofDeviceNet125kbps250kbps500kbps16DeviceNet24V3-2DeviceNetFig.3-2DeviceNetcanbesuppliedbybusDeviceNet10DeviceNetCAN/I/OMACID2002121DeviceNetDeviceNetGB/T18858.3-2002CDI3DeviceNet20021082003413.2DeviceNetDeviceNetDeviceNetDeviceNet3-3[10]DeviceNetDeviceNet11I/ODeviceNetUCMMI/O3-3DeviceNetFig.3-3DeviceNetobjectmodule3-41)MACID2)ID3)ID4)ID5)DeviceNetIDID87256ID128IDDeviceNet12166553616IDMACID1#MACID2#MACID3#MACID4#5#1#7#1#5#2#1#5#DeviceNet3-4DeviceNetFig.3-4DeviceNetobjectaddressingIDDeviceNet3.3DeviceNetCAN3.3.1DeviceNetCANCANControlAreaNetworkBOSCH80ISOMotorolaIntelPhilipsSiemensCANCAN1Mbps/40m10km/5kbps110CANDeviceNet133.3.2CANCANCANCANCANCANDeviceNet3-5[13][14]OSI7OSI2OSI1OSI0DeviveNetCANDeviceNet3-5DeviceNetCANFig.3-5RelationbetweentDeviceNetandCANCAN1)2)3)4)CAN3-6CANDeviceNet141)11CAN2)1RTR1101100101101101001000010110111010110110111100001010101012010101010101xxxxxx11EOF01EOF2123-6CANFig.3-6Nondestruct