基于Labview的多点温度采集系统设计1基于Labview的多点温度采集系统设计摘要温度测控在、日常生活、农业、工业以及军用领域是不可缺少的。如何在这些领域中实现准确的温度测控是在这个领域中的一个研究中,本系统利用虚拟仪器技术结合单片机技术来实现多点温度数据采集、处理、显示以及超限报警等功能,以实现远距离的同步报警[1]。围绕这一研究目标,具体研究如下:(1)设计基于Labview的多点温度采集系统结构。分为基于Labview的上位机系统和基于51单片机和DS18B20温度传感器的下位机系统。有两种方案,一种为一台PC机连接多个单片机,每台单片机带一个温度传感器,另一种为一台PC机带一台单片机,一台单片机带有多个温度传感器。(2)设计下位机温度采集系统。下位机主要由一台51单片机和一个温度传感器组成。考虑到超限报警后温度需要调控,所以设计出了温度超限后自动控制继电器动作,来仿真温度调控过程。在实际应用中可以考虑使用空调机等调温设备。下位机系统的功能包括温度采集,温度调控,以及温度值的数码管显示[2]。(3)编写Labview程序实现多点温度数据采集、数据存储、图表显示。首先是在串口通信程序。第二是用图表和显示控件对温度进行显示以及用布尔控件显示超限报警。第三是采集的温度值结合采集的时间存入对应的文件夹当中。(4)硬件的仿真与调试。使用了单片机开发板进行了硬件的仿真。仿真内容有单片机发送数据到串口(以一台单片机为例),上位机进行串口数据采、显示以及存储。关键词:温度采集,虚拟仪器,串口通信,温度调控基于Labview的多点温度采集系统设计2DESIGNOFMULTI-POINTTEMPERATURECOLLECTINGSYSTEMBASEDONLABVIEWABSTRACTTemperaturemeasurementandcontrolinthedailylife,agriculture,industryandmilitaryfieldsisindispensable.Howtoachieveaccuratetemperaturemeasurementandcontrolintheseareasisastudyinthisfield,thesystemusesvirtualinstrumenttechnologycombinedwithsingle-chiptechnologytoachievemulti-pointtemperaturedataacquisition,processing,displayandoverrunalarmandotherfunctionstoachieveDistanceofthesynchronizedalarm.Aroundthisresearchgoal,thespecificresearchesareasfollows:(1)Designofmulti-pointtemperatureacquisitionsystembasedonLabview.IsdividedintoLabelerbasedonthehostcomputersystemandbasedon51single-chipandDS18B20temperaturesensorunderthemachinesystem.Therearetwokindsofprograms,oneforaPCtoconnectmultiplemicrocontrollers,eachwithasingletemperaturesensor,theotherforaPCwithasinglechip,asinglechipwithanumberoftemperaturesensors.(2)Designoflowercomputertemperatureacquisitionsystem.Thelowercomputerismainlycomposedofa51singlechipandatemperaturesensor.Takingintoaccountthetemperaturelimitafterthealarmcontrol,sothedesignofthetemperatureoverrunautomaticcontrolrelayactiontosimulatethetemperaturecontrolprocess.Inpractice,youcanconsidertheuseofairconditionersandotherthermostatequipment.Thefunctionsofthelowercomputersystemincludetemperatureacquisition,temperaturecontrol,andtemperaturedigitaldisplay.(3)WriteLabviewprogramtoachievemulti-pointtemperaturedataacquisition,datastorage,chartdisplay.Thefirstisintheserialcommunicationprogram.The基于Labview的多点温度采集系统设计3secondistousethechartanddisplaycontrolstodisplaythetemperatureandusetheBooleancontroltodisplaytheoverrunalarm.Thethirdisthecollectionofthetemperaturevaluecombinedwiththecollectionoftimeintothecorrespondingfolder.(4)Hardwaresimulationanddebugging.Usingthemicrocontrollerdevelopmentboardforhardwaresimulation.Simulationofthecontentsofasinglechiptosenddatatotheserialport(withasinglechipasanexample),thehostcomputerforserialdatamining,displayandstorage.Keywords:Temperaturecollection,virtualinstrument,Serialcommunication,temperaturemonitoring基于Labview的多点温度采集系统设计4目录1绪论.........................................................................................................................11.1课题背景及其研究意义..............................................................................11.2虚拟仪器的国内外研究现状......................................................................11.2.1国外研究现状....................................................................................11.2.2国内研究现状....................................................................................21.3本文主要工作..............................................................................................22温度采集系统整体设计.........................................................................................32.1虚拟仪器的基本构成..................................................................................32.2Labview语言和程序结构以及编程模式介绍...........................................42.3系统的设计要求及方案..............................................................................42.3.1系统的设计要求................................................................................42.3.2系统的设计方案................................................................................42.3.3系统的结构........................................................................................52.3.4数据采集流程设计............................................................................62.4本章小结......................................................................................................63系统的硬件设计.....................................................................................................73.1系统的硬件组成..........................................................................................73.2下位机电路组成..........................................................................................73.3RS-232/RS-485转换器...............................................................................83.3.1RS-232/RS-485转换器介绍.............................................................83.3.2性能参数............................................................................................83.3.3接线和信号........................................................................................93.3.4安装及应用........................................................................................93.4DS18B20