CN103017921A - Networked multipoint temperature monitoring system and method for performing data communication between upper computer and same - Google Patents

Networked multipoint temperature monitoring system and method for performing data communication between upper computer and same Download PDF

Info

Publication number
CN103017921A
CN103017921A CN 201210407947 CN201210407947A CN103017921A CN 103017921 A CN103017921 A CN 103017921A CN 201210407947 CN201210407947 CN 201210407947 CN 201210407947 A CN201210407947 A CN 201210407947A CN 103017921 A CN103017921 A CN 103017921A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
data
temperature
configuration
alarm
multi
Prior art date
Application number
CN 201210407947
Other languages
Chinese (zh)
Inventor
艾红
Original Assignee
北京信息科技大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date

Links

Abstract

The invention discloses a networked multipoint temperature monitoring system and a method for performing data communication between an upper computer and the same. The method comprises the following steps of: installing force-control configuration monitoring software in the upper computer; connecting the multipoint temperature monitoring system with the upper computer by an RS485 interface via a single ship; performing equipment configuration in the upper computer via the force-control configuration monitoring software; and performing data configuration, namely, offset address distribution of data, via the force-control configuration monitoring software. In the method disclosed by the invention, after the networked multipoint temperature monitoring system is in communication connection with the upper computer via the RS485 interface, and the communication is performed after the equipment configuration of the force-control software and the data configuration, so that the upper computer can be used for displaying acquired multipoint temperature values in real time by the force-control configuration software, so as to be convenient to monitor and manage, thus solving the problems that the interference is easy to cause during the remote transmission, and a transmission signal is weak during the remote transmission.

Description

网络化多点温度监测系统及其与上位机数据通信的方法技术领域[0001] 本发明涉及一种网络化多点温度监测系统与上位机的通信方法。 Networked multi-point temperature monitoring system and method of the art to PC data communication [0001] The present invention relates to a network monitoring system with multi-point temperature with the host computer communication method. 背景技术[0002] 温度实时显示系统的应用也越来越广泛,温度测量在工业控制、医疗仪器、家用电器等各种温度控制系统中的广泛应用,由过去的单点测量向多点测量发展。 [0002] Real-time display the temperature of the system has become increasingly widespread, widely used in industrial control, medical equipment, household appliances and other temperature control system temperature measurement, measured by a single point to multi-point measurement of past development . 比如空调遥控器上当前室温的显示、热水器温度的显示等。 Such as the air conditioner remote control display of the current temperature, the heater temperature display. [0003]目前,在多点温度检测系统中,关键是对多个采样点的温度进行监测。 [0003] Currently, multi-point temperature detection system, the critical temperature of the plurality of sample points to be monitored. 多点温度监测系统一般是通过单片机来控制,采集温度传感器的温度数据,再传输到上位监控计算机进行显示。 Multi-point temperature monitoring system is generally controlled by the microcontroller, temperature sensor, temperature data acquisition, and then transmitted to the monitor computer display. 在传统多点温度测量系统中,温度传感器与计算机接口的连接是通过若干条导线连接的,这样,在一个室内多点温度测量系统中,接线会非常多,导线往往不易铺设,使得测量工作非常困难。 In conventional multi-point temperature measurement system, connected to a temperature sensor and the computer interface is connected by a plurality of wires, so that, in an indoor multi-point temperature measurement system, the junction will be very much, wires are often difficult to lay, so that the measurement work is very difficult. 又由于目前采用数据线直接与监控上位机连接,在通过上位监控计算机进行实时监控时,存在着不能有效将多点温度监测系统实时采集的多点温度数据传输到上位监控计算机的问题,当传感器数量较多,并且信号需要长距离传输时,会出现信号线相互之间容易产生干扰、传输信号不强的问题。 And because currently used data line is connected directly with the monitoring PC, when the real-time monitoring by the monitor computer, there is a multi-point temperature data transmission can not effectively be multi-point temperature monitoring system for real-time collection of problems monitor computer, and when the sensor quantity large, and when the signal transmission over long distances, interference easily occurs between the signal line to each other, the transmission signal is not strong problem. 发明内容[0004] 本发明的目的在于克服上述不足之处而提供一种网络化多点温度监测系统及其与上位机数据通信的方法,旨在解决目前的多点测温系统的传感器与计算机接口的连接是通过若干条导线连接而产生的接线非常多,导线不易铺设,使得测量工作非常困难的问题, 并解决目前不能有效地通过远程方式实时显示网络化多点测温系统实时采集的多点温度数据进行有效监控的问题。 [0004] The present invention is to overcome the above disadvantages and to provide a network monitoring system and multi-point temperature and the host computer data communications method, intended to solve the multi-point temperature sensors and computer systems wired interface is generated by connecting a plurality of wires is very large, difficult to lay wires, so that the measurements very difficult problem, and can not effectively solve the remotely networked multi display real-time temperature measurement system real-time collection of multiple data point temperature effective monitoring problems. [0005] 为实现上述目的,本发明所采用的技术方案是:一种网络化多点温度监测系统,包括多个用于测量多点温度的数字温度传感器、控制器;所述控制器包括一与所述数字温度传感器经单总线连接的单片机,与所述单片机连接的键盘、数据存储器、显示模块以及报警模块;所述单片机包括中央处理器以及:温度数值读取模块,用于读取所述数字温度传感器采集的温度数据后发送至所述显示模块进行显示。 [0005] To achieve the above object, the technical solution employed in the present invention is: A networked multi-point temperature monitoring system comprising a plurality of multi-point temperature measurements for digital temperature sensor, a controller; said controller comprises a the digital temperature sensor is connected via a single bus of the microcontroller, the microcontroller is connected with a keyboard, data storage, display module and alarm module; includes a central processor and a microcontroller: the temperature value read means for reading the after the temperature of the temperature sensor to collect said digital data transmitted to the display module for display. [0006] 温度报警查询模块,用于查询判断所述数字温度传感器采集的测量点的温度值是否超出预设上下限温度报警触发值;在触发时通过所述报警模块报警。 [0006] temperature alarm query module, a query for determining said digital measurement point temperature collected by the sensor temperature value exceeds the preset upper limit temperature alarm trigger value; when the alarm is triggered by the alarm module. [0007] 所述单片机包括:数据通路选择模块,用于选择某一路数据通路来读取所述数字温度传感器的温度数据。 [0007] The microcontroller comprising: a data path selection means for selecting a road data path to read the temperature data of the digital temperature sensor. [0008] 历史报警数据输出模块,用于根据输入指令输出历史报警数据到所述显示模块显/Jn ο[0009] 传感器损坏识别模块,用于通过和校验方式判断所述数字温度传感器是否损坏,在判断损坏时输出错误提示信息至所述显示模块提示告知。 [0008] The alarm history data output means for outputting alarm history data according to an input instruction to the display module significant / Jn ο [0009] sensor damage recognition module, for determining whether the check mode and by digital temperature sensor is damaged It outputs an error message when the damage is determined to inform the display module prompts. [0010] 报警参数设定模块,用于设定每个数字温度传感器的上下限温度报警值。 [0010] Alarm parameter setting means for setting each of the digital temperature sensors on the temperature alarm limit value. [0011] 定检模块,用于根据定检指令启动定检程序进行指定区域或空间的多点温度监测。 [0011] scheduled inspection module for multi-point temperature monitoring designated area or space object program based on a given start command given subject. [0012] 所述报警参数设定模块包括:参数输入单元,用于输入每个数字温度传感器的上下限温度报警值参数。 [0012] The alarm parameter setting module comprises: a parameter input unit for inputting the temperature alarm limit values ​​of the parameters of each digital temperature sensor. [0013] 输入参数判断单元,用于判断所述的输入参数与预存的参数规范是否符合。 [0013] Input parameter determination unit for inputting parameters with pre-stored specification parameters determining the compliance. [0014] 输入参数写入单元,用于所述的输入参数符合预存的参数规范时,将所述输入的参数数据写入到对应的数字温度传感器中。 [0014] Input parameter writing unit, when the input parameters of the parameter specifications comply with the pre-stored, the parameter data is written to the corresponding input of the digital temperature sensors. [0015] 输入参数错误提示单元,用于所述的输入参数不符合预存的参数规范时,发出错误提示信息。 When the [0015] input parameter error means, said input parameters for the stored parameters do not meet specifications, issues an error message. [0016] 还包括一上位机,内置组态监控软件,与所述的单片机通信连接,用于通过所述单片机获取、实时显示所述数字温度传感器采集的温度数据以及所述单片机存储的数据,进行实时远程监控与管理。 [0016] further comprising a host computer, built-in monitoring software configuration, communication with the microcontroller is connected with, for obtaining by said microcontroller, digital temperature sensor data collected by the temperature data and storing real-time display of the microcontroller, real-time remote monitoring and management. [0017] 一种网络化多点温度监测系统与上位机的通信方法,包括以下步骤:在上位机中安装力控组态监控软件;将多点温度监测系统通过单片机与上位机用RS485接口连接;在上位机中通过所述力控组态监控软件进行设备配置;通过所述力控组态监控软件进行数据组态,即进行数据的偏移地址分配。 [0017] A network communication method in multi-point temperature monitoring system and the host machine, comprising the steps of: mounting force control configuration monitoring software in the host computer; multi-point temperature monitoring system by the microcontroller and PC connected to the RS485 interface ; performed in the host computer by the power control device configuration monitoring software configuration; configuration data by the configuration monitoring software power control, i.e., the offset address allocation data. [0018] 所述设备配置包括设置更新周期、超时时间、设备地址、通信方式、设备名称、设备描述、设备扫描周期、数据包采集失败后重试次数以及下置失败次数,通信串口参数、串口波特率以及校验方式。 [0018] The apparatus includes a configuration update cycle, the timeout, device address, the communication mode, device name, device description, the device scan cycle, data packet acquisition failure retry counter and the number of failures, serial communication parameters, serial baud rate and parity mode. [0019] 在数据组态时,将0-19地址组态为温度值,20-29地址组态为报警上限值,30_39 地址组态为报警下限值。 [0019] When the configuration data, the address is configured as a temperature value 0-19, 20-29 configured as an address to the alarm limit value, 30_39 address configured for the next alarm limit. [0020] 在数据组态时,先对各个温度采集点进行命名,然后对所述采集点的瞬时值、下限报警值、上限报警值进行组态,数据显示时温度的整数和小数采用两个字节分别显示,且只在要显示整数数据的点上组态上限报警和下限报警值的偏移地址。 [0020] When the configuration data, the first collection point for each designated temperature, and then the instantaneous value of the collection points, the lower limit value of the alarm, the alarm limit values ​​configuration, when the temperature data is displayed using two integer and fractional bytes are shown, and only the configuration of the offset address is to be displayed and low alarm limit value of the integer data point. [0021] 所述上位机通过所述的力控组态软件读数据命令格式为: [0021] The host computer reading the software configuration of the power control data command format is:

Figure CN103017921AD00051

STX为报文开始码,ETX为报文结束码,OD为回车,OA为换行;Sta是设备地址,与在力控组态软件组态时建立的设备地址相同,R是读标志,DataType表示需要交换的数据类型, DataAddr是数据偏移地址,低字节在前,高字节在后;DataNum是要读取数据的数量,LRC 是从第一个字节至LRC前的所有字节的异或值。 STX is a packet start code, ETX as end of message code, OD carriage return, OA was wrapping; Sta device address, device address established with the same force when configured in the control configuration software, R is a sign reading, DataType indicates the type of data to be exchanged, DATAADDR offset address data, low byte first, high byte; DataNum is the number of data to be read, all the LRC bytes before the first byte of the LRC to XORed. [0022] 所述上位机通过所述的力控组态软件写数据命令格式为: [0022] The host computer write data through software configuration of the power control command format is:

Figure CN103017921AD00052

STX为报文开始码,ETX为报文结束码,OD为回车,OA为换行,Sta是设备地址,与在力控组态软件组态时建立的设备地址相同,W是写标志,DataType表示需要交换的数据类型, DataAddr是数据偏移地址,低字节在前,高字节在后,Data是实际传输的数据,低字节在前,高字节在后;LRC是从第一个字节至LRC前的所有字节的异或值。 STX is a packet start code, ETX as end of message code, OD carriage return, OA is a wrap, Sta device address, device address established with the same force when configured in the control configuration software, W is a write flag, DataType indicates the type of data to be exchanged, DATAADDR offset address data, low byte first, high byte, data is the data actually transmitted, the low byte first, high byte after; the LRC from the first exclusive-oR of all bytes prior to the byte LRC. [0023] 与现有技术相比本发明具有以下特点和有益效果:本发明通过单片机实时采集数字温度传感器的采集的测量点的温度值,通过显示模块实时显示,实现了实时监测多点温度,解决了现有多点测温系统或装置采用普通的模拟温度传感器采集多点温度时,致使传感器与计算机接口的连接是通过若干条导线连接而产生的接线非常多,导线不易铺设,使得测量工作非常困难的问题。 [0023] The present invention has as compared with the prior art the following features and advantages: the present invention is collected in real time through the MCU temperature measurement points acquired digital temperature sensors, real-time display through the display module, to realize real-time monitoring of the multi-point temperature, when wiring solves the multiple temperature measurement system or device using a conventional analog temperature sensor acquisition multi-point temperature, so that the sensor is connected to the computer interface is generated by connecting a plurality of wires is very large, difficult to lay wires, such measurements very difficult problem. 将网络化多点测温系统与上位机通过RS485通信连接后,再通过力控软件进行设备及数据组态后进行通信,使得所述上位机可以用力控组态软件实时显示采集的多点温度值,便于监控与管理,解决了在远程传输时容易受到干扰,而在进行远程传输时,存在传输信号不强的问题。 After the network connection and the multi-point temperature measurement system host computer via RS485 communications, the configuration data, and then the device power control through communication software, such that the host computer may control configuration software hard real-time display of the multi-point temperature collection value, to facilitate monitoring and management, solves the remote transmission susceptible to interference, and during long-distance transmission, a transmission signal is not strong presence problem. [0024]附图说明[0025] 图1所示为本发明实施例提供的多点温度监测系统的原理示意图;图2所示为本发明实施例提供的多点温度监测系统的硬件连接示意图;图3所示为本发明实施例提供的单片机的内部结构框图;图4所示为本发明实施例提供的报警查询流程图;图5所示为本发明实施例提供的数据通路选择流程图;图6所示为本发明实施例提供的报警参数设定模拟的结构框图;图7所示为本发明实施例提供的报警参数设定的流程图;图8所示为本发明实施例提供的定检程序的流程图;图9所示为本发明实施例提供的测温流程图。 [0024] BRIEF DESCRIPTION [0025] FIG. 1 is a schematic principle of the multi-point temperature monitoring system according to an embodiment of the present invention is shown; Figure 2 shows a hardware multi-point temperature monitoring system according to an embodiment of the present invention, connection diagram; FIG 3 a block diagram showing the internal structure of the microcontroller according to an embodiment of the present invention is shown; provided alarm query flowchart embodiment of the present invention shown in FIG. 4; FIG. 5 present invention is shown a flowchart of selecting a data path according to an embodiment; Figure 6 shows a block diagram of the set alarm parameters provided an analog embodiment of the invention; Figure 7 shows a flowchart of setting alarm parameters provided by the embodiment of the invention; FIG. 8 according to an embodiment of the present invention. a flowchart of the regular inspection procedure; FIG. 9 is a flowchart of a temperature measurement of the embodiment of the invention. [0026] 图10所示为本发明实施例提供的步骤流程图。 [0026] The steps of a flowchart of FIG. 10 according to an embodiment of the present invention is shown. [0027] 图11所示为设备配置的窗口画面;图12所示为点组态偏移地址的画面;图13所示为力控组态软件向单片机发送读报文数据格式的画面;图14所示为力控组态软件向单片机发送写报文数据格式的画面;图15所示为组态窗口画面;图16所示为数据下置状态画面。 As shown in [0027] FIG. 11 is a device configuration window screen; Figure 12 shows the configuration of a screen dot offset; FIG. 13 shows the force transmitted to the microcontroller control configuration software read the message data format picture; FIG. as shown in the screen 14 transmits a write message data format to the microcontroller power control configuration software; configuration window screen as shown in FIG. 15; FIG. 16 is a state screen the data. [0028]具体实施方式[0029] 为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图,对本发明进行进一步详细说明。 [0028] DETAILED DESCRIPTION [0029] To make the objectives, technical solutions and advantages of the present invention will become more apparent hereinafter in conjunction with the accompanying drawings, the present invention will be further described in detail. [0030] 参见图广2所示,一种多点温度监测系统,包括多个用于测量多点温度的数字温度传感器、控制器;所述控制器包括一与所述数字温度传感器经单总线连接的单片机,与所述单片机连接的键盘、数据存储器、显示模块以及报警模块;参见图3所示,所述单片机包括中央处理器以及:温度数值读取模块,用于读取所述数字温度传感器采集的温度数据后发送至所述显示模块进行显示;温度报警查询模块,用于查询判断所述数字温度传感器采集的测量点的温度值是否超出预设上下限报警触发值;在触发时通过所述报警模块报警。 [0030] Referring to FIG widely shown, a multi-point temperature monitoring system 2, comprising a plurality of multi-point temperature measurements for digital temperature sensor, a controller; said controller comprises a digital temperature sensor is of the single bus connected to the microcontroller, the microcontroller is connected to the keyboard, a data memory, a display and alarm module module; see Figure, of the microcontroller includes a central processor and a 3: temperature data reading module for reading the digital temperature after the temperature data collected by the sensor is transmitted to the display module for display; query temperature alarm module configured to query the temperature value to determine whether the measurement points acquired digital temperature sensor exceeds a preset upper limit value of the alarm is triggered; when triggered by the warning alarm module. [0031] 参见图4所示,该示出了本发明实施例提供的温度报警查询模块的报警查询流程图。 [0031] Referring to FIG. 4, which illustrates a flowchart of the present invention, the temperature alarm query provided by the alarm module queries embodiment. [0032] 本发明实施例中,温度报警查询模块每次采集到一个传感器的温度后,用测得的温度值和存储器中存储的上下限报警触发值相比较,如果温度值大于上限触发值TH或小于下限触发值TL,则启动报警模块报警。 [0032] In the embodiment, each acquisition module temperature alarm query to a temperature sensor of the embodiment of the present invention, the temperature values ​​and stored measured with stored upper and lower limit alarm trigger value is compared, if the temperature is greater than the upper limit value TH trigger trigger value or smaller than the lower TL, in the alarm start the alarm module. [0033] 本发明实施例中,还包括一报警确认模块,用于在所述的报警模块报警后由用户进行报警确认,关闭所述报警模块报警。 [0033] The embodiments of the present invention, further comprising an alarm confirmation module, alarm module for alarm according to the alarm acknowledged by the user, to close the warning alarm module. 具体实施时,可通过外接输入设备一键盘的确认按键输入确认信号来实现。 In specific implementation, the input acknowledgment signal may be implemented by a device external input confirmation key keyboard. [0034] 较优的,所述的报警模块采用声音报警方式,即通过蜂鸣器进行声音报警;或者报警信息提示方式,即通过所述显示模块显示报警信息,或者两种方式的结合。 [0034] superior, the alarm module using the sound alarm mode, the alarm buzzer sound that is; alarm or prompt manner, i.e. through the display module to display alarm information, or a combination of the two. [0035] 所述的显示模块采用RT12864M液晶显示模块,在液晶屏上可以实时显示所述的数字温度传感器采集的温度值以及时间。 The [0035] display module using RT12864M liquid crystal display module can display the acquired digital temperature sensor and a temperature value on the LCD screen in real time. [0036] 所述的数字温度传感器采用外部供电方式供电。 The [0036] digital temperature sensor power supply external power supply. [0037] 本发明实施例中,所述单片机采用STC89C516RD,所述数字温度传感器采用DS18B20。 Embodiment [0037] of the present invention, the SCM STC89C516RD, the digital temperature sensor DS18B20. 运用DS18B20数字温度传感器的测温原理和它独特的单总线接口方式,可以实现多点测温,由所述的单片机读取温度数据后上传至所述显示模块显示。 DS18B20 measurement principle using a digital temperature sensor and its unique single-bus interface mode, may implement multi-point temperature, the temperature data is read by the microcontroller uploaded to the display module to display. [0038] 由于数字温度传感器DS18B20为单总线结构,一根线上挂接多个传感器时,数据的传输协议具有严格的标准。 [0038] Since digital temperature sensor DS18B20 single bus structure, when a plurality of line sensors mounted, transmission of the protocol data having strict standards. 由于数字温度传感器DS18B20自身的传输距离较短(一般在50 m以内),当采样点和单片机距离较远时,数据便不能够有效的传输,为了实现远距离传输,必须提高其传输能力。 Since digital temperature sensor DS18B20 its transmission distance is shorter (typically less than 50 m), and the microcontroller when the sampling point distance, data transmission will not be effective, in order to achieve long distance transmission, must improve their transmission capacity. [0039] 因此,本发明实施例中,使用RS-485通信接口使单片机与数字温度传感器DS18B20实现通信连接,进行多点温度数据的采集。 [0039] Accordingly, embodiments of the present invention, using RS-485 communications interface enables a digital temperature sensor DS18B20 microcontroller and a communication connection, acquisition of temperature data points. 其硬件连接图参见图2所示。 The hardware connections shown in FIG 2 Referring to FIG. [0040] 本发明实施例采用MAX487芯片把温度信号转换成能够远传的RS-485格式信号, 通过RS-485通信接口可以使信号能够远距离传输。 [0040] Example MAX487 chip employed to convert a temperature signal into RS-485 format signals can be remote, the signal can be made by RS-485 communication interface is capable of long-distance transmission of the present invention. 所述的MAX487的读写信号由单片机控制,数字温度传感器采集到的温度数据这样就能够远距离传输给单片机。 The read and write signals by SCM MAX487, digital temperature sensor the temperature data thus collected can be transmitted long distances to the microcontroller. [0041] MAX487是MAXM公司生产的用于RS-485与RS-422通信的低功耗收发器,每个器件中都具有一个驱动器和一个接收器,能够实现最高250kbps的无差错数据传输。 [0041] MAX487 MAXM is produced by low-power transceiver used to communicate with the RS-485 to RS-422, each device having a driver and a receiver capable of the highest error-free transmission of 250kbps. MAX487 的引脚RO为数据接收端,引脚DI为数据发送端;为接收使能控制端,芯片处于接收数据状态时,必须置为O。 RO MAX487 pin receiving end of the data, the data transmission terminal DI pin; when receiving a enable control terminal, the chip is in the receive data state, must be set to O. 引脚DE为输出使能控制端,芯片处于发送数据状态时,DE必须置I。 Pin DE output enable control terminal, the chip is in the send data state, it must be set DE I. 引脚A为同相输入端与同相输出端,引脚B为反相输入端与反相输出端。 A pin noninverting input terminal of the noninverting output terminal, pin B to an inverting input terminal and the inverting output terminal. [0042] 另外,由于数字温度传感器DS18B20是单总线传输器件,当系统采用外部供电方式时,一根数据线就可以挂接多个测量器件,减少了设备较多时布线的麻烦。 [0042] Further, since the digital temperature sensor DS18B20 single bus transfer device, when the external power supply system, a plurality of data line measuring devices can be mounted, the wiring is reduced when the device more troublesome. 但是当单总线上挂接过多的器件时,则需要增加一路单总线结构。 However, when excessive mounted devices on a single bus, it is necessary to increase all the way to the single bus structure. [0043] 本发明实施例中,以测量10个点的温度数据为例,并采用分两路测量的方法,即每一路挂接5个传感器,分别由单片机的Pl. O与Pl.1 口控制。 Method [0043] embodiment of the present invention, to measure temperature data points 10 for example, and using the measured two routes, i.e. five sensors mounted in each channel, respectively, by the microcontroller Pl. O port and Pl.1 control. 参见图f 2,第一路传感器包含5个,每个温度传感器分别编号f 5,温度数据由单片机Pl. O 口控制,另一路传感器同样包含5个,每个温度传感器分别编号6〜10,由Pl.1 口控制。 Referring to FIG f 2, the sensor comprises a first passage 5, the temperature of each sensor are numbered f 5, temperature data by the microcontroller Pl. O port control, also includes another channel sensor 5, the temperature sensors are each numbers 6~10, controlled by Pl.1 port. [0044] 参见图3所示,本发明实施例中,所述单片机进一步包括有:数据通路选择模块,用于选择某一路数据通路来读取所述数字温度传感器的温度数据。 [0044] Referring to FIG. 3, embodiments of the present invention, the microcontroller further comprising: a data path selecting means for selecting a road data path to read the temperature data of the digital temperature sensor. [0045] 由于采用多路单总线结构进行多点测量,因此本发明实施例中,所述的单片机进一步设有数据通路选择模块,通过该数据通路模块可以实现选择某一数据通路,读取选择的通路传感器温度值,该通路选择后,可通过该数据通路读取与单片机连接的数字温度传感器采集测量点的温度值。 [0045] As a result of a single multiplexed bus structure multi-point measurements, therefore the present embodiment of the invention, the microcontroller is further provided with a data path selection module, the data path module may be achieved by selecting a data path, the read select the passage sensor temperature value, after the channel selection, digital temperature sensor passage may be connected with the microcontroller reads the measured temperature values ​​acquired by the data point. 所述数据通路可是一个,也可以两个,或三个以上。 The data path, but one may be two, three or more. 可通过设置一数据选择通路字节DQ_select,通过对DQ_select设定不同的取值,来决定选择哪条通路。 You may be selected by providing a passage DQ_select byte data, DQ_select by setting different values ​​to decide which of paths. 如DQ_seleCt取值为O时,选择第一通路,否则选择第二通路,读取相应的数据通路的数字温度传感器的温度数据后,所述的DQ_select取值相应置位为I或O。 The DQ_seleCt when the value is O, selecting a first passage, a second passage or selection, reads the temperature data of the corresponding data path of a digital temperature sensor, the corresponding value is set to DQ_select I or O. 数据通路选择流程见图5所示。 Data path selection process shown in Figure 5. [0046] 仍参见图3所示,本发明实施例中,所述单片机还包括:历史报警数据输出模块,用于根据输入指令输出历史报警数据到所述显示模块显示。 [0046] Still referring to FIG. 3, the embodiment of the present invention, the microcontroller further comprising: alarm history data output means for outputting alarm history data to the display module according to an input instruction display. [0047] 当需要查询历史报警数据时,可以通过外部输入设备一键盘输入查询指令,通过该历史报警数据输出模块输出历史报警数据到所述显示模块显示。 [0047] When the need, alarm history data can be entered through the external input device query instruction a keyboard, alarm history data output by the output module historical alarm data to the display module to display. 所述的历史报警数据存储于所述的数据存储器中,在接收到外部命令后,从所述的数据存储器中读取相应的报警数据输出到所述显示模块显示。 The historical alarm data stored in the data store, after receiving the external command, reads the output data corresponding to an alarm from the display module to display the data in the memory. [0048] 仍参见图3所示,本发明实施例中,所述单片机包括:传感器损坏识别模块,用于对传感器进行序列号匹配时,通过判断和校验次数是否超过设定次数来判断所述数字温度传感器是否损坏,超过设定次数时则判断损坏时输出错误提示信息至所述显示模块提示告知。 [0048] Still referring to FIG. 3, the embodiment of the present invention, the microcontroller comprising: a sensor module identification is damaged, the sensor is used for a matching serial number, and the check is determined by the number exceeds a set number of times to determine the said digital temperature sensor is broken, an error message is output to the display module is determined prompt informing damage exceeds the set number of times. [0049] 由于测量的点数较多,如果某测量点的传感器毁坏,则在对这个传感器进行匹配序列号时就会发生错误,序列号匹配程序因此陷入死循环,温度数据读取无法正常进行。 [0049] As more measurement points, a measurement point if the sensor is destroyed, at the time of this sensor to match the serial number error occurs, the sequence number matches the program into an infinite loop so, the temperature data can not be read correctly. 因此当某个传感器发生错误时,应该尽快识别是哪个传感器发生了错误,然后针对提示进行处理,使整个系统恢复正常。 Therefore, when a sensor error, which should be identified as soon as possible sensor error has occurred, and then processed for tips, so that the whole system back to normal. 为此,本发明实施例通过传感器损坏识别模块,对和校验的次数进行设定,如果和校验错误达到设定次数,如5次时,便认定这个传感器已毁坏,然后通过显示模块显示错误信息。 To this end, embodiments of the present invention is damaged by the sensor identification module, and the number of verification set, and if the parity error reaches the set number of times, such as five times, it is determined that the sensor has been destroyed, and then displayed on the display module error message. [0050] 参见图3所示,本发明实施例中,所述单片机还进一步包括:报警参数设定模块,用于设定每个数字温度传感器的上下限温度报警触发值存储于所述数字温度传感器中。 [0050] Referring to FIG. 3, embodiments of the present invention, the microcontroller further comprises: an alarm parameter setting means for setting the temperature of each to the digital digital temperature sensors on the lower limit temperature alarm trigger values ​​are stored sensor. 可通过输入设备,如所述的键盘修改、设定各个数字温度传感器的上下限报警触发值。 Through the input device, such as a modification of the keyboard, each set of digital temperature sensors trigger the alarm limit value. 其上下限温度报警触发值设定程序参见图7所示。 Which upper and lower temperature alarm trigger value setting procedure See FIG. 7. [0051] 参见图6所示,本发明实施例中,所述的报警参数设定模块还包括参数输入单元、 输入参数判断单元、输入参数写入单元以及输入参数错误提示单元;参数输入单元,用于输入每个数字温度传感器的上下限温度报警值参数;写入的数据暂时存储于一个存储空间内;输入参数判断单元,用于判断所述的输入参数与预存的参数规范是否符合;输入参数写入单元,用于所述的输入参数符合预存的参数规范时,将所述输入的参数数据写入到对应的数字温度传感器中;输入参数错误提示单元,用于所述的输入参数不符合预存的参数规范时,发出错误提示信息。 [0051] Referring to FIG 6, the embodiment of the present invention, the alarm module further comprises a parameter setting parameter input unit, the input parameter determination unit, an input parameter writing unit and an input unit error parameter; parameter input unit, the lower limit temperature for the temperature sensor of each digital input alarm parameter; data writing is temporarily stored in a memory space; input parameter determination unit, parameter specification for the input parameters and the pre-stored judgment meets; input parameter writing unit, when said input parameter specifications comply with prestored parameters for the parameter data is written to the corresponding input of the digital temperature sensors; input parameter error means, for the input parameters are not when parameters in line with pre-existing norms, send the wrong message. 该错误信息可以通过所述的显示模块来显示。 This error message can be displayed according to the display module. [0052] 参见图3所示,本发明实施例中,所述的单片机还包括有定检模块,用于根据定检指令启动定检程序进行指定区域或空间的多点温度监测。 As shown in [0052] Referring to Figure 3, an embodiment of the present invention, the microcontroller further comprises a fixed detection module, for performing multi-point temperature monitoring designated area or space object program based on a given start command given subject. 其定检程序参见图8所示。 Referring to its regular inspection procedure shown in FIG. 8. [0053] 通过所述键盘输入定检指令,单片机收到定检指令后,启动所述定检模块;首先, 判断输入的房间号是否正确,正确则初始化对应的数字温度传感器,按照读取程序,读取对应的数字温度传感器采集的温度数据;否则,通过显示模块显示输入错误。 After [0053] through the keyboard commands given subject, the subject microcontroller receives instruction set, starting the regular inspection module; first, determines whether the input room number is correct, the correct corresponding digital temperature sensor initializing, reads the program in accordance with , reads the corresponding digital temperature data collected by the sensor; otherwise, an error display input through the display module. [0054] 参见图1所示,本发明实施例中,所述的多点温度监测系统,还包括一上位机,其内置组态监控软件,与所述的单片机通信连接,用于通过所述单片机获取、实时显示所述数字温度传感器采集的温度数据以及所述单片机存储的数据,包括温度历史数据、历史报警数据等,同时,提供报表打印及温度报警,进行实时远程监控与管理。 [0054] Referring to Figure 1, the embodiment of the present invention, the multi-point temperature monitoring system, further comprising a host computer, which built-in monitoring software configuration, connected to the microcontroller and the communication, through said acquiring microcontroller, a digital temperature sensor and temperature data collected by the microcontroller is stored in real time data display, including a temperature history data, alarm history data, etc., while providing the temperature alarm and report printing, real-time remote monitoring and management. [0055] 本发明实施例中,所述的组态监控软件采用力控组态软件。 Embodiment [0055] of the present invention, the configuration monitoring software force control configuration software. [0056] 单片机响应所述监控计算机,通过串口将采集并存储的温度数据按照一定格式, 上传给上位机进行实时显示。 [0056] The microcontroller in response to said monitoring computer, through the serial port and the temperature of the collected data stored in a certain format, real-time display uploaded to the host computer. 所述的监控计算机按照相应的通信协议接收到单片机上传的温度数据后,完成原始温度数据记录,利用组态软件即可实现对多点温度信号的实时监测, 同时实现温度报警、温度历史数据及历史报警数据显示、打印报表等工作以及系统运行情况显示等,从而实现通过所述的监控计算机可对采集的温度数据进行全面的管理和控制。 After the monitoring computer receives temperature data uploaded microcontroller according to the corresponding communication protocol, to complete the raw temperature data recorded to the multi-point real-time monitoring of the temperature signal configuration software, while achieving temperature alarm, and temperature history data historical alarm data display, and print reports, etc. the system display operation, may be made in order to achieve comprehensive management and control of the temperature data collected by the monitoring computer. [0057] 本发明实施例中,所述的上位机与所述单片机通过所述的RS-485接口连接通信。 Embodiment [0057] of the present invention, the microcontroller is connected to the host computer through said communication RS-485 interface. 采用RS-232标准传输数据时,传输的距离会受到限制,通过所述RS - 485接口,实现了上位机与单片机之间远程通信。 When using the RS-232 standard data transmission, the transmission distance is limited by the RS - 485 interface, communication between the host computer and the remote MCU. [0058] 上位机通过数据读取程序,向单片机循环发送相应的读数据格式。 [0058] The program data read by the host computer, the read data transmission format corresponding to the microcontroller cycle. 其中数据类型为数据组态时定义的数据类型,数据地址为要读取的第一个数据的偏移地址,数据个数为组态时定义的点数;当单片机通过串口收到上位机发来的正确数据格式后,向上位机发送响应读数据格式命令,在这个命令格式中便包含了单片机向上位机所要传送的数据,上位机根据数据的偏移地址,把接收到的数据存储到相应的地址空间,这样就完成一次数据传输。 Wherein the data type is a data type defined when the configuration data, address data offset address of the first data to be read, when the number of data points defined configuration; when the microcontroller receives through the serial port sent to the host computer after the correct data format, to the upper sends response to the read data format command, the command format will comprise the single-chip data to the upper unit to be transferred, the host computer the offset address of the data, the received data is stored into a corresponding address space, thus completing a data transfer. [0059] 当上位机改变某个数据后,就会向单片机发送写数据命令格式,在这帧数据格式里包含了上位机要写的数据,当单片机正确接收到这帧数据,并从中取出数据后,发送应答写数据格式,完成一次写数据的操作。 [0059] When the host computer to change a data, the microcontroller will send the write data command format, in which the frame data format of the data to be written contains the host computer, when the microcontroller receives this frame data correctly, the data is removed therefrom after sending the response write data format, to complete the operation time to write data. [0060] 下面对本发明所述多点测温监控系统的多点测温程序流程说明如下:根据DS18B20的通信协议,要依次对DS18B20初始化、发ROM功能命令、发存储器操作命令,当发温度转化命令后,往往要延时足够的时间完成温度的转化,这样当传感器较多时,循环采集一次的时间往往就比较长,使得采集的温度数据实时性降低。 [0060] Hereinafter, the present invention is the multi-point temperature of the multi-point temperature monitoring system program flow as follows: The DS18B20 communication protocol, to sequentially DS18B20 initialization, send ROM function command, the memory operation command issued when the temperature of the reforming hair command, the delay tends to be sufficient time to complete the transition temperature, so that when the sensor is large, the acquisition cycle a relatively long time is often such that the temperature of the real-time data acquisition decreases. [0061] 为了提高多个传感器数据采集的效率,本发明实施例中,在读取传感器温度数据时,先执行跳过ROM命令,然后发温度转化命令,使所有传感器同时进行温度转化,温度转化完成后,再依次发每个传感器的序列号,读取相应的温度值。 [0061] In order to increase efficiency of data collection plurality of sensors, embodiments of the present invention, the temperature sensor when reading data, perform skip command ROM, and then send a command conversion temperature, at the same time all the temperature sensors conversion, conversion temperature When finished, send sequence number of each sensor sequentially reads the corresponding temperature value. 多点测温程序流程图如8所/Jn ο参见图10所示,一种网络化多点温度监测系统与上位机的通信方法,包括以下步骤: SlOl:在上位机中安装力控组态监控软件;S102:将多点温度监测系统通过单片机与上位机用RS485接口连接;S103:在上位机中通过所述力控组态监控软件进行设备配置;S104:通过所述力控组态监控软件进行数据组态,即进行数据的偏移地址分配。 The multi-point temperature program flowchart 8 / Jn ο Referring to FIG. 10, a method for a communication network with multi-point temperature monitoring system with the host computer, comprising the steps of: SlOl: mounting force control configuration in the host computer monitoring software; S102: the multi-point temperature monitoring system is connected via the microcontroller and PC RS485 interface; S103: carried out by the power control device is configured to monitor configuration software in the host computer; S104: configuration control by the power control software for data configuration, i.e., the offset address allocation data. [0062] 通过力控组态软件进行组态时,首先进行设备配置,打开设备配置窗口,如图11 所示,进行相应的设备配置,所述设备配置包括设置更新周期、超时时间、设备地址、通信方式、设备名称、设备描述、设备扫描周期、数据包采集失败后重试次数以及下置失败次数,通信串口参数、串口波特率以及校验方式。 [0062] When the power control by configuring the software configuration, the first device configuration, the device configuration window opens, as shown, disposed corresponding device 11, the device includes a configuration update cycle, the timeout, device address, , communication mode, device name, device description, the device scan cycle, data packet acquisition failure retry counter and the number of failures, serial communication parameters, baud rate and parity mode. 其中,通信方式选择用RS485。 Wherein the communication mode selection RS485. [0063] 在数据组态时,将0-19地址组态为温度值,20-29地址组态为报警上限值,30-39 地址组态为报警下限值。 [0063] When the configuration data, the address is configured as a temperature value 0-19, 20-29 configured as an address to the alarm limit value, the address configured for the next 30-39 alarm limit. [0064] 在数据组态时,先对各个温度采集点进行命名,然后对所述采集点的瞬时值、下限报警值、上限报警值进行组态,数据显示时温度的整数和小数采用两个字节分别显示,且只在要显示整数数据的点上组态上限报警和下限报警值的偏移地址。 [0064] When the configuration data, the first collection point for each designated temperature, and then the instantaneous value of the collection points, the lower limit value of the alarm, the alarm limit values ​​configuration, when the temperature data is displayed using two integer and fractional bytes are shown, and only the configuration of the offset address is to be displayed and low alarm limit value of the integer data point. [0065] 假如在设备组态时,定义了名字为muc的I/O设备,那么设备选择muc,分别对这个点的PV值(瞬时值)、LO值(低限报警值)、HI值(高限报警值)进行组态。 [0065] If the device during the configuration, is defined as muc name of I / O devices, the device selection muc, respectively, of the HI value point PV value (instantaneous value), the value of the LO (low alarm value), ( high alarm value) for the configuration. 数据显示时温度的整数和小数采用的是两个字节分别显示,实际建立的点数为20个,其中只在要显示整数数据的点上组态上限报警和下限报警值的偏移地址。 Data show that the temperature of the integer and fractional uses two bytes are shown, the actual number of points established for 20, the configuration in which only the offset address to be displayed and low alarm limit value of the integer data point. 20个数据组态完成后的参数显示,如图12所示。 20 after completion of the data configuration parameters are displayed, as shown in Fig. 从图中可以看出各个点组态的偏移地址。 It can be seen at various points offset from the configuration in FIG. [0066] 通过力控组态软件对设备、数据进行组态后,上位机会根据在设备组态里设定的时间,向多点测温系统的单片机循环发送一定的读数据格式。 [0066] After the device configuration, software configuration data via power control, the host device in the configuration in accordance with the opportunity to set the time constant of the transmission data format read cycle multi-point temperature to the microcontroller system. 其中数据类型为数据组态时定义的数据类型,数据地址为要读取的第一个数据的偏移地址,数据个数为组态时定义的点数。 Wherein the data type is a data type definition of configuration data, address data offset address of the first data to be read, the number of data points is defined during configuration. [0067] 当单片机通过通信串口收到上位机发来的正确数据格式后,向上位机发送响应读数据格式命令,在这个命令格式中便包含了单片机向上位机所要传送的数据,力控组态软件根据数据的偏移地址,把接收到的数据存储到相应的地址空间,这样就完成一次数据传输。 [0067] When the device receives the host computer sent to the correct data format through the serial interface, to the upper sends response to the read data format command, the command format will comprise the single-chip data up crew to be transmitted, the power control group the configuration software offset address of the data, the received data is stored to the corresponding address space, thus completing a data transfer. [0068] 当通过上位机的力控软件的界面内改变某个数据后,力控组态软件就会向单片机系统发送写数据命令格式,在这帧数据格式里包含了力控组态软件要写的数据,当单片机正确的接收到这帧数据,并从中取出数据后,发送应答写数据格式,完成一次写数据的操作。 [0068] When a data change by force within the control software of the host computer interface, power control configuration software will send a command to write data format to the SCM system, in which the frame data format contains the strength to control configuration software to write data, when the microcontroller receives the correct data frame it, and removed from the data, write the transponder data format, a write data operation is completed. [0069] 本发明实施例中,所述的力控组态软件和单片机总的数据通信个数为40个,由于力控每次最多能接收0x20个数据即32个数据。 Embodiment [0069] of the present invention, the total number of data communication with the force control configuration software and microcontroller 40, since the maximum receive power control data i.e. 0x20 32 data. 因此40个数据需要分两批传送给力控组态软件。 So 40 in two batches of data needed to transmit power control configuration software. 单片机和力控组态软件通信成功后,力控组态软件就会首先发送如下数据格式,在力控的IO监视器可以看到,图13所示力控组态软件向单片机发送读报文数据格式的画面。 SCM and a force control configuration software successful communication, power control configuration software will first send the following data formats, the force control can be seen in the monitor IO, as shown in the transmission power control configuration software read the message to the microcontroller 13 of FIG. picture data format. [0070] 力控组态软件读数据命令格式:|STX |sta |R|DataType |DataAddr |DataNum |ETX |LRC |0D |0A |STX为报文开始码02H,ETX为报文结束码03H,0D为回车,OA为换行;Sta是设备地址占I个字节,与在力控组态软件组态时建立的设备地址相同。 [0070] The strength controls configuration software to read data command format: | STX | sta | R | DataType | DataAddr | DataNum | ETX | LRC | 0D | 0A | STX packets start code 02H, ETX as end of message code 03H, 0D carriage return, OA is a newline; I representing the Sta device address byte, the same device configuration and address established when the force control configuration software. R是读标志,内容是52H,占I个字节,DataType为I表示需要交换的数据类型为I个字节,DataAddr 是数据偏移地址占2字节,低字节在前,高字节在后。 R flag is read, the content is 52H, bytes representing I, I is the DataType indicates the data type needs to be exchanged is I bytes, the data offset address DATAADDR is 2 bytes, a low byte first, high byte is behind. 数据偏移地址以字节为单位。 Offset address data in bytes. DataNum 是要读取数据的数量占I个字节,LRC是从第一个字节至LRC前的所有字节的异或值占I 个字节。 DataNum data to be read is the number of bytes representing the I, LRC all bytes from the first byte of the previous exclusive-OR value to account I LRC bytes. [0071]例如:[02H] [00H] [52H] [01H] [20H] [00H] [08H] [03H] [7AH] [0DH] [0ΑΗ][02H]为报文开始码,[00H]为设备地址,[52H]是读数据格式,[01H]说明数据类型为byte型,[20H] [00H]为数据地址,说明读取的字节是从偏移地址0020H开始,[08H]说明传输的字节个数为8个,[03H]为报文结束码,[7AH]为前8个字节的较验码。 [0071] For example: [02H] [00H] [52H] [01H] [20H] [00H] [08H] [03H] [7AH] [0DH] [0ΑΗ] [02H] is a packet start code, [00H] address for the device, [52H] is a read data format, [01H] Description data type byte type, [20H] [00H] for the address data, indicating that the bytes read from the start offset address 0020H, [08H] Description the number of bytes transmitted is 8, [03H] to end the message code, [7AH] than the first 8 bytes of check code. 单片机接收到这个数据格式的报文后,就会把8个数据通过RS232接口传给力控组态软件,当力控收到单片机传送上来的应答数据报文后,开始发送下一帧读取报文数据格式。 After the microcontroller receives this message data format, will be the 8 data transmitted through the RS232 interface configuration software power control, power control when receiving the response packets transmitted up the microcontroller, reads the next frame starts transmitting packet text data format. 当单片机将数据传输到力控组态软件后,力控组态软件会根据数据的组态,自动分配数据到相应的地址,并在相应地址中显示出来。 When the device to transmit data to the configuration software power control, power control based configuration software configuration data, the data is automatically assigned to the corresponding address, and displayed in the corresponding address. [0072] 在力控组态软件界面上修改数据时,力控组态软件会对应发送写报文数据格式, 比如把第十个数据的高限值修改为33,需要用到发送写报文数据格式。 [0072] The data is modified on the force control configuration software interface, power control corresponding to the configuration software will send a write message data format, such as the high value of the tenth modified data 33, sends the write packets need to use Data Format. 力控组态软件向单片机发送写报文数据格式,如图14所示。 Power control configuration software write to the microcontroller transmits the message data format, as shown in Fig. [0073] 力控组态软件写数据命令格式:|STX |sta |w|DataType |DataAddr |Data |ETX |LRC |0D |0A |STX为报文开始码02H,ETX为报文结束码03H,0D为回车,OA为换行,Sta是设备地址I个字节,与在力控组态软件组态时建立的设备地址相同。 [0073] The strength controls configuration software to write data command format: | STX | sta | w | DataType | DataAddr | Data | ETX | LRC | 0D | 0A | STX packets start code 02H, ETX as end of message code 03H, 0D carriage return, OA is a wrap, the Sta device address is I bytes, the same device configuration and address established when the force control configuration software. W是写标志, 内容是57H,占I个字节,DataType为I表示需要交换的数据类型是I个字节,DataAddr 是数据偏移地址为2个字节,低字节在前,高字节在后。 W is a write flag, the content is 57H, bytes representing I, I is the DataType indicates the data type to be exchanged is I bytes, data DATAADDR offset address is 2 bytes, a low byte first, high word after the festival. 数据偏移地址以字节为单位。 Offset address data in bytes. Data 是实际传输的数据,低字节在前,高字节在后,LRC是从第一个字节至LRC前的所有字节的异或值占I个字节。 Data is the actual data transmission, low byte first, high byte, LRC bytes are all before LRC xor I occupy bytes from the first byte to. [0074]例如:[02H] [00H] [57H] [01H] [1DH] [00H] [21H] [03H] [6BH] [0DH] [0ΑΗ][02H]是报文开始码,[00H]是设备地址,[57H]表明为写数据报文,[01H]表示需要交换的数据类型是I个字节,[1DH] [00H]是写入数据的偏移地址,[1DH]表明写入的为十进制数29,在力控组态画面中,组态的第十个数据的偏移地址即为29,如图15所示,[21H]即写入的为十进制数33。 [0074] For example: [02H] [00H] [57H] [01H] [1DH] [00H] [21H] [03H] [6BH] [0DH] [0ΑΗ] [02H] is a packet start code, [00H] device address, [57H] indicates that write data packet, [01H] indicates the type of data to be exchanged is I bytes, [1DH] [00H] is an offset address for writing data, [1DH] indicating that the write is a decimal number 29, controls the force screen configuration, the configuration of the offset address is the tenth data 29, as shown in Figure 15, [21H] i.e., decimal number 33 is written. [03H]是报文结束码,[6BH]是从第一个字节至LRC前的所有字节的异或值占I个字节,[0DH]是回车,[0ΑΗ]是换行。 [03H] is the end of message code, [6BH] is before all bytes from the first byte to the value of the exclusive OR LRC bytes representing I, [0DH] is a carriage return, [0ΑΗ] is a newline. [0075] 当数据下置成功后,就会在IO监视器上显示数据下置成功的信息,如图16所示。 [0075] After the successful data set, the data set is displayed successful information, as shown in FIG. 16 IO monitor. 在相应的时间下显示,组态的设备(单片机)采集各个点的数据开始、下置超时、下置成功的状态信息。 In the corresponding time display device (microcontroller) collecting data of the respective start points of the configuration, the set time-out, the underlying successful state information. [0076] 用在单片机与上位机间采用RS-232标准传输数据时,传输距离会受到限制,为了实现数据的远传,系统通过一个232转485的转换器,在上位机与单片机之间搭建了一个能够使信号远传的RS-485网络。 [0076] When used between the microcontroller and PC using a standard RS-232 data transmission, the transmission distance is limited, in order to achieve remote data, the system 232 through a converter 485, set up between the PC and the microcontroller a remote signal can be made of RS-485 network. [0077] 该RS-485通信接口采用了平衡差分电路,抗干扰能力强。 [0077] The RS-485 communication interface using a balanced differential circuit, anti-interference ability. 由于需要把信号转化成适于远传的RS-485标准信号,系统需要一MAX487芯片完成相应的电平转化。 Due to the need to signal into a signal suitable for a standard RS-485 remote of MAX487 chip system requires a complete conversion of the corresponding level. 数据传输主要受MAX487读写信号的控制,当单片机要通过串口发送数据时,需要把MAX487状态置为发送数据状态,反之则处于接收数据状态。 MAX487 data transfer is controlled mainly by the read and write signals, when the microcontroller to send data through the serial port, it is necessary to set the status MAX487 data transmission state, and vice versa in the receive data state. [0078] 本发明通过数字温度传感器与单片机通信,由单片机实时采集数字温度传感器的采集的测量点的温度值,通过显示模块实时显示,断所述数字温度传感器采集的测量点的温度值超出预设上下限温度报警值时通过报警模块报警,实现了实时监测多点温度,解决了现有多点测温系统或装置采用普通的模拟温度传感器采集多点温度时,致使传感器与计算机接口的连接是通过若干条导线连接而产生的接线非常多,导线不易铺设,使得测量工作非常困难的问题。 [0078] The present invention is a digital temperature sensor in communication with the microcontroller, the microcontroller acquire real temperature measurement points acquired digital temperature sensors, real-time display through the display module, the value of the temperature measurement point off the digital temperature sensor exceeds a pre-acquired when the alarm is provided by the alarm module temperature alarm limit value, to achieve real-time monitoring of the multi-point temperature, it solves the multiple temperature measurement system or device using a conventional analog temperature sensor acquisition multi-point temperature, so that the sensor is connected to the computer interface wiring is connected by a plurality of wires to generate very large, difficult to lay wires, so that the measurements very difficult problem. 通过将网络化多点温度监测系统与上位机进行数据通信,利用力控组态软件实现了实时显示采集的多点温度值。 By networked multi-point temperature monitoring system in data communication with the host computer, using a power control configuration software multi-point temperature value acquired real-time display. 以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。 The above are only preferred embodiments of the present invention, it should be noted that those of ordinary skill in the art, in the present invention without departing from the principles of the premise, can make various improvements and modifications, improvements and modifications are also It should be regarded as the protection scope of the present invention.

Claims (14)

  1. 1. 一种网络化多点温度监测系统,其特征在于,包括多个用于测量多点温度的数字温度传感器、控制器;所述控制器包括一与所述数字温度传感器经单总线连接的单片机,与所述单片机连接的键盘、数据存储器、显示模块以及报警模块;所述单片机包括中央处理器以及:温度数值读取模块,用于读取所述数字温度传感器采集的温度数据后发送至所述显示模块进行显示;温度报警查询模块,用于查询判断所述数字温度传感器采集的测量点的温度值是否超出预设上下限温度报警触发值;在触发时通过所述报警模块报警。 A networked multi-point temperature monitoring system comprising a plurality of digital temperature sensor for measuring the temperature of the multi-point controller; said controller comprises a digital temperature sensor and the bus connection via a single microcontroller, the microcontroller is connected to a keyboard, a data memory, a display and alarm module module; includes a central processor and a microcontroller: the temperature value read means for reading the digital data after the temperature of the temperature sensor to send the collected the display module for display; query temperature alarm module configured to query the temperature value to determine whether the measurement points acquired digital temperature sensor exceeds a preset upper limit temperature alarm trigger value; when the alarm is triggered by the alarm module.
  2. 2.根据权利要求1所述的网络化多点温度监测系统,其特征在于,所述单片机包括: 数据通路选择模块,用于选择某一路数据通路来读取所述数字温度传感器的温度数据。 The network monitoring system of multi-point temperature according to claim 1, wherein, said microcontroller comprising: a data path selecting means for selecting a road data path to read the temperature data of the digital temperature sensor.
  3. 3.历史报警数据输出模块,用于根据输入指令输出历史报警数据到所述显示模块显示。 3. The alarm history data output means for outputting alarm history data to the display module according to the input display instruction.
  4. 4.传感器损坏识别模块,用于通过和校验方式判断所述数字温度传感器是否损坏,在判断损坏时输出错误提示信息至所述显示模块提示告知。 4. The sensor damage recognition module, for determining whether the check mode and by digital temperature sensor is damaged, the output of an error message to inform the prompt displaying module when determining damage.
  5. 5.报警参数设定模块,用于设定每个数字温度传感器的上下限温度报警值。 5. Alarm parameter setting means for setting each of the digital temperature sensors on the temperature alarm limit value.
  6. 6.定检模块,用于根据定检指令启动定检程序进行指定区域或空间的多点温度监测。 6. regular inspection module for multi-point temperature monitoring designated area or space object program based on a given start command given subject.
  7. 7.根据权利要求1所述的网络化多点温度监测系统,其特征在于,所述报警参数设定模块包括:参数输入单元,用于输入每个数字温度传感器的上下限温度报警值参数;输入参数判断单元,用于判断所述的输入参数与预存的参数规范是否符合;输入参数写入单元,用于所述的输入参数符合预存的参数规范时,将所述输入的参数数据写入到对应的数字温度传感器中;输入参数错误提示单元,用于所述的输入参数不符合预存的参数规范时,发出错误提不ί目息。 The network monitoring system of multi-point temperature according to claim 1, wherein said alarm parameter setting module comprises: a parameter input unit for inputting a digital temperature sensors each upper and lower temperature alarm parameter value; input parameter determination unit, parameter specification for the input parameters and the pre-stored judgment meets; input parameter writing unit, when the input parameters of the parameter specifications comply with the pre-stored, the input parameter data write corresponding to the digital temperature sensor; input parameter error means, said input parameters for the parameters do not meet the specifications when stored, it issues an error message mention ί mesh.
  8. 8.根据权利要求f 3任一项所述的网络化多点温度监测系统,其特征在于,还包括一上位机,内置组态监控软件,与所述的单片机通信连接,用于通过所述单片机获取、实时显示所述数字温度传感器采集的温度数据以及所述单片机存储的数据,进行实时远程监控与管理。 The multi-point temperature f networked monitoring system of any one of claims 1-3, characterized in that, further comprising a host computer, built-in monitoring software configuration, communication with the microcontroller is connected, through said acquiring microcontroller, a digital temperature sensor data and temperature data collected by the microcontroller is stored in real-time display, real-time remote monitoring and management.
  9. 9. 一种网络化多点温度监测系统与上位机的通信方法,其特征在于,包括以下步骤: 在上位机中安装力控组态监控软件;将多点温度监测系统通过单片机与上位机用RS485接口连接;在上位机中通过所述力控组态监控软件进行设备配置;通过所述力控组态监控软件进行数据组态,即进行数据的偏移地址分配。 A network communication method in multi-point temperature monitoring system with the host computer, characterized by comprising the steps of: mounting force control configuration monitoring software in the host computer; multi-point temperature monitoring system for use by the microcontroller and PC RS485 interface; device configuration in the host computer by the power control monitoring software configuration; configuration data by the configuration monitoring software power control, i.e., the offset address allocation data.
  10. 10.根据权利要求5所述的网络化多点温度监测系统与上位机的通信方法,其特征在于,所述设备配置包括设置更新周期、超时时间、设备地址、通信方式、设备名称、设备描述、 设备扫描周期、数据包采集失败后重试次数以及下置失败次数,通信串口参数、串口波特率以及校验方式。 10. The communication method of claim 5 networked multi-point temperature monitoring system with the host computer as claimed in claim, wherein said apparatus includes a configuration update cycle, the timeout, device address, the communication mode, device name, device description , apparatus scanning period, the data packet acquisition failure retry counter and the number of failures, serial communication parameters, baud rate and parity mode.
  11. 11.根据权利要求5所述的网络化多点温度监测系统与上位机的通信方法,其特征在于,在数据组态时,将0-19地址组态为温度值,20-29地址组态为报警上限值,30-39地址组态为报警下限值。 The communication method of claim 5 networked multi-point temperature monitoring system and the host machine according to claim, characterized in that the configuration data, the configuration address to a temperature value 0-19, 20-29 address configuration for the upper limit alarm, 30-39 addresses are configured as alarm lower limit.
  12. 12.根据权利要求5或7所述的网络化多点温度监测系统与上位机的通信方法,其特征在于,在数据组态时,先对各个温度采集点进行命名,然后对所述采集点的瞬时值、下限报警值、上限报警值进行组态,数据显示时温度的整数和小数采用两个字节分别显示,且只在要显示整数数据的点上组态上限报警和下限报警值的偏移地址。 12. The communication method according to claim 5 or 7 network with multi-point temperature monitoring system with the host computer as claimed in claim, wherein, when the data configuration of the respective first named collection point temperature, then the collection point the instantaneous value, the lower limit value of the alarm, the alarm limit values ​​configuration, when the temperature data is displayed using two-byte integers and fractions are shown, and only the configuration to be displayed and low alarm limit value of the integer data point offset address.
  13. 13.根据权利要求5所述的网络化多点温度监测系统与上位机的通信方法,其特征在于,所述上位机通过所述的力控组态软件读数据命令格式为: 13. The communication method of claim 5 networked multi-point temperature monitoring system and the host machine according to claim, wherein said host computer through said force control configuration software to read data command format is:
    Figure CN103017921AC00031
    STX为报文开始码,ETX为报文结束码,OD为回车,OA为换行;Sta是设备地址,与在力控组态软件组态时建立的设备地址相同,R是读标志,DataType表示需要交换的数据类型, DataAddr是数据偏移地址,低字节在前,高字节在后;DataNum是要读取数据的数量,LRC 是从第一个字节至LRC前的所有字节的异或值。 STX is a packet start code, ETX as end of message code, OD carriage return, OA was wrapping; Sta device address, device address established with the same force when configured in the control configuration software, R is a sign reading, DataType indicates the type of data to be exchanged, DATAADDR offset address data, low byte first, high byte; DataNum is the number of data to be read, all the LRC bytes before the first byte of the LRC to XORed.
  14. 14.根据权利要求5所述的网络化多点温度监测系统与上位机的通信方法,其特征在于,所述上位机通过所述的力控组态软件写数据命令格式为: 14. The communication method of claim 5 networked multi-point temperature monitoring system and the host machine according to claim, wherein said host computer to write data command format by the force control configuration software:
    Figure CN103017921AC00032
    STX为报文开始码,ETX为报文结束码,OD为回车,OA为换行,Sta是设备地址,与在力控组态软件组态时建立的设备地址相同,W是写标志,DataType表示需要交换的数据类型, DataAddr是数据偏移地址,低字节在前,高字节在后,Data是实际传输的数据,低字节在前,高字节在后;LRC是从第一个字节至LRC前的所有字节的异或值。 STX is a packet start code, ETX as end of message code, OD carriage return, OA is a wrap, Sta device address, device address established with the same force when configured in the control configuration software, W is a write flag, DataType indicates the type of data to be exchanged, DATAADDR offset address data, low byte first, high byte, data is the data actually transmitted, the low byte first, high byte after; the LRC from the first exclusive-oR of all bytes prior to the byte LRC.
CN 201210407947 2012-10-24 2012-10-24 Networked multipoint temperature monitoring system and method for performing data communication between upper computer and same CN103017921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201210407947 CN103017921A (en) 2012-10-24 2012-10-24 Networked multipoint temperature monitoring system and method for performing data communication between upper computer and same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201210407947 CN103017921A (en) 2012-10-24 2012-10-24 Networked multipoint temperature monitoring system and method for performing data communication between upper computer and same

Publications (1)

Publication Number Publication Date
CN103017921A true true CN103017921A (en) 2013-04-03

Family

ID=47966782

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201210407947 CN103017921A (en) 2012-10-24 2012-10-24 Networked multipoint temperature monitoring system and method for performing data communication between upper computer and same

Country Status (1)

Country Link
CN (1) CN103017921A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103400493A (en) * 2013-07-26 2013-11-20 天津成科自动化工程技术有限公司 Wired temperature measuring system
CN105025112A (en) * 2015-08-18 2015-11-04 上海冰点机电工程技术有限公司 Remote monitoring system for air conditioning equipment and control method thereof

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6112275A (en) * 1990-05-15 2000-08-29 Dallas Semiconductor Corporation Method of communicating over a single wire bus between a host device and a module device which measures thermal accumulation over time
CN2459642Y (en) * 2000-12-13 2001-11-14 信息产业部电子第十八研究所 Ten-way temp. measuring control recording instrument for semiconductor air conditioner of vehicle carried conveying box
CN1664521A (en) * 2004-03-02 2005-09-07 中国人民解放军军事医学科学院卫生装备研究所 Temperature measurement system and method
CN201281889Y (en) * 2008-10-15 2009-07-29 北京机械工业学院 Networking fire alarm system
CN202195893U (en) * 2011-07-26 2012-04-18 江苏亚奥科技有限公司 Multipoint thermodetector
CN202229440U (en) * 2011-09-16 2012-05-23 宁波帅康热水器有限公司 Solar water heating system control cabinet with monobus multipoint temperature measuring function
CN202403834U (en) * 2011-12-21 2012-08-29 成都众询科技有限公司 Multipoint network distribution type temperature detecting system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6112275A (en) * 1990-05-15 2000-08-29 Dallas Semiconductor Corporation Method of communicating over a single wire bus between a host device and a module device which measures thermal accumulation over time
CN2459642Y (en) * 2000-12-13 2001-11-14 信息产业部电子第十八研究所 Ten-way temp. measuring control recording instrument for semiconductor air conditioner of vehicle carried conveying box
CN1664521A (en) * 2004-03-02 2005-09-07 中国人民解放军军事医学科学院卫生装备研究所 Temperature measurement system and method
CN201281889Y (en) * 2008-10-15 2009-07-29 北京机械工业学院 Networking fire alarm system
CN202195893U (en) * 2011-07-26 2012-04-18 江苏亚奥科技有限公司 Multipoint thermodetector
CN202229440U (en) * 2011-09-16 2012-05-23 宁波帅康热水器有限公司 Solar water heating system control cabinet with monobus multipoint temperature measuring function
CN202403834U (en) * 2011-12-21 2012-08-29 成都众询科技有限公司 Multipoint network distribution type temperature detecting system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘春华等: "基于组态软件与单片机的多点温度监控系统总体设计", 《宜春学院学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103400493A (en) * 2013-07-26 2013-11-20 天津成科自动化工程技术有限公司 Wired temperature measuring system
CN103400493B (en) * 2013-07-26 2016-08-17 天津成科自动化工程技术有限公司 Wired Temperature Measurement System
CN105025112A (en) * 2015-08-18 2015-11-04 上海冰点机电工程技术有限公司 Remote monitoring system for air conditioning equipment and control method thereof

Similar Documents

Publication Publication Date Title
US7053790B2 (en) Remote meter reading system using grouped data structure
CN201413484Y (en) Wireless temperature moisture measurement and control network system
CN102158527A (en) Household electrical appliance maintenance system and household electrical appliance with self-checking function
CN102169620A (en) Embedded type fire control data transmission device and realizing method thereof
CN102128978A (en) Energy consumption metering system supporting two-way communication
CN101710883A (en) Multi-protocol data acquisition gateway for intelligent building and data acquisition method thereof
CN101514999A (en) Electric power measurement multifunctional instrument system and method for measurement
CN102193553A (en) Method, device and system for testing function of air conditioning controller
CN102890259A (en) Line fault indicator detecting system
JPH10255190A (en) Remote meter inspection device and system
CN201549932U (en) Electric parameter monitoring system based on GPRS network
JP2009064809A (en) Photovoltaic generation system
CN101122793A (en) Industrial production line embedded type main control system
CN101299684A (en) Apparatus for detecting network household electric equipment communication function
CN1790438A (en) Method and system for meter transmitting information
CN201408476Y (en) Wireless remote meter reading control system based on ZigBee technique
CN201344961Y (en) Remote wireless security monitoring device for distributed lightening arresters
CN103323683A (en) Portable electromagnetic wave strength detecting device and method
CN201662718U (en) Air-conditioning controller function testing device and system
CN101626288A (en) UART device with Baud rate detection and set function and detection and set method thereof
CN201497581U (en) Intelligent temperature collection instrument
CN201255666Y (en) Wireless temperature measurement and monitoring apparatus for transforming plant
CN201233652Y (en) Multimedia smart remote control
CN2859468Y (en) Wireless water meter reading system
CN201556287U (en) Remote wireless automatic meter reading system

Legal Events

Date Code Title Description
C06 Publication
EXSB Decision made by sipo to initiate substantive examination
WD01