codesubuntu10.04

ubuntu10.04  时间:2021-03-29  阅读:()
DesignofCentralizedRemote-readingMeterSystemandIntelligentNetworkWaterMeterChuanfengLiSchoolofComputerandInformationEngineeringLuoyangInstituteofScienceandTechnologyLuoyang,Chinalichuanfeng@sina.
comChenLiSchoolofComputerandInformationEngineeringLuoyangInstituteofScienceandTechnologyLuoyang,Chinaleilacoffee@163.
comWenguangDiaoSchoolofComputerandInformationEngineeringLuoyangInstituteofScienceandTechnologyLuoyang,Chinalitdwg@gmail.
comShuranZhangSchoolofComputerandInformationEngineeringLuoyangInstituteofScienceandTechnologyLuoyang,Chinazhangsr9@163.
comAbstract—Thispaperdescribesadesigntodevelopacentralizedremote-readingmetersystemwhichusedtoovercomeshortcomingsofthetraditionalmanpower-basedreadingmeter.
Thesystemisdesignedfromthehostcomputer,networkmeterandconcentratorthreeparts.
Concentratorisconnectedtothehostcomputer,soremotemetercouldberead,monitoredandmanagedbythehostcomputer.
Thehostcomputerconsistsofclient,server,dataserviceanddatabase,developedbyC#languageandSQLServer.
ThenetworkwatermeterisbasedonSTC89C52RCmicrocontrollersendingdatatotheconcentratorthrough485bus.
TheconcentratortakingARM9andLinuxasthecore,readmeterdataby485bus,andsenddatatoserverthroughEthernet.
Thetestresultsshowthattheremote-readingmetersystemisaccurate,simple,real-time,secure,reliable,andeasytoapplication.
Keywords-remotesystem;networkwatermeter;concentrator;ARM9;LinuxI.
INTRODUCTIONAtpresent,readingdataofresidents'ammeter,watermeterandgasmeterisachievedbymanpower.
Readingmeterpeopleshouldtaketimetocheckmetersfromdoortodooreverymonth,whichconsumesalotofmanpower,materialresources,time-consumingandlowaccurate.
Tosolvethis,thecomputer-basedreadingmetersystemisusedtoreplacemanpower-basedsystem.
Remotereadingmetersystemusingintelligentinformationmanagementcanbeputintouseinresidential,apartmentintelligentmanagement.
Studyonautomaticreadingmetertechnologyabroadmaybestartedinthe1970s,afterdecadesofdevelopment,thetechnologyisrelativelymature,andhasbeenwidelyused.
InChina,thedevelopmentofremoteautomaticreadingmetersystemstartedlaterthanabroad,thetraditionalmanualreadingmetersystemisstillwidelyused,whichcreateabigpotentialmarketespeciallyremoteautomaticreadingmetertechnologydevelopingrapidly,soautomaticreadingmetertechnologywillgraduallyreplacethetraditionalreadingmeter[1-4].
Thesystemconsistsofsoftwareandhardwarecomponents,usestechnologiessuchasembeddedtechnology,networkcommunication,multitaskandsoon.
Thesystemconsistsofthehostcomputer,concentratorandnetworkmeter.
HostcomputerisC/Sstructure,usingmulti-threading,WCFandothertechnologies,isresponsiblefordataanalysis,watermonitoringandmanagement.
Concentratorusingembeddedtechnologyisresponsiblefordatareceivingandforwarding[5].
NetworkmeterusingSCMtechnologyisresponsibleforwaterflowdatareadingandforwarding.
Thesystemismainlyusedforresidential,dormitoryandotheroccasion'sintelligentmanagement,sopropertystaffgetsareal-time[6,7].
ChapterIIismainlytoanalyzethesystemanddrawageneralframeworkmap,andchapterIIIismainlytoanalyzethespecificdesignofhostcomputer,setforththespecificfunction,thedatadictionary,storedproceduresandsoon.
ChapterIVanalyzestheparticulardesignoftheconcentratoranddescribesrelatedtechnologiessuchasTCP,multithreading,andgivestheschematicdiagramoftheconcentratorandtheassociatedflowchart.
ChapterVismainlyanalyzesspecificnetworkmeterdesign,summarizesthespecificmethodsofsystemtesting,andtestresults.
Finally,givesconclusionsandfuturedirectionsforimprovement.
II.
SYSTEMSTRUCTUREDESIGNThesystemconsistsofahostcomputer,concentrators,andnetworkmetersthreemajorcomponents.
MeterusingSTC89C52microcontrollerreadstheresident'sactualwaterconsumptionatregulartime,fulfillsdatacollection,storage,transmissionandothertasks.
ConcentratorusingS3C2440microprocessor,whichhasaclockspeedupto400MHz,isresponsiblefordataforwardingandstorage.
HostcomputerusingC/Sstructuredesign,consistsofserver,client,dataserviceanddatabase.
Whenreadingmeterdataisrequired,hostcomputersendcommandstotheconcentratorviaEthernet,theconcentratorwillanalyzedataandsendcodestometersconnectedthrough485bus,whichcheckreceivedcodeswithinsidecodes,sendwaterInternationalConferenceonMechatronics,Electronic,IndustrialandControlEngineering(MEIC2014)2014.
Theauthors-PublishedbyAtlantisPressusagedatatoconcentratorthrough485busifcodesreceivedisconsistentwithinsidecodes[8].
GeneralframeworkisshowninFig.
1.
RS-485BusRS-485BusEthernetConcentratorPCFigure1.
SystemprincipalbodystructureIII.
DESIGNOFTHEHOSTCOMPUTERA.
SystemStructureHostcomputermanagementsystemconsistsofserversoftware,clientsidesoftware,dataserviceanddatabase[9],systemdataflowisshowninFig.
2.
DatabaseDataserviceServerReturndataCallserviceClientConcentratorNetworkmeterSevercommandTransmittotheserverTransmittometerWatermetercodeWaterconsumptionFigure2.
SystemdataflowchartB.
DesignofDatabaseThesystemneedsstoreclientdata,userdata,waterconsumingdataandreadingtimeinformation,sodatabasehascorrespondingtableforeach.
Storeproceduresareusedtofulfilloperationsontables.
TABLEI.
T_ROLETABLETABLETYPESTYLESFieldnameDatatypeLengthAllownullPrimarykeyNotesUsernamevarchar15NYPasswordvarchar15NTABLEII.
T_USERTABLEFieldnameDatatypeLengthAllownullPrimarykeyNotesUsercodevarchar30NYNamevarchar20NSexchar2NIDnumbervarchar18NPhonevarchar15NAddressvarchar50NWatermetercodingvarchar20YTABLEIII.
T_WATERTABLEFieldnameDatatypeLengthAllownullPrimarykeyNotesNumbernchar15NYWatermetercodingnchar15YWaterconsumptionfloat0YTimedatetime0YTABLEIV.
T_READDATATIMETABLEFieldnameDatatypeLengthAllownullPrimarykeyNotesNumbervarchar50NYStatetinyint0YC.
DesignoftheServerSoftwareThefunctionofserverismainlykeepingconnectwithconcentrator,queryingtableT_readingTimeandcheckingstatusvalueinthetable,ifstatusvalueequals1,meaningmeterdatashouldbeuploadtoserver;afterreceivingdata,serverdecodesdataandupdatedatabasedata,displaysitatuserinterface.
(1)DesignoftheServerSoftwareServersoftwaredesignprocessisshowninFig.
3.
(2)DetectionmoduleDetectionmoduleprocessisshowninFig.
4.
BeginOpenlinkButtonpressEstablishTCPServerEstablishReadTimerWhetherthereisaconnectionEstablishClientFuncNYNYFigure3.
TheserversoftdesignprocessBeginDatareadingtimeThreadhangupIfitisthelastcodeRecordthecurrentpasswordSendtoallconcentratortogetdataNYNYFigure4.
ThedetectionmoduleflowchartD.
DesignoftheClientClientsideconsistsofdatastatistics,customerinformationmanagement,usermanagementandsystemsettings.
Datastatisticsisachievedbasedoncustomernameandtimespan,customerinformationmodulecanaddcustomers,deletecustomersandmodifycustomersinformation,administratorscanchangethepasswordthroughusermanagement.
ClientSidefunctionalblockdiagramisshowninFig.
5.
ClientUserloginStatisticaldataCustomerinformationUsermanagementSystemsettingsFigure5.
TheclientfunctionblockdiagramFigure6.
DatastatisticsUserscanqueryallcustomers'waterusageinformation,thenonlythetotalstatisticalquery,whencometoindividualcustomer,theusageinformationcanbequeriedtotallyorpartially,UserinterfaceisshowninFig.
6.
IV.
CONCENTRATORDESIGNA.
TheBlockDiagramofConcentratorSystemConcentratorbasedonARM9andLinuxoperationsystem[10,11],consistsofEthernet,serialcommunications,resetcircuit,powersupplymoduleandsoon.
ConcentratorsystemblockdiagramshowninFig.
7.
S3C2440PowermoduleClockcircuitResetcircuitEthernet485communicationFigure7.
TheblockdiagramofconcentratorSystemB.
SystemConcentratorSoftwareDesignInsoftwaredesign,Linuxmultithreading,Socketcommunication,serialcommunication,filemanipulationtechniquesareinvolved.
Thetotaloffoursub-systemsofthreads,andtheirfunctionistoreaddata,writedatavianetwork,readdataandwritedataviaserialports.
Whentheprogramstarts,itreadsSr.
llzfile,thefilewillbeencodedintoasinglelinklistinordertocommunicatetothemeterlater.
InUbuntu10.
04generatesanARMexecutableprogrambyarm-linux-gcc,thentheprogramwillbeportedtoARM,addedtothestartupitems,theprogramcanautomaticallystartatboottime.
ProgramflowchartisshowninFig.
8.
BeginReadfileConnecttoserverOpentheserialportCreates4threadsSerialreadthreadSerialsendthreadNetsendthreadNetreadthreadWaitforthe4threadendsClose(serialfd)Close(socketfd)DestroythelinkedlistEndFigure8.
TheconcentratordesignprocessV.
THENETWORKWATERMETERDESIGNNetworkWaterMeterisbasedonSCM,themainfunctionsisreadingthepulseviaSCM,thenmakeanalysisandcalculation,convertingintowaterdosage,showingitinthe12864LCD,andstoringitintheAT24C16,whenthedatauploadcommandisreceived,uploadingdataby485bustoconcentratorwhichthenuploadittohostcomputerviaEthernet.
MeterblockdiagramshowninFig.
9.
STC89C52PowermoduleClockcircuitResetcircuitLCDDatastorage485communicationFigure9.
ThewatermeterblockdiagramA.
WaterFlowAcquisitionModuleInthewatermeteracquisitionmodule,thewaterflowsensoristhecore.
Waterflowsensorismainlymadeofaplasticbody,theflowoftherotorassemblyandtheHallsensor.
UsingUSN-HS21TBHallflowsensorinthiswatermeterandthesensoriscalculatedasEq.
1.
F(Hz)=8.
1*flowrate(Q)-6(l/min)Q=L/Min(1)Figure10.
Thesquare-wavepulseThewaterflowsensormountedinletsidetodetectwaterflow,whentheflowofwaterthroughtherotorassembly,magneticrotorandspeedchangesastheflowratechanges,theHallsensoroutputcorrespondingsquarewavepulsesignalbacktothecontroller,whichdeterminesthedosageofthewaterflow,calculatetheactualwaterconsumption.
SquarewavepulsesignalisshowninFig.
10.
B.
SoftwareDesignThedesignofwatermetersoftwareadoptsthemodularprogramming,whichisshowninFig.
14.
BeginLCDinitializationIICinitializationUARTinitializationIftheconnectionconcentratorWhile(1)ReadpulsedataLCDIftheserialportreceivedataSendingdatatotheconcentratorbythe485busNYNYFigure14.
TheflowchartofwatermetersoftwaredesignC.
DesignTestingAnalysisofSystemWhentheservertaskstarting,itwillsetuptaskexecutioncycle,thatcycleofreadingthemeterdataandtheserverreadsthedatabase.
Ifitneedstoreadthewatermeterdata,thensendscommandstoconnectconcentrators.
AfterconcentratorsreceivesGETDATAcommands,sendsreadingmetercodingtoeachmeterinsinglelinkedlist,ifconsistentwithitsowncode,metersendmeterdatatotheconcentratorthrough485bus,concentratorthensenddatatotheserver.
Throughoutthetest,themeterdataissenttoserverbetween0-9.
D.
TestingResults(1)Thewatermeterreceivedcodefromtheconcentrator.
(2)ConcentratorreceivestheGETDATAcommand,andsendscodetowatermeter,receivewatermeterdata.
(3)Theserverreadthedatabase,sendsGETDATAtotheconcentrator,receivingareadisplaysthereceiveddata,andupdatesthedatabasethroughanalysis.
(4)Thepartoftheclientreadsthedatabaseandobservestheupdatedresultsofwateryield.
VI.
CONCLUSIONThispaperdescribesadesigntodeveloparemotecentralizedreadingmetersystemwhichcombinedsoftwareandhardwareusing485busandEthernetasdatatransmitmedia.
ServercansendreadcommandtoeachconcentratorviaEthernet,concentratorthensendcommandtoeachwatermeter,watermetersentmeterdatatotheconcentratorthrough485busafterreceivingthecommand,andthentheconcentratoruploaddataviaEthernettotheserver.
Clientsidecanviewandcontrolconsumers'watermeters.
Thevariousfunctionsofthesystembasicallycompleted,buttherearesomeneedsfurtherimprovement.
Concentratorprogramisaterminalprogram,thenextsteptocompletetheinterfacedesignandrealizeusingotherdatabaseasdatastore.
Eveniftheserverfailsoristurnedoff,thedatacanbesavedintime.
Itwillreadsthedatainconcentratordatabasewhentheserveristurnedon.
ACKNOWLEDGMENTThisworkwassupportedinpartbythescienceandtechnologyresearchprojectofeducationdepartmentofHenanProvince(14A510009),thefundingschemeforyouthteacherofHenanProvince(2012GGJS-191),thescienceandtechnologykeyprojectofHenanProvince(142102210568,142102210063).
REFERENCES[1]Z.
J.
Zhang,Y.
Li,andW.
Q.
Yuan,"Metercharacterrecognitionmethodbasedongraytemplatematching,"Proceedingsofthe29thChineseControlConference,Beijing,China,2010.
[2]C.
S.
Fredrick1,"Smartwatermeteringnetworksanintelligentinvestment,"WaterandWastewaterInternational,vol.
26,pp.
16-19,2011.
[3]M.
M.
Al-Rawahi,Z.
Nabeel,andM.
Ahmed,"Amultisensoryintelligentdeviceforreal-timemultiphaseflowmeteringinoilfields,"IEEETransactionsonInstrumentationandMeasurement,vol.
59,pp.
1507-1519,2010.
[4]R.
Gomes,A.
S.
Marques,andJ.
Sousa,"DecisionsupportsystemtodividealargenetworkintosuitableDistrictMeteredAreas,"WaterScienceandTechnology,vol.
65,pp.
1667-1675,2012.
[5]J.
J.
Li,J.
J.
Cui,andL.
L.
Jiang,"Designandimplementationofdistributedremote-readingwatermetermonitoringsystembasedonSaaS,".
LectureNotesinElectricalEngineering,vol.
107,pp.
413-420,2012.
[6]N.
Wu,Y.
J.
Guo,Y.
Q.
Wei,"DesignoftheremotewirelessmeterreadingsystembasedonGPRS,"Telkomnika-IndonesianJournalofElectricalEngineering,vol.
11,pp.
6358-6366,2013.
[7]S.
R.
Mounce,J.
B.
Boxall,andJ.
Machell,"Developmentandverificationofanonlineartificialintelligencesystemfordetectionofburstsandotherabnormalflows,"JournalofWaterResourcesPlanningandManagement,vol.
136,pp.
309-318,2011.
[8]C.
Wang,"Thedesignofthedataacquisitionmodeofwirelessintelligentremotewatermetersysteminthehigh-risebuilding,"2011InternationalConferenceonControl,AutomationandSystemsEngineering,Singapore,2011.
[9]J.
M.
Li,ParadigmDevelopmentofSQLServer.
TsinghuaUniversityPress,2010.
[10]L.
G.
Zhou,TheARMEmbeddedFoundationCourse.
Beijing,Beijinguniversityofaeronauticsandastronauticspress,2008.
[11]M.
Young,TheTechnicalWriter'sHandbook.
MillValley,CA:UniversityScience,1989.

盘点AoYoZhuJi傲游主机商8个数据中心常见方案及八折优惠

傲游主机商我们可能很多人并不陌生,实际上这个商家早年也就是个人主机商,传说是有几个个人投资创办的,不过能坚持到现在也算不错,毕竟有早年的用户积累正常情况上还是能延续的。如果是新服务商这几年确实不是特别容易,问到几个老牌的个人服务商很多都是早年的用户积累客户群。傲游主机目前有提供XEN和KVM架构的云服务器,不少还是亚洲CN2优化节点,目前数据中心包括中国香港、韩国、德国、荷兰和美国等多个地区的CN...

阿里云金秋上云季,云服务器秒杀2C2G5M年付60元起

阿里云(aliyun)在这个月又推出了一个金秋上云季活动,到9月30日前,每天两场秒杀活动,包括轻量应用服务器、云服务器、云数据库、短信包、存储包、CDN流量包等等产品,其中Aliyun轻量云服务器最低60元/年起,还可以99元续费3次!活动针对新用户和没有购买过他们的产品的老用户均可参与,每人限购1件。关于阿里云不用多说了,国内首屈一指的云服务器商家,无论建站还是学习都是相当靠谱的。活动地址:h...

[6.18]IMIDC:香港/台湾服务器月付30美元起,日本/俄罗斯服务器月付49美元起

IMIDC发布了6.18大促销活动,针对香港、台湾、日本和莫斯科独立服务器提供特别优惠价格最低月付30美元起。IMIDC名为彩虹数据(Rainbow Cloud),是一家香港本土运营商,全线产品自营,自有IP网络资源等,提供的产品包括VPS主机、独立服务器、站群独立服务器等,数据中心区域包括香港、日本、台湾、美国和南非等地机房,CN2网络直连到中国大陆。香港服务器   $39/...

ubuntu10.04为你推荐
梦之队官网史上最强的nba梦之队是哪一年www.983mm.comwww.47683.comwww.gegeshe.comSHE个人资料sesehu.com68lolita com是真的吗lcoc.topoffsettop和scrolltop的区别baqizi.cc和空姐一起的日子电视剧在线观看 和空姐一起的日子全集在线观看sodu.tw台湾人看小说的网站是www.147.qqq.comWWW147EEE.COM这个网站现在改哪个网址了月风随笔写风的作文网页源代码网页的HTML代码
域名查询工具 樊云 百度云100as 163网 2017年万圣节 空间服务商 100x100头像 我爱水煮鱼 linux空间 免费个人空间 免费cdn vip域名 域名dns 河南移动梦网 广州虚拟主机 ledlamp 97rb netvigator 数据湾 美国主机侦探 更多