Movatterモバイル変換


[0]ホーム

URL:


CN103116376A - Temperature data collection method based on centralized temperature control system - Google Patents

Temperature data collection method based on centralized temperature control system
Download PDF

Info

Publication number
CN103116376A
CN103116376ACN 201310012165CN201310012165ACN103116376ACN 103116376 ACN103116376 ACN 103116376ACN 201310012165CN201310012165CN 201310012165CN 201310012165 ACN201310012165 ACN 201310012165ACN 103116376 ACN103116376 ACN 103116376A
Authority
CN
China
Prior art keywords
temperature
data
curve
completed
host computer
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
CN 201310012165
Other languages
Chinese (zh)
Inventor
李跃新
刘建伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WUHAN YAXING ELECTRONIC TECHNOLOGY Co Ltd
Hubei University
Original Assignee
WUHAN YAXING ELECTRONIC TECHNOLOGY Co Ltd
Hubei University
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
Application filed by WUHAN YAXING ELECTRONIC TECHNOLOGY Co Ltd, Hubei UniversityfiledCriticalWUHAN YAXING ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN 201310012165priorityCriticalpatent/CN103116376A/en
Publication of CN103116376ApublicationCriticalpatent/CN103116376A/en
Priority to CN201410015859.XAprioritypatent/CN103995549B/en
Withdrawnlegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明涉及智能化集中式温控系统,尤其是基于集中温控系统的温度数据采集方法,其方法的具体步骤为:系统上位机按照规定的取样周期读取巡检仪存储器中某基表的实时温度值,该方法能将丢失的采集点的数据补充起来,使数据库中的数据完整并且绘制实时温度曲线使比较完整、连续和基本符合实际。

Figure 201310012165

The present invention relates to an intelligent centralized temperature control system, especially a method for collecting temperature data based on the centralized temperature control system. Real-time temperature value, this method can supplement the data of the lost collection point, make the data in the database complete and draw the real-time temperature curve to make it relatively complete, continuous and basically in line with reality.

Figure 201310012165

Description

Translated fromChinese
基于集中温控系统的温度数据采集方法Temperature Data Acquisition Method Based on Centralized Temperature Control System

技术领域technical field

本发明涉及智能化集中式温控系统,尤其是基于集中温控系统的温度数据采集方法。The invention relates to an intelligent centralized temperature control system, in particular to a method for collecting temperature data based on the centralized temperature control system.

背景技术Background technique

集中式温控系统,的硬件系统结构参见图1,最上层称为上位机,是系统的中枢,所有的控制输入和输出在此完成;中层为巡检仪,最多可接80台,巡检仪完成温度曲线的下发、基表数据采集和基表控制;最下一层为基表(或称温度控制器:包括PID控制器及温度传感器\热电偶),最多可接80台,完成升温、降温、恒温和报警等功能。这种结构的优点有;1)、系统规模可灵活扩充;2)、上位机可关机,基表的实时数据存储于巡检仪;3)、可大大简化基表的设计复杂程度,大大降低系统成本。The hardware system structure of the centralized temperature control system is shown in Figure 1. The uppermost layer is called the upper computer, which is the center of the system, and all control input and output are completed here; The instrument completes the distribution of temperature curves, base meter data collection and base meter control; the bottom layer is the base meter (or temperature controller: including PID controllers and temperature sensors\thermocouples), up to 80 units can be connected to complete Heating, cooling, constant temperature and alarm functions. The advantages of this structure are: 1), the scale of the system can be flexibly expanded; 2), the upper computer can be shut down, and the real-time data of the base table is stored in the inspection instrument; 3), the design complexity of the base table can be greatly simplified, and the system cost.

由于集中式温控系统可接的温控点理论值是80×80,即系统中巡检仪的上限是80,温控基表上限值也是80,这样系统基表数的上限6400。巡检仪按1毫秒、10毫秒、100毫秒和1秒采集数据一次,采集周期上限值分别为6.4秒、64秒、640秒和6400秒。在温控精度要求不十分高的情况下,多数采用100毫秒和1秒采集数据一次,这时采集周期上限值分别为6.7分钟和67分钟。在实际的工业之中,这样的时间段内温度已经发生变化,采集的数据将是不连续的,绘制的温度曲线会是断断续续的。也就是说按照温控点理论最大值上位机采集数据时,会出现丢失数据的可能:1)、由于环境干扰等情况巡检仪发给上位机的数据是错误的,上位机将丢掉该数据;2)、由于温控点过多,上位机的采集周期错过,读不到数据造成数据丢失。Since the theoretical value of the temperature control points that can be connected to the centralized temperature control system is 80×80, that is, the upper limit of the inspection instrument in the system is 80, and the upper limit of the temperature control base meter is also 80, so the upper limit of the number of base meters in the system is 6400. The inspection instrument collects data once in 1 millisecond, 10 milliseconds, 100 milliseconds and 1 second, and the upper limit of the collection period is 6.4 seconds, 64 seconds, 640 seconds and 6400 seconds respectively. In the case that the temperature control accuracy is not very high, most of them use 100 milliseconds and 1 second to collect data once. At this time, the upper limit of the collection period is 6.7 minutes and 67 minutes respectively. In the actual industry, the temperature has changed during such a period of time, the collected data will be discontinuous, and the drawn temperature curve will be intermittent. That is to say, when the upper computer collects data according to the theoretical maximum value of the temperature control point, there will be a possibility of data loss: 1) Due to environmental interference and other circumstances, the data sent by the inspection instrument to the upper computer is wrong, and the upper computer will lose the data. ;2) Due to too many temperature control points, the acquisition cycle of the upper computer is missed, and the data cannot be read, resulting in data loss.

发明内容Contents of the invention

为解决以上技术问题,本发明提供了基于集中温控系统的温度数据采集方法,该方法能将丢失的采集点的数据补充起来,使数据库中的数据完整并且绘制实时温度曲线使比较完整、连续和基本符合实际。In order to solve the above technical problems, the present invention provides a temperature data collection method based on a centralized temperature control system, which can supplement the lost data of collection points, make the data in the database complete and draw a real-time temperature curve to make it more complete and continuous and basically in line with reality.

 本发明的技术方案为:基于集中温控系统的温度数据采集方法,其包括以下步骤:The technical solution of the present invention is: a temperature data acquisition method based on a centralized temperature control system, which includes the following steps:

步骤1)、系统上位机启动上位机串口向巡检仪发送温控曲线;Step 1), the host computer of the system starts the serial port of the host computer to send the temperature control curve to the inspection instrument;

步骤2)、巡检仪向温控基表按段发送温控曲线;Step 2), the inspection instrument sends the temperature control curve to the temperature control base meter by segment;

步骤3) 、上位机按照规定的取样周期读取巡检仪存储器中某一基表的实时温度值;如巡检仪存储器中没有采集到温度数据则执行步骤4),如巡检仪存储器中有数据则进一步判断该段数据采样是否完成,如完成则将采集到的温度数据曲线发送至数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;Step 3), the upper computer reads the real-time temperature value of a base meter in the memory of the patrol instrument according to the specified sampling period; if no temperature data is collected in the memory of the patrol instrument, perform step 4), if the temperature data in the memory of the patrol instrument If there is data, it will further judge whether the data sampling of this section is completed. If it is completed, the collected temperature data curve will be sent to the database before reading the next section of data. If it is not completed, the host computer will continue to read the inspection instrument according to the specified sampling cycle. The real-time temperature value of the base table in the memory;

步骤4)、以巡检仪号j和基表号i为查询索引,遍历检索基表的全部历史数据判断上位机数据库中有无与缺失数据匹配的温度数据,如没有则以设定温度曲线值公式(1)来作为缺失时间点或段的温度数据曲线公式计算并补充温度曲线,然后判断该段温度数据采样是否完成,如完成则将采集到的和补充完毕的温度曲线发送至上位机数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;Step 4), using the inspection instrument number j and the base table number i as the query index, traverse all the historical data of the base table to determine whether there is any temperature data matching the missing data in the host computer database, if not, use the set temperature curve Value formula (1) is used as the temperature data curve formula of the missing time point or segment to calculate and supplement the temperature curve, and then judge whether the temperature data sampling of this segment is completed. If it is completed, the collected and supplemented temperature curve will be sent to the host computer Then read the next piece of data from the database. If it is not completed, the host computer will continue to read the real-time temperature value of the base table in the memory of the inspection instrument according to the specified sampling cycle;

Y=(y2-y1)/(x2-x1)X+(y1x2-y2x1)/(x2-x1)                (1)Y=(y2 -y1 )/(x2 -x1 )X+(y1 x2 -y2 x1 )/(x2 -x1 ) (1)

设x为时间,y为基表的温度值,其中x1和x2为温度曲线某段的起始和终止时间,y1和y2为该曲线起始和终止的温度值;Let x be the time, and y be the temperature value of the base table, wherex1 andx2 are the start and end times of a certain section of the temperature curve, andy1 andy2 are the temperature values at the start and end of the curve;

 如数据库中有与缺失数据匹配的数据,则再判断数据精度要求,如数据精度要求高则以公式(2)来作为缺失时间点或段的温度数据曲线公式来计算并补充温度曲线,然后判断该段温度数据采样是否完成,如完成则将采集到的和补充完毕的温度曲线发送至上位机数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;If there is data matching the missing data in the database, then judge the data accuracy requirements. If the data accuracy requirements are high, use formula (2) as the temperature data curve formula of the missing time point or segment to calculate and supplement the temperature curve, and then judge Whether the temperature data sampling of this section is completed, if it is completed, send the collected and supplemented temperature curve to the host computer database and then read the next section of data, if it is not completed, the host computer will continue to read and inspect according to the specified sampling cycle The real-time temperature value of the base meter in the instrument memory;

如数据精度要求低则按公式(3)来作为缺失时间点或段的温度数据曲线公式来计算并补充温度曲线,然后判断该段温度数据采样是否完成,如完成则将采集到的和补充完毕的温度曲线发送至上位机数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;If the data accuracy requirement is low, use the formula (3) as the temperature data curve formula of the missing time point or segment to calculate and supplement the temperature curve, and then judge whether the temperature data sampling of this segment is completed. If it is completed, the collected and supplemented The temperature curve is sent to the host computer database before reading the next piece of data. If not completed, the host computer will continue to read the real-time temperature value of the base meter in the memory of the inspection instrument according to the specified sampling cycle;

Uji= Min{(Yji-Vji)21, (Yji-Vji)22,……(Yji-Vji)2n-1, (Yji-Vji)2n}  (2)Uji = Min{(Yji -Vji )21 , (Yji -Vji )22 ,……(Yji -Vji )2n-1 , (Yji -Vji )2n } (2)

Uji=∑Vji/n                                    (3)Uji =∑Vji /n (3)

Uji为丢失温度数据值, Vji为数据库中相同编号的巡检仪j和相同基表号i在同一设定温度曲线、同一温控段、同一时刻的温度值;∑Vji为n个历史数据之和;Yji为同一基表根据设定温度曲线值公式(1)计算得到的值 。Uji is the missing temperature data value, Vji is the temperature value of the inspection instrument j with the same number and the same base meter number i in the database at the same set temperature curve, the same temperature control section, and the same time; ΣVji is n The sum of historical data; Yji is the value calculated by the same base table according to the formula (1) of the set temperature curve value.

 本发明将丢失的采集点的数据补充起来,同时将此数据补充进数据库中,使数据库中的数据完整并且绘制实时温度变化曲线使比较完整、连续和基本符合实际。The present invention supplements the data of the lost collection points, and at the same time supplements the data into the database, so that the data in the database is complete and the real-time temperature change curve is drawn to make it relatively complete, continuous and basically in line with reality.

附图说明Description of drawings

图1为本发明实施例集中温控系统的结构框图;Fig. 1 is the structural block diagram of the centralized temperature control system of the embodiment of the present invention;

图2为本发明实施例基于集中温控系统的温度数据采集方法的流程示意图;FIG. 2 is a schematic flow diagram of a method for collecting temperature data based on a centralized temperature control system according to an embodiment of the present invention;

图3为本发明实施例温控基表所在层的具体接线示意图。Fig. 3 is a specific wiring schematic diagram of the layer where the temperature control base meter is located in the embodiment of the present invention.

具体实施方式Detailed ways

参见图1-图3,本发明实施例基于集中温控系统的温度数据采集方法,其包括以下步骤:Referring to Fig. 1-Fig. 3, the embodiment of the present invention is based on the temperature data collection method of centralized temperature control system, and it comprises the following steps:

步骤1)、系统上位机启动上位机串口向巡检仪发送温控曲线;Step 1), the host computer of the system starts the serial port of the host computer to send the temperature control curve to the inspection instrument;

步骤2)、巡检仪向温控基表按段发送温控曲线;Step 2), the inspection instrument sends the temperature control curve to the temperature control base meter by segment;

步骤3) 、上位机按照规定的取样周期读取巡检仪存储器中某一基表的实时温度值;如巡检仪存储器中没有采集到温度数据则执行步骤4),如巡检仪存储器中有数据则进一步判断该段数据采样是否完成,如完成则将采集到的温度数据曲线发送至数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;Step 3), the upper computer reads the real-time temperature value of a base meter in the memory of the patrol instrument according to the specified sampling period; if no temperature data is collected in the memory of the patrol instrument, perform step 4), if the temperature data in the memory of the patrol instrument If there is data, it will further judge whether the data sampling of this section is completed. If it is completed, the collected temperature data curve will be sent to the database before reading the next section of data. If it is not completed, the host computer will continue to read the inspection instrument according to the specified sampling cycle. The real-time temperature value of the base table in the memory;

步骤4)、以巡检仪号j和基表号i为查询索引,遍历检索基表的全部历史数据判断上位机数据库中有无与缺失数据匹配的温度数据,如没有则以设定温度曲线值公式(1)来作为缺失时间点或段的温度数据曲线公式计算并补充温度曲线,然后判断该段温度数据采样是否完成,如完成则将采集到的和补充完毕的温度曲线发送至上位机数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;Step 4), using the inspection instrument number j and the base table number i as the query index, traverse all the historical data of the base table to determine whether there is any temperature data matching the missing data in the host computer database, if not, use the set temperature curve Value formula (1) is used as the temperature data curve formula of the missing time point or segment to calculate and supplement the temperature curve, and then judge whether the temperature data sampling of this segment is completed. If it is completed, the collected and supplemented temperature curve will be sent to the host computer Then read the next piece of data from the database. If it is not completed, the host computer will continue to read the real-time temperature value of the base table in the memory of the inspection instrument according to the specified sampling cycle;

Y=(y2-y1)/(x2-x1)X+(y1x2-y2x1)/(x2-x1)                (1)Y=(y2 -y1 )/(x2 -x1 )X+(y1 x2 -y2 x1 )/(x2 -x1 ) (1)

设x为时间,y为基表的温度值,其中x1和x2为温度曲线某段的起始和终止时间,y1和y2为该曲线起始和终止的温度值;Let x be the time, and y be the temperature value of the base table, wherex1 andx2 are the start and end times of a certain section of the temperature curve, andy1 andy2 are the temperature values at the start and end of the curve;

 如数据库中有与缺失数据匹配的数据,则再判断数据精度要求,如数据精度要求高则以公式(2)来作为缺失时间点或段的温度数据曲线公式来计算并补充温度曲线,然后判断该段温度数据采样是否完成,如完成则将采集到的和补充完毕的温度曲线发送至上位机数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;If there is data matching the missing data in the database, then judge the data accuracy requirements. If the data accuracy requirements are high, use formula (2) as the temperature data curve formula of the missing time point or segment to calculate and supplement the temperature curve, and then judge Whether the temperature data sampling of this section is completed, if it is completed, send the collected and supplemented temperature curve to the host computer database and then read the next section of data, if it is not completed, the host computer will continue to read and inspect according to the specified sampling cycle The real-time temperature value of the base meter in the instrument memory;

如数据精度要求低则按公式(3)来作为缺失时间点或段的温度数据曲线公式来计算并补充温度曲线,然后判断该段温度数据采样是否完成,如完成则将采集到的和补充完毕的温度曲线发送至上位机数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;If the data accuracy requirement is low, use the formula (3) as the temperature data curve formula of the missing time point or segment to calculate and supplement the temperature curve, and then judge whether the temperature data sampling of this segment is completed. If it is completed, the collected and supplemented The temperature curve is sent to the host computer database before reading the next piece of data. If not completed, the host computer will continue to read the real-time temperature value of the base meter in the memory of the inspection instrument according to the specified sampling cycle;

Uji= Min{(Yji-Vji)21, (Yji-Vji)22,……(Yji-Vji)2n-1, (Yji-Vji)2n}  (2)Uji = Min{(Yji -Vji )21 , (Yji -Vji )22 ,……(Yji -Vji )2n-1 , (Yji -Vji )2n } (2)

Uji=∑Vji/n                                    (3)Uji =∑Vji /n (3)

Uji为丢失温度数据值, Vji为数据库中相同编号的巡检仪j和相同基表号i在同一设定温度曲线、同一温控段、同一时刻的温度值;∑Vji为n个历史数据之和;Yji为同一基表根据设定温度曲线值公式(1)计算得到的值 。Uji is the missing temperature data value, Vji is the temperature value of the inspection instrument j with the same number and the same base meter number i in the database at the same set temperature curve, the same temperature control section, and the same time; ΣVji is n The sum of historical data; Yji is the value calculated by the same base table according to the formula (1) of the set temperature curve value.

数据精度即采集温度曲线与温控曲线的差异度,差异度在正负3%之内属于高精度,正负3%之外属于低精度,数据精度大小可以设置,不限于正负3%。The data accuracy refers to the difference between the collected temperature curve and the temperature control curve. The difference is within plus or minus 3% and belongs to high precision, and the difference is plus or minus 3% and belongs to low precision. The data precision can be set, not limited to plus or minus 3%.

参见图3,本发明实施例中的温控基表可以采用温度调节仪,该温度调节仪的温控线连接至热电偶检定炉。Referring to Fig. 3, the temperature control base meter in the embodiment of the present invention can use a temperature regulator, and the temperature control line of the temperature regulator is connected to a thermocouple verification furnace.

算法设计原理简述  约定每隔1分钟就要了解一次基表的温度变化,那么在采集周期上限值为6.7分钟,每个基表分别就丢失了6.7个数据。对这6.7个数据的采用如下公式计算得到。为简单化,算法描述中基表的个数取[60,6400]区间的上限或下限,即60或6400。基表的个数小于60系统采集不会出现数据丢失, 基表的个数大于6400系统无法处理.Brief description of the algorithm design principle. It is agreed that the temperature change of the base meter should be known every 1 minute. Then, the upper limit of the collection period is 6.7 minutes, and each base meter loses 6.7 data respectively. The 6.7 data are calculated using the following formula. For simplicity, the number of base tables in the algorithm description takes the upper or lower limit of the interval [60, 6400], that is, 60 or 6400. If the number of base tables is less than 60, the system will not lose data, and if the number of base tables is greater than 6400, the system cannot process it.

算法描述(Statistics Temperature Data Fitting Algorithm)Algorithm description (Statistics Temperature Data Fitting Algorithm)

(1) 补赏温控数据采集算法的伪C语言描述如下:(1) The pseudo-C language description of the reward temperature control data collection algorithm is as follows:

STEDAFA(int ThermostatNum ,int j , int i)   STEDAFA(int ThermostatNum ,int j , int i)

{  float  V[n],U, Y;{ float V[n], U, Y;

   Int n;Int n;

   If  ThermostatNum<60  then  return;     /算法结束If ThermostatNum<60 then return; /algorithm end

   else If  ThermostatNum>6400  then else If ThermostatNum>6400 then

{   infobox(“Exceeding the upper limit!”) { infobox("Exceeding the upper limit!") 

return                         /算法结束return /algorithm end

    }}

   Open database ;Open database;

   Linking database;Linking database;

   If database==not empty thenIf database==not empty then

    { {

      V[1],…..V[n]=Read_ database(j,i);  /以巡检仪号j和基表号i为查询索引,遍历检索基表的全部历史数据,设有n个值V[1],.....V[n]=Read_ database(j,i); /Take the inspection instrument number j and the base table number i as the query index, traverse and retrieve all the historical data of the base table, there are n value

      If 精度要求不高  then If the precision requirement is not high then

        Uji=∑Vji/n        /用公式(3)计算Uji=∑Vji/n / Calculated by formula (3)

      ElseElse

        U=Findmin(V[1],…..V[n],Y); /用公式(2)计算U=Findmin(V[1],…..V[n],Y); /Use formula (2) to calculate

}

ElseElse

Calculate U =(y2-y1)/(x2-x1)X+(y1x2-y2x1)/(x2-x1)   ;   /根据设置的曲线f(x)计算y,即用公式  (1)遍历检索bianCalculate U =(y2-y1)/(x2-x1)X+(y1x2-y2x1)/(x2-x1) ;

   Return  U;Return U;

}

(2)数据采样算法(2) Data sampling algorithm

   数据采样算法是指系统的上位机按照规定的取样周期读取巡检仪存储器中某基表的实时温度值,当巡检仪无数据发送或发送的数据有错误时调用STEDAFA算法。其伪C语言代码如下所示:The data sampling algorithm means that the upper computer of the system reads the real-time temperature value of a base meter in the memory of the inspection instrument according to the specified sampling period, and calls the STEDAFA algorithm when the inspection instrument has no data to send or the sent data has errors. Its pseudo-C language code is as follows:

数据采样算法(Temperature Data Collecting Algorithm)Data Sampling Algorithm (Temperature Data Collecting Algorithm)

TDCA(int j, int i)TDCA(int j, int i)

{  float  U;{ float U;

  Int m, n;Int m, n;

  Start port 232;        /启动上位机串口Start port 232; /Start the host computer serial port

  If 当前时刻在采样周期内 then If the current moment is within the sampling period then

   {{

    U=Read-Inspection (j,i); /读巡检仪J上的I 号基表温度数据U=Read-Inspection (j,i); /Read the temperature data of No. I base meter on inspection instrument J

If U is not empty or U not exists Error thenIf U is not empty or U not exists Error then

{{

Send-database(x);  /将采集到的数据发送至数据库Send-database(x); /Send the collected data to the database

Send-Mapping(X);  /发送至温度曲线绘制函数,并启动绘图过程Send-Mapping(X); / Send to the temperature curve drawing function and start the drawing process

    }}

   else {else {

Calculate n,j,i;      /计算出应该补充温值点n的j和iCalculate n,j,i; /Calculate the j and i that should supplement the temperature point n

While m≤n { While m≤n {

         Call STEDAFA(int ThermostatNum , j , i)→U;  /调用补赏算法  Call STEDAFA(int ThermostatNum , j , i)→U; /Call the reward algorithm

         Send-database(U);  /发送至数据库Send-database(U); /Send to database

Send-Mapping(U);  /发送至温度曲线绘制函数,并启动绘图过程Send-Mapping(U); / Send to the temperature curve drawing function and start the drawing process

 }}

}}

}}

以下进一步描述巡检仪通信协议。The polling instrument communication protocol is further described below.

(1)、上位机可能发送的指令如下:(1) The commands that the host computer may send are as follows:

校正时钟:校正巡检仪的实时钟。(年月日时分秒)Calibrate Clock: Calibrate the real-time clock of the inspection instrument. (year, month, day, hour, minute, second)

读取基表参数:读取指定基表内指定的参数值。(基表地址,参数序号)Read base table parameters: read the specified parameter values in the specified base table. (base table address, parameter number)

修改基表参数:修改指定基表内指定的参数值。(基表地址,参数序号,参数值)Modify base table parameters: modify the specified parameter values in the specified base table. (base table address, parameter number, parameter value)

下发曲线数据:下发各基表当前温控曲线数据到巡检仪。(基表号,曲线数据)Send curve data: Send the current temperature control curve data of each base meter to the inspection instrument. (base table number, curve data)

暂停/启动:控制指定基表暂停或者启动。(基表地址,命令)Pause/Start: Control the pause or start of the specified base table. (base table address, command)

采集记录:从巡检仪的数据存储器中采集温检记录。Collection records: collect temperature inspection records from the data memory of the inspection instrument.

(2)、上位机向巡检仪发送命令(2), the upper computer sends commands to the inspection instrument

上位机向巡检仪发送命令包,格式如下:The host computer sends a command packet to the inspection instrument, the format is as follows:

地址,地址反码,07,00,C1,年,月,日,时,分,秒,校验码L,校验码HAddress, address inverse code, 07,00, C1, year, month, day, hour, minute, second, check code L, check code H

巡检仪执行命令后回送应答包格式如下:The format of the response packet returned by the patrol instrument after executing the command is as follows:

地址,01,00,结果码,校验码L,校验码H。Address, 01, 00, result code, check code L, check code H.

(3)、读取基表参数(3), read the base table parameters

上位机向巡检仪发送命令包,格式如下:The host computer sends a command packet to the inspection instrument, the format is as follows:

地址,地址反码,03,00,C2,基表地址,参数号,校验码L,校验码HAddress, address inverse code, 03, 00, C2, base table address, parameter number, check code L, check code H

巡检仪收到命令,从指定基表读取相应参数数据后回送应答包格式如下:The inspection instrument receives the command, reads the corresponding parameter data from the specified base table, and sends back a response packet in the following format:

地址,0B,00,结果码,基表地址,参数号,PV[2],SV[2],MV,B,参数值[2],校验码L,校验码H。Address, 0B, 00, result code, base table address, parameter number, PV[2], SV[2], MV, B, parameter value[2], check code L, check code H.

(4)、修改基表参数(4), modify the base table parameters

上位机向巡检仪发送命令包,格式如下:The host computer sends a command packet to the inspection instrument, the format is as follows:

地址,地址反码,05,00,C3,基表地址,参数号,参数值[2],校验码L,校验码HAddress, inverse address, 05, 00, C3, base table address, parameter number, parameter value [2], check code L, check code H

巡检仪收到命令,向指定基表定入相应参数数据后回送应答包格式如下:After receiving the command, the inspection instrument sends corresponding parameter data to the specified base table and sends back a response packet in the following format:

地址,0B,00,结果码,基表地址,参数号,PV[2],SV[2],MV,B,参数值[2],校验码L,校验码H。Address, 0B, 00, result code, base table address, parameter number, PV[2], SV[2], MV, B, parameter value[2], check code L, check code H.

(5)、下发曲线数据(5) Send curve data

上位机向巡检仪发送命令包,格式如下:The host computer sends a command packet to the inspection instrument, the format is as follows:

地址,地址反码,53,00,C4,基表地址,包序号,曲线数据[80],校验码L,校验码HAddress, inverse address, 53, 00, C4, base table address, package number, curve data [80], check code L, check code H

包序号: 0~8. (如果下发90段曲线则要分成9个包顺序下发)Package number: 0~8. (If you send 90 curves, you need to divide them into 9 packages and send them sequentially)

曲线数据:每次最多可发送10段曲线数据, 每段数据占8字节, 结构如下:Curve data: up to 10 pieces of curve data can be sent each time, and each piece of data occupies 8 bytes. The structure is as follows:

起始温度[2], 终止温度[2], 运行时间[2],控制符[1],标志[1]Start temperature[2], end temperature[2], running time[2], control symbol[1], sign[1]

巡检仪执行命令后回送应答包格式如下:The format of the response packet returned by the patrol instrument after executing the command is as follows:

地址,01,00,结果码,校验码L,校验码H。Address, 01, 00, result code, check code L, check code H.

(6)、暂停/启动控制(6), pause/start control

上位机向巡检仪发送命令包,格式如下:The host computer sends a command packet to the inspection instrument, the format is as follows:

地址,地址反码,03,00,C5,基表地址,控制码,校验码L,校验码HAddress, address inverse code, 03, 00, C5, base table address, control code, check code L, check code H

基表地址值若为FF, 则表示对所有基表进行控制If the base table address value is FF, it means to control all base tables

控制码:  00=暂停,  01=启动Control code: 00=pause, 01=start

巡检仪执行命令后回送应答包格式如下:The format of the response packet returned by the patrol instrument after executing the command is as follows:

地址,01,00,结果码,校验码L,校验码H。Address, 01, 00, result code, check code L, check code H.

(7)、采集记录(7) Collection records

上位机向巡检仪发送命令包,格式如下:The host computer sends a command packet to the inspection instrument, the format is as follows:

地址,地址反码,05,00,C6,包序号[4],校验码L,校验码HAddress, inverse address, 05, 00, C6, package number [4], check code L, check code H

包序号:  0~xxxxxxx,   (512字节/包)Package number: 0~xxxxxxx, (512 bytes/packet)

巡检仪回送应答包格式如下:The format of the response packet returned by the patrol instrument is as follows:

地址, 01,02,结果码,数据[512], 校验码L,校验码HAddress, 01,02, result code, data [512], check code L, check code H

温检记录每条占16字节,格式如下:Each temperature inspection record occupies 16 bytes, and the format is as follows:

标志[1], 基表地址[1], 温度值[2], 年月日时分秒[6], 保留[6]。Flag [1], base table address [1], temperature value [2], year, month, day, hour, minute, second [6], reserved [6].

(8)、巡检仪“实时”采集数据通信协议:(8) "Real-time" data acquisition communication protocol of the inspection instrument:

上位机向巡检仪发送查询命令包,格式如下:The upper computer sends a query command packet to the inspection instrument, the format is as follows:

地址,地址反码,02,00,C7,01,校验码L,校验码HAddress, address inverse code, 02,00,C7,01, check code L, check code H

巡检仪回送应答包格式如下:The format of the response packet returned by the patrol instrument is as follows:

地址, 15,00,结果码,数据[20], 校验码L,校验码Haddress, 15,00, result code, data[20], check code L, check code H

无数据时, 结果码=00When there is no data, the result code=00

有数据时, 结果码=01When there is data, result code=01

数据[20]: 格式如下:Data[20]: The format is as follows:

          记录号       [4字节,低字节在前]     Record number [4 bytes, low byte first]

          标志         [1字节: 01=温度记录,02=报警记录,03=报警解除记录]Signs [1 byte: 01=temperature record, 02=alarm record, 03=alarm release record]

          基表地址     [1字节][1 byte] Base table address [1 byte]

          温度值       [2字节,低字节在前]The temperature value [2 bytes, low byte first]

          年月日时分秒 [6字节],Year, month, day, hour, minute, second [6 bytes],

          保留         [6字节]Reserved [6 bytes]

当结果码=01时, 上位机必须再向巡检仪发送数据确认包,通知巡检仪此条记录已经收到,When the result code = 01, the host computer must send a data confirmation packet to the inspection instrument to notify the inspection instrument that this record has been received.

如果巡检仪没有收到确认包就会一直应答同一条记录。数据确认包格式如下:If the patrol instrument does not receive the confirmation packet, it will always respond to the same record. The format of the data confirmation packet is as follows:

地址,地址反码,02,00,C7,02,校验码L,校验码HAddress, address inverse code, 02,00, C7,02, check code L, check code H

数据确认包无应答。There is no response to the data confirmation packet.

实时采集步骤如下:步骤1)、 上位机发查询命令包;步骤2)、巡检仪回送应答包;步骤3)、应答包中无数据,回到步骤1);步骤4)、上位机发数据确认包,回到步骤1)。The real-time acquisition steps are as follows: step 1), the upper computer sends a query command packet; step 2), the inspection instrument sends back a response packet; step 3), there is no data in the response packet, return to step 1); step 4), the upper computer sends Data confirmation packet, return to step 1).

Claims (1)

Translated fromChinese
1.基于集中温控系统的温度数据采集方法,其特征在于:其包括以下步骤:1. based on the temperature data acquisition method of centralized temperature control system, it is characterized in that: it may further comprise the steps:步骤1)、系统上位机启动上位机串口向巡检仪发送温控曲线;Step 1), the host computer of the system starts the serial port of the host computer to send the temperature control curve to the inspection instrument;步骤2)、巡检仪向温控基表按段发送温控曲线;Step 2), the inspection instrument sends the temperature control curve to the temperature control base meter by segment;步骤3) 、上位机按照规定的取样周期读取巡检仪存储器中某一基表的实时温度值;如巡检仪存储器中没有采集到温度数据则执行步骤4),如巡检仪存储器中有数据则进一步判断该段数据采样是否完成,如完成则将采集到的温度数据曲线发送至数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;Step 3), the upper computer reads the real-time temperature value of a base meter in the memory of the patrol instrument according to the specified sampling period; if no temperature data is collected in the memory of the patrol instrument, perform step 4), if the temperature data in the memory of the patrol instrument If there is data, it will further judge whether the data sampling of this section is completed. If it is completed, the collected temperature data curve will be sent to the database before reading the next section of data. If it is not completed, the host computer will continue to read the inspection instrument according to the specified sampling cycle. The real-time temperature value of the base table in the memory;步骤4)、以巡检仪号j和基表号i为查询索引,遍历检索基表的全部历史数据判断上位机数据库中有无与缺失数据匹配的温度数据,如没有则以设定温度曲线值公式(1)来作为缺失时间点或段的温度数据曲线公式计算并补充温度曲线,然后判断该段温度数据采样是否完成,如完成则将采集到的和补充完毕的温度曲线发送至上位机数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;Step 4), using the inspection instrument number j and the base table number i as the query index, traverse all the historical data of the base table to determine whether there is any temperature data matching the missing data in the host computer database, if not, use the set temperature curve Value formula (1) is used as the temperature data curve formula of the missing time point or segment to calculate and supplement the temperature curve, and then judge whether the temperature data sampling of this segment is completed. If it is completed, the collected and supplemented temperature curve will be sent to the host computer Then read the next piece of data from the database. If it is not completed, the host computer will continue to read the real-time temperature value of the base table in the memory of the inspection instrument according to the specified sampling cycle;Y=(y2-y1)/(x2-x1)X+(y1x2-y2x1)/(x2-x1)                (1)Y=(y2 -y1 )/(x2 -x1 )X+(y1 x2 -y2 x1 )/(x2 -x1 ) (1)设x为时间,y为基表的温度值,其中x1和x2为温度曲线某段的起始和终止时间,y1和y2为该曲线起始和终止的温度值;Let x be the time, and y be the temperature value of the base table, wherex1 andx2 are the start and end times of a certain section of the temperature curve, andy1 andy2 are the temperature values at the start and end of the curve; 如数据库中有与缺失数据匹配的数据,则再判断数据精度要求,如数据精度要求高则以公式(2)来作为缺失时间点或段的温度数据曲线公式来计算并补充温度曲线,然后判断该段温度数据采样是否完成,如完成则将采集到的和补充完毕的温度曲线发送至上位机数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;If there is data matching the missing data in the database, then judge the data accuracy requirements. If the data accuracy requirements are high, use formula (2) as the temperature data curve formula of the missing time point or segment to calculate and supplement the temperature curve, and then judge Whether the temperature data sampling of this section is completed, if it is completed, send the collected and supplemented temperature curve to the host computer database and then read the next section of data, if it is not completed, the host computer will continue to read and inspect according to the specified sampling cycle The real-time temperature value of the base meter in the instrument memory;如数据精度要求低则按公式(3)来作为缺失时间点或段的温度数据曲线公式来计算并补充温度曲线,然后判断该段温度数据采样是否完成,如完成则将采集到的和补充完毕的温度曲线发送至上位机数据库后再读取下一段数据,如没有完成则上位机按照规定的取样周期继续读取巡检仪存储器中所述基表的实时温度值;If the data accuracy requirement is low, use the formula (3) as the temperature data curve formula of the missing time point or segment to calculate and supplement the temperature curve, and then judge whether the temperature data sampling of this segment is completed. If it is completed, the collected and supplemented The temperature curve is sent to the host computer database before reading the next piece of data. If not completed, the host computer will continue to read the real-time temperature value of the base meter in the memory of the inspection instrument according to the specified sampling cycle;Uji= Min{(Yji-Vji)21, (Yji-Vji)22,……(Yji-Vji)2n-1, (Yji-Vji)2n}  (2)Uji = Min{(Yji -Vji )21 , (Yji -Vji )22 ,……(Yji -Vji )2n-1 , (Yji -Vji )2n } (2)Uji=∑Vji/n                                    (3)Uji =∑Vji /n (3)Uji为丢失温度数据值, Vji为数据库中相同编号的巡检仪j和相同基表号i在同一设定温度曲线、同一温控段、同一时刻的温度值;∑Vji为n个历史数据之和;Yji为同一基表根据设定温度曲线值公式(1)计算得到的值 。Uji is the missing temperature data value, Vji is the temperature value of the inspection instrument j with the same number and the same base meter number i in the database at the same set temperature curve, the same temperature control section, and the same time; ΣVji is n The sum of historical data; Yji is the value calculated by the same base table according to the formula (1) of the set temperature curve value.
CN 2013100121652013-01-142013-01-14Temperature data collection method based on centralized temperature control systemWithdrawnCN103116376A (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN 201310012165CN103116376A (en)2013-01-142013-01-14Temperature data collection method based on centralized temperature control system
CN201410015859.XACN103995549B (en)2013-01-142014-01-14Based on the temperature data acquisition method for concentrating temperature control system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN 201310012165CN103116376A (en)2013-01-142013-01-14Temperature data collection method based on centralized temperature control system

Publications (1)

Publication NumberPublication Date
CN103116376Atrue CN103116376A (en)2013-05-22

Family

ID=48414785

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN 201310012165WithdrawnCN103116376A (en)2013-01-142013-01-14Temperature data collection method based on centralized temperature control system

Country Status (1)

CountryLink
CN (1)CN103116376A (en)

Similar Documents

PublicationPublication DateTitle
CN104808587A (en)Utilization statistical approach based on operation states of machining equipment
CN105071535B (en)A kind of the time synchronization management system and implementation method of network system
CN103545933B (en)I0 interface communication method in intelligent substation on-line monitoring system station
CN110086832A (en)A kind of protocol converter
CN103076755B (en)Method for realizing large-capacity sequence-of-event (SOE) record based on program logic controller (PLC) device
CN103905410A (en)Multi-channel communication protocol converter capable of converting user-defined protocol to Modbus protocol
CN104659918A (en)Smart grid information management device fused with IEC (international electrotechnical commission) 61850 protocol
CN112505614A (en)Intelligent electric energy meter online monitoring system and method
CN202837399U (en)Synchronized phasor measurement apparatus
CN203191430U (en)Multifunctional electric power parameter display instrument based on DSP
CN205139355U (en)Leading collection system suitable for system is compared to total mark electric quantity
CN103995549B (en)Based on the temperature data acquisition method for concentrating temperature control system
CN203219328U (en) A multi-channel communication protocol converter
CN206224784U (en)A kind of photo-electronic directly reading gas meter controller based on the GPRS communication technologys
CN111143482B (en)Service data processing method and device of energy Internet of things and electronic equipment
CN103116376A (en)Temperature data collection method based on centralized temperature control system
CN103135534A (en)Temperature data acquisition method based on centralized temperature control system
CN202794917U (en)Water supply data acquisition and analysis system
CN101719000A (en)Gas mass flow detection and control system and method
CN205691633U (en)A kind of Intelligent reading list processing equipment reducing electric-power metering line loss
CN110244096B (en)Method for automatically discovering and processing electric meter full code in electric energy metering system
CN209513103U (en)Energy measurement of natural gas system
CN209281545U (en)A kind of double metering radio-frequency intelligent irrigation controllers of water power
CN104615118B (en)A kind of power plant&#39;s fieldbus DPV1 management systems and method
CN103185630A (en)System and method for checking sensor in breathing machine

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C04Withdrawal of patent application after publication (patent law 2001)
WW01Invention patent application withdrawn after publication

Application publication date:20130522


[8]ページ先頭

©2009-2025 Movatter.jp