基于某无缝钢管的物料跟踪系统设计院系自动控制系专业自动化班级4407202学号200403072042姓名贵莹指导教师张海军负责教师张海军沈阳航空工业学院2008年6月沈阳航空工业学院毕业设计(论文)--I摘要无缝钢管的生产需要一个物料跟踪系统来对生产进行实时监控,保障生产的正常进行以及产品质量。本设计采用光纤网络与工业控制网络相结合,使用工控网进行生产现场的监控,使用光纤网络实现对各个分散的生产点的远程控制。远程控制的要点是实现通讯的连贯性,也就是说即使客户端没有发送消息给服务端,客户端与服务端之间的连接也是通畅的。另外,采用数据库与作为服务端的管理机连接,将所有实时采集的生产数据存放在数据库里,达到节省了数据的存储空间,实现数据资源的充分共享等目的。关键词:串口通讯;实时监控;数据处理;ACCESS数据库;沈阳航空工业学院毕业设计(论文)--IIAbstractGenerallyspeaking,whensmallanimalsareweighed,theaccelerationoftheirmovementwillaffecttheresultalot.Thispaper,focusedontheforgoingsituation,advancedandresearchedakindofdynamicelectronicscaleforsmallanimalweighing.Thesystem,thecoreofwhichisMCU(MicroControlUnit),alongwithsensorsandA/Dconvertertechnology,canweighmovingsmallanimalsaccurately.Thispaperintroducedthedesignandrealizationofthedynamicelectronicscaleforsmallanimalweighing.Thesystemismadeupofthescalebody,heavysensorandmeasuringcircuit.Inmeasuringcircuitpart,theauthorresearchedthecircuitcomponentsofthee-scaleintermsoftheamplifiercircuitdesign,thelow-passfilterchoices,A/Dconvertercircuitdesign,displaycircuitdesignandetc.Thesystemadoptsanti-pulse-disturbancemeanfilteralgorithms,realizingthedigitalmeasurementofdynamicmass.Inpractice,thesystemhassuchadvantagesashighmeasuringaccuracy,highstabilityandstronganti-disturbancecapabilityandhasacertainprospectsandvalueforapplication.Keywords:beastieelectronicscale;dynamicmasstest;theresistanceshouldthevariantsensor;MicroControlUnit(MCU)沈阳航空工业学院毕业设计(论文)--III目录第1章绪论.....................................................................................................................11.1课题背景....................................................................................................................11.1.1无缝钢管的现状..................................................................................................11.1.2无缝钢管的工艺流程..........................................................................................31.1.3无缝钢管的市场地位及其发展趋势..................................................................51.2基本概念....................................................................................................................81.2.1物料的定义..........................................................................................................81.2.2物料跟踪的定义和意义......................................................................................81.3课题任务及要求........................................................................................................81.4课题内容及安排........................................................................................................9第2章基于PLC的无缝钢管物料跟踪系统总体方案论证.........................................102.1PC与S7-200PLC通讯方案论证............................................................................112.1.1串口通讯方式简介............................................................................................112.1.2串口通讯............................................................................................................132.2现场控制PC机与管理机之间的通讯方案论证...................................................132.2.1Socket简介...........................................................................错误!未定义书签。2.2.2Socket类型选择.................................................................................................202.3管理机与数据库连接方案论证..............................................................................212.3.1ADO简介.............................................................................错误!未定义书签。2.3.2功能简介............................................................................................................21第3章网络程序设计.......................................................................................................223.1连接检测..................................................................................................................223.1.1定时发送设计....................................................................................................223.2报文报头设计..........................................................................................................223.3服务端功能..............................................................................................................243.4客户端设计..............................................................................................................263.5报文设计..................................................................................................................263.6发送函数设计..........................................................................................................27沈阳航空工业学院毕业设计(论文)--IV3.7接收报文操作设计..................................................................................................27第4章PC与S7-200PLC通讯的设计............................................................................294.1通讯程序功能描述..................................................................................................294.2PLC程序设计...........................................................................................................294.3计算机程序设计................