CN104199339B - Portable first-line bus temperature monitoring instrument and achievement method thereof - Google Patents

Portable first-line bus temperature monitoring instrument and achievement method thereof Download PDF

Info

Publication number
CN104199339B
CN104199339B CN201410389456.1A CN201410389456A CN104199339B CN 104199339 B CN104199339 B CN 104199339B CN 201410389456 A CN201410389456 A CN 201410389456A CN 104199339 B CN104199339 B CN 104199339B
Authority
CN
China
Prior art keywords
cable
temperature
parameter
chip
measuring
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.)
Expired - Fee Related
Application number
CN201410389456.1A
Other languages
Chinese (zh)
Other versions
CN104199339A (en
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.)
North China Institute of Science and Technology
Original Assignee
North China Institute of Science and Technology
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 North China Institute of Science and Technology filed Critical North China Institute of Science and Technology
Priority to CN201410389456.1A priority Critical patent/CN104199339B/en
Publication of CN104199339A publication Critical patent/CN104199339A/en
Application granted granted Critical
Publication of CN104199339B publication Critical patent/CN104199339B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Measuring And Recording Apparatus For Diagnosis (AREA)
  • Measuring Temperature Or Quantity Of Heat (AREA)

Abstract

The invention relates to a portable first-line bus temperature monitoring instrument and an achievement method thereof. The temperature monitoring instrument comprises a minimum single-chip microcomputer system, a power circuit, a first-line bus interface circuit, a communication interface module, a storage chip, a clock chip, a liquid crystal display module and a keyboard input module, wherein the power circuit, the first-line bus interface circuit, the communication interface module, the storage chip, the clock chip, the liquid crystal display module and the keyboard input module are connected with the minimum single-chip microcomputer system; the power circuit is used for supplying working voltage; the minimum single-chip microcomputer system is connected with a first-line bus temperature measuring cable and a monitoring host computer through the first-line bus interface circuit and the communication interface module, respectively; the storage chip is used for storing the cable parameters and temperature parameters; the clock chip is used for providing real-time clock; the liquid crystal display module is used for displaying the temperature information processed by the minimum single-chip microcomputer system; four keys are arranged on a panel of the keyboard input module and used for inputting operating instruction information to the minimum single-chip microcomputer system. According to the portable first-line bus temperature monitoring instrument and the achievement method, a main control program, an interrupting service program and a sub-processing program are arranged in the minimum single-chip microcomputer system to realize the portable first-line bus temperature monitoring instrument.

Description

A kind of portable one-wire bus temperature monitoring instrument and its implementation method
Technical field
The present invention relates to a kind of temperature monitoring instrument and its implementation method, especially with regard to a kind of portable one-wire bus temperature Degree measuring instrument and its implementation.
Background technology
One-wire bus refer to realize the total of digital communication merely with a holding wire and the line of return as reference ground Line, can realize to being overlapped on the access of several one-wire bus devices and control in this bus using one-wire bus technology. One line device is in accordance with one-wire bus agreement and to realize the device of the functions such as some sensings, conversion, control, storage, every line All it is etched with unique one group of 64 binary code (abbreviation id code), in order to identify every line device of difference when device dispatches from the factory. One line digital temperature sensor ds18b20 is a wherein the most a line device.
In actual practicality, several line digital temperature sensors are connected to one pair according to the requirement of monitoring position On twisted wire cable, this cable is referred to as cable for measuring temperature.When being monitored to multi-point temp, one-wire bus technology has bus Connect, connect up the remarkable advantage such as simple.By mine shaft freeze and subway horizontal frozen engineering practice as a example, freeze to grasp The development situation of engineering, generally manages to lay some one-wire bus cable for measuring temperature in some regions, and manages to realize to every The monitoring of all temperature points on bar cable for measuring temperature.In one-wire bus monitoring application, generally given using on-Line Monitor Device Realize, will regularly be connected to monitoring device by one or more cable for measuring temperature, form a set of stable monitoring system.This realization Mode needs to provide field power supply, needs monitoring device and monitoring host computer communication, needs computer software of exploitation supervision etc.. This kind of mode put into greatly, technology implementation link is many, high cost is it is adaptable to measuring point is larger, monitoring frequency high field is closed.
Content of the invention
For the problems referred to above, it is an object of the invention to provide a kind of occupation mode flexibly convenient, low cost portable one Line bus temperature monitoring instrument and its implementation method.
For achieving the above object, the present invention takes a kind of technical scheme below: portable one-wire bus temperature monitoring instrument, It is characterized in that: it includes single-chip minimum system, power circuit, one-wire bus interface circuit, communication interface module, storage core Piece, clock chip, LCD MODULE and input through keyboard module;Described power circuit is described single-chip minimum system, a line Bus interface circuit, communication interface module, storage chip, clock chip, LCD MODULE and input through keyboard module for power supply, institute State single-chip minimum system pass through described one-wire bus interface circuit and described communication interface module respectively with one-wire bus thermometric Cable and monitoring host computer connect;Described storage chip is connected with described single-chip minimum system, for storing cable data and temperature Degree parameter;Described clock chip is connected with described single-chip minimum system by bus, and carries for described single-chip minimum system For real-time clock;Described LCD MODULE and input through keyboard module are all connected with described single-chip minimum system, through described list Temperature information after piece machine minimum system is processed is shown by described LCD MODULE;By described input through keyboard module Enter the operating instructions information to described single-chip minimum system;On the panel of described input through keyboard module, four buttons are set, its It is respectively as follows: and represent the esc key cancelled or return upper level, the up key representing upwards or increasing, the down representing downwards or reducing And represent the enter key that current selection is confirmed, and utilize tri- Macintosh of esc+up, esc+down, esc+enter Extend the function of described input through keyboard module.
Some memory blocks are set in described single-chip minimum system, and the memory block of setting includes: cable for measuring temperature reference record Memory block, cable temperature reference record memory block, cable for measuring temperature temperature parameter record pointer memory block and instrument management parameter Record storage area.
Some memory blocks are set in described storage chip, and the memory block of setting includes: cable for measuring temperature reference record memory block, The record storage of cable temperature reference record memory block, cable for measuring temperature temperature parameter record pointer memory block and instrument management parameter Area.
A kind of implementation method of described portable one-wire bus temperature monitoring instrument, it comprises the following steps: 1) described electricity Source circuit is powered for described single-chip minimum system, and after upper electricity, described single-chip minimum system is initialized, and when described Clock chip obtains present clock, by the selection picture of described LCD MODULE function menu, subsequently enters dormancy work Operation mode;The initialization of described single-chip minimum system includes initialization to default characteristic variable, to described liquid crystal display mode Initialization that block shows, initialize and read real-time clock parameter and to described communication interface module to described clock chip Initialization;Default characteristic variable includes function choosing-item variable menu_function, cable option-argument cable_select With running status variable run_status;2) one primary control program of setting, three interruption clothes in described single-chip minimum system Business program and five sub- processing routines, three interrupt service routines are respectively Interruption service routine, tick interrupt service journey Sequence and serial ports interrupt service routine;Five sub- processing routines are respectively measuring point monitoring subprogram, the sub- journey of cable monitoring data record Subprogram and communication subprogram consulted in sequence, measuring point search subroutine, record;Primary control program is run using interrupting type of drive, often After generation is interrupted and has executed interrupt service routine, just exit park mode, enter keystroke handling process;According to described keyboard Situation that in input module, button is pressed and the working condition that instrument is presently in, select corresponding subprocessing program, change work Make state, realize realizing multi-functional and too many levels process using limited button;Whether primary control program real-time query is currently located In at-once monitor state run_status=2, if being in at-once monitor state, measuring point is called to the measuring point on selected cable Monitoring subprogram, the temperature information of the specified measuring point of cable for measuring temperature selected by real-time update;Run_status=under communication state 14, primary control program real-time inspection has or not communication command mark, if there are communication command mark, then execution communication subprogram.
Described step 2) in, measuring point monitoring subprogram is realized by following steps: (1) is according to cable number from cable for measuring temperature The first location of this cable for measuring temperature parameter storage is obtained in reference record memory block;(2) the execution verification of agreement method is adopted to calculate, and right Whether check results are effectively judged;If it is valid, execution step (3);If invalid, exit measuring point and monitor sub- journey Sequence;(3) start the temperature transition to this temperature point after the id code obtaining specified measuring point according to sensor sequence number and obtain specified The temperature information of measuring point;(4) temperature information obtaining is shown by described LCD MODULE.
Described step 2) in, cable monitoring data record subprogram is realized by following steps: (1) will be initial for measuring point sequence number Turn to 0, and call measuring point monitoring subprogram, the temperature information of extraction is transmitted and is kept in specified ram region;(2) lead to Cross measuring point quantity on more current measuring point sequence number and cable for measuring temperature, judge whether to have monitored the temperature of all measuring points, if complete Become monitoring, then execution step (3);If not completing monitoring, continue to monitor the temperature of next measuring point;(3) read real-time clock Parameter, and temporary temperature information in Qi Yu ram area is assembled together;(4) according to cable for measuring temperature numbering and temperature parameter note The record pointer parameter of storage in record pointer memory space, the measuring point monitoring temperature information is transmitted to cable temperature parameter note Record in storage area and stored.
Described step 2) in, measuring point search subroutine is realized by following steps: (1) stores from cable for measuring temperature reference record Area extracts cable data, and using the ginseng in the cable for measuring temperature reference record memory block corresponding to verification this cable number of code check Whether number is effective;If parameter is effectively, judge to whether covering former cable data;If covering former cable data, Execution step (2), if not covering former cable data, exits measuring point search subroutine;If invalid parameters, execution step (2);(2) each sensor on search one-wire bus cable for measuring temperature, and Search Results are transmitted to enter to described LCD MODULE Row display;(3) it is whether 0 to judge to the number of sensors searching, if Search Results are 0, exit measuring point search Subprogram, if Search Results are not 0, the id code of sensor is arranged in order, and calculate cable characteristic parameter and Check code;(4) according to cable sequence number, number of sensors, sensor id code, cable characteristic parameter and check code are transmitted to thermometric Cable data record storage area is stored.
Described step 2) in, record is consulted subprogram and is realized by following steps: (1) is according to cable number from cable for measuring temperature Temperature parameter record storage area obtains the first location of cable temperature parameter memory block;(2) obtain certain temperature ginseng according to LSN The storage head location of number scale record;(3) temperature information of certain measuring point is obtained according to measuring point sequence number;(4) temperature information obtaining passes through institute State LCD MODULE to be shown.
Described step 2) in, communication subprogram is realized by following steps: (1) primary control program real-time judge monitoring host computer is No transmission Communication Control order, if receiving the Communication Control order that monitoring host computer sends, communication subprogram parses this communication Control command;Otherwise, exit communication subprogram;(2) coding according to Communication Control order, communication subprogram carries out meter parameter The operations such as setting, real-time clock setting, cable data upload and temperature parameter upload.
Described step 2) in, Interruption service routine is set to the Interruption of some cycles, for realizing keyboard Input processing, draws the working condition of keyboard, has included whether that Macintosh is pressed;Clock interrupt service routine is at regular intervals Produce and once interrupt, the real-time clock parameter of single-chip microcomputer memory storage is updated, provide in real time for cable temperature reference record Clock label;Serial ports interrupt service routine starts serial ports transmitting-receiving under instrument communication mode and interrupts, and realizes and between monitoring host computer Communication contact, monitoring host computer adopts master-slave communication pattern with instrument cubicle;Interrupting receiving in service routine, instrument is to receiving Monitoring host computer information carries out syntactic analysiss, after obtaining effective monitoring host computer Communication Control signal, setting corresponding order mark Will, then responds process by primary control program to Communication Control signal.
Due to taking above technical scheme, it has the advantage that the 1, present invention is led to by single-chip minimum system to the present invention Cross one-wire bus interface circuit and communication interface module is connected with one-wire bus cable for measuring temperature and monitoring host computer respectively, by a line Bus interface circuit alternately connects a plurality of cable for measuring temperature, and on detection cable for measuring temperature, the temperature of temperature sensor is believed under software Number and transmitted to single-chip minimum system by one-wire bus cable for measuring temperature, the temperature information that single-chip minimum system obtains passes through LCD MODULE is shown, arranges four buttons, press according in input through keyboard module on the panel of input through keyboard module Situation that key is pressed and the working condition that instrument is presently in, select corresponding to process subprogram;So as to realize a plurality of survey The search of warm cable temperature information, the function such as monitor, record and consult.2nd, the present invention is due to using single-chip minimum system, electricity Source circuit, one-wire bus interface circuit, communication interface module, storage chip, clock chip, LCD MODULE and input through keyboard Module, by the search of a plurality of cable for measuring temperature temperature information, the function such as monitor, record and consult and integrate, replace existing One-wire bus temperature monitoring system in technology, the therefore present invention can be saved temperature detection cost, simplify one-wire bus thermometric The operation management of cable monitoring.Based on above advantage, the present invention can be widely applied in one-wire bus temperature monitoring.
Brief description
Fig. 1 is the structural representation of the present invention portable one-wire bus temperature monitoring instrument;
Fig. 2 is the flow chart of the implementation method of the present invention portable one-wire bus temperature monitoring instrument;
Fig. 3 is the state transition diagram under button operation state;On cable no measuring point when, report no measuring point simultaneously enters State 15, the at-once monitor pressing esc or enter return state 1 in state 15 shows;In Password Input mistake, by enter Password is re-entered in requirement;
Fig. 4 is measuring point monitoring subprogram implementing procedure figure;
Fig. 5 is cable monitoring data record subprogram implementing procedure figure;
Fig. 6 is measuring point search subroutine implementing procedure figure;
Fig. 7 is that subprogram implementing procedure figure consulted in record;
Fig. 8 is communication subprogram implementing procedure figure.
Specific embodiment
With reference to the accompanying drawings and examples the present invention is described in detail.
As shown in figure 1, the portable one-wire bus temperature monitoring instrument of the present invention includes single-chip minimum system 1, power supply Circuit 2, one-wire bus interface circuit 3, communication interface module 4, storage chip 5, clock chip 6, LCD MODULE 7 and keyboard Input module 8.Power circuit 2 is single-chip minimum system 1, one-wire bus interface circuit 3, communication interface module 4, storage chip 5th, clock chip 6, LCD MODULE 7 and input through keyboard module 8 are powered.Single-chip minimum system 1 passes through one-wire bus interface Circuit 3 is connected with one-wire bus cable for measuring temperature, and one-wire bus interface circuit 3 provides for one-wire bus cable for measuring temperature and drives.Monolithic Machine minimum system 1 is connected with monitoring host computer by communication interface module 4, realizes data communication.Storage chip 5 is minimum with single-chip microcomputer System 1 connects, for storing the information such as cable data, temperature parameter.Clock chip 6 passes through bus and single-chip minimum system 1 Connect, and provide real-time clock for single-chip minimum system 1.LCD MODULE 7 and input through keyboard module 8 are all with single-chip microcomputer Mini system 1 connects, and the temperature information after processing through single-chip minimum system 1 is shown by LCD MODULE 7.By key Disk input module 8 inputs corresponding operating command information to single-chip minimum system 1.Wherein, the panel of input through keyboard module 8 sets Put four buttons, it is respectively as follows: and represents the esc key cancelled or return upper level, the up key representing upwards or increasing, represents downwards Or the down that reduces and represent enter key that current selection is confirmed, and utilize esc+up, esc+down, esc+ The function of tri- Macintosh extended keyboard input modules 8 of enter.
In above-described embodiment, some storages are set in single-chip minimum system 1 internal storage area or external memory chip 4 Area, it specifically includes:
(1) cable for measuring temperature reference record memory block is set;
According to the numbering of one-wire bus cable for measuring temperature, it is that every cable for measuring temperature is respectively provided with a memory space.Each storage is empty Between middle storage reference numeral cable for measuring temperature on the quantity of connect one-wire bus temperature sensor, the id code of every temperature sensor or This corresponding numbering of id code, the characterisitic parameter of this cable for measuring temperature and the crc code (cyclic for parameter self-inspection Redundancy check, CRC) etc. parameter.Wherein, the quantity of the cable for measuring temperature that can arrange is subject to single-chip microcomputer The restriction of the memory capacity of minimum system 1 internal storage area or external memory chip 4.
(2) cable temperature reference record memory block is set;
Divide a temperature parameter record storage space for every one-wire bus cable for measuring temperature.Temperature parameter record storage space For storing multigroup temperature parameter of corresponding cable for measuring temperature, every group of temperature parameter of every cable for measuring temperature includes: by temperature sensing Device number order arrangement corresponding cable for measuring temperature on all temperature sensors record temperature parameter, execute temperature monitoring record when Corresponding real-time clock, self-inspection code of this group temperature parameter etc..To the temperature parameter that every cable for measuring temperature can be arranged Group number is limited by the memory capacity in single-chip minimum system 1 internal storage area or external memory chip 4.
(3) cable for measuring temperature temperature parameter record pointer memory block is set;
It is respectively provided with a temperature parameter record pointer memory space for every cable for measuring temperature, store for referring in this memory space Sequence number, existing record strip number, self demarking code of this group temperature parameter etc. to current or next record.Referred to according to temperature parameter record In pin memory space, the parameter of storage realizes the management to each temperature parameter record of every cable for measuring temperature.
(4) record storage area of instrument management parameter is set;
The record storage area of instrument management parameter is used for storing instrument management parameter, and instrument management parameter includes the volume of instrument Password of code, version number and instrument corresponding operating etc..
As shown in Fig. 2 the implementation method of the portable one-wire bus temperature monitoring instrument of the present invention, it specifically includes following Step:
1) power circuit 2 is powered for single-chip minimum system 1, and after upper electricity, single-chip minimum system 1 is initialized, and from Clock chip 6 obtains present clock, by the selection picture of LCD MODULE 7 function menu, subsequently enters dormancy work Operation mode, to reduce the power consumption of temperature monitoring instrument of the present invention.
The initialization of single-chip minimum system 1 includes initialization to default characteristic variable, LCD MODULE 7 is shown Initialization, initialize and read real-time clock parameter and the initialization to communication interface module 4 to clock chip 6.Its In, default characteristic variable includes function choosing-item variable menu_function, cable option-argument cable_select and operation State variable run_status.
2) primary control program, three interrupt service routines and five subprocessing journeys are set in single-chip minimum system 1 Sequence.Wherein, three interrupt service routines are respectively as follows: Interruption service routine, clock interrupt service routine and serial ports and interrupt taking Business program.Five sub- processing routines are respectively as follows: measuring point monitoring subprogram, cable monitoring data record subprogram, measuring point search Subprogram and communication subprogram consulted in program, record.
Primary control program is run using interrupting type of drive, after generation is interrupted and executed interrupt service routine, just moves back Go out park mode, enter keystroke handling process.As shown in figure 3, situation about being pressed according to button in input through keyboard module 8 and instrument The working condition being presently in, selects corresponding subprocessing program, modification state, thus realizing real using limited button Show multi-functional and too many levels process.
Whether primary control program real-time query is currently in at-once monitor state run_status=2, if being in instant prison Survey state, will call measuring point monitoring subprogram, the specified survey of cable for measuring temperature selected by real-time update to the measuring point on selected cable The temperature information of point.
Run_status=14 under communication state, primary control program real-time inspection has or not communication command mark, if there are logical News order mark, then execution communication subprogram.
Above-mentioned steps 2) in, as shown in figure 4, measuring point monitoring subprogram is realized by following steps:
(1) head of this cable for measuring temperature parameter storage is obtained from cable for measuring temperature reference record memory block according to cable number Location.
(2) adopt the execution verification of agreement method to calculate, and whether check results are effectively judged.If it is valid, Execution step (3);If invalid, exit measuring point monitoring subprogram.
(3) start the temperature transition to this temperature point after the id code obtaining specified measuring point according to sensor sequence number and obtain The temperature information of specified measuring point.
(4) temperature information obtaining is shown by LCD MODULE 7.
Above-mentioned steps 2) in, as shown in figure 5, cable monitoring data record subprogram is realized by following steps:
(1) measuring point sequence number is initialized as 0, and calls measuring point monitoring subprogram, the temperature information of extraction is transmitted to finger Determine to be kept in ram region.
(2) pass through to compare measuring point quantity on current measuring point sequence number and cable for measuring temperature, judge whether to have monitored all measuring points Temperature, if complete to monitor, execution step (3);If not completing monitoring, continue to monitor the temperature of next measuring point.
(3) read real-time clock parameter, and temporary temperature information in Qi Yu ram area is assembled together.
(4) according to the record pointer parameter of storage in cable for measuring temperature numbering and temperature parameter record pointer memory space, will The measuring point temperature information monitoring transmits and is stored to cable temperature reference record memory block.
Above-mentioned steps 2) in, as shown in fig. 6, measuring point search subroutine is realized by following steps:
(1) extract cable data from cable for measuring temperature reference record memory block, and using verification this cable number institute of code check Whether the parameter in corresponding cable for measuring temperature reference record memory block is effective.If parameter is effectively, to whether covering former cable Parameter is judged;If covering former cable data, execution step (2), if not covering former cable data, exit measuring point Search subroutine;If invalid parameters, execution step (2).
(2) each sensor on search one-wire bus cable for measuring temperature, and Search Results are transmitted to enter to LCD MODULE 7 Row display.
(3) it is whether 0 to judge to the number of sensors searching, if Search Results are 0, exit measuring point search Subprogram, if Search Results are not 0, the id code of sensor is arranged in certain sequence, and calculates cable feature ginseng Number and check code.
(4) according to cable sequence number, number of sensors, sensor id code, cable characteristic parameter and check code are transmitted to survey Warm cable data record storage area is stored.
Above-mentioned steps 2) in, as shown in fig. 7, record is consulted subprogram and is realized by following steps:
(1) obtain the head of cable temperature parameter memory block from cable for measuring temperature temperature parameter record storage area according to cable number Location.
(2) the storage head location of certain temperature parameter record is obtained according to LSN.
(3) temperature information of certain measuring point is obtained according to measuring point sequence number.
(4) temperature information obtaining is shown by LCD MODULE 7.
Above-mentioned steps 2) in, as shown in figure 8, communication subprogram is realized by following steps:
(1) whether primary control program real-time judge monitoring host computer sends Communication Control order, if receive monitoring host computer sent Communication Control order, then communication subprogram parse this Communication Control order;Otherwise, exit communication subprogram.
(2) coding according to Communication Control order, communication subprogram carries out meter parameter setting, real-time clock setting, electricity Cable parameter uploads and the operations such as temperature parameter upload.
Above-mentioned steps 2) in, Interruption service routine is set to the Interruption of some cycles (as 10ms), for reality The input processing of existing keyboard, draws the working condition of keyboard, has included whether Macintosh by inferior.
Clock interrupt service routine produces (as 1s) at regular intervals and once interrupts, to single-chip microcomputer memory storage real-time when Clock parameter is updated, and provides real-time clock label for cable temperature reference record.
Serial ports interrupt service routine starts serial ports transmitting-receiving under instrument communication mode and interrupts, and realizes logical and between monitoring host computer News contact, monitoring host computer adopts master-slave communication pattern with instrument cubicle.Interrupting receiving in service routine, instrument is to the prison receiving Control host information carries out syntactic analysiss, after obtaining effective monitoring host computer Communication Control signal, setting corresponding order mark, Then process is responded to Communication Control signal by primary control program.
The various embodiments described above are merely to illustrate the present invention, and the structure of wherein each part, connected mode and method and step etc. are all Can be varied from, every equivalents carrying out on the basis of technical solution of the present invention and improvement, all should not exclude Outside protection scope of the present invention.

Claims (7)

1. a kind of implementation method of portable one-wire bus temperature monitoring instrument it is characterised in that: described portable one-wire bus Temperature monitoring instrument includes single-chip minimum system, power circuit, one-wire bus interface circuit, communication interface module, storage core Piece, clock chip, LCD MODULE and input through keyboard module;Described power circuit is described single-chip minimum system, a line Bus interface circuit, communication interface module, storage chip, clock chip, LCD MODULE and input through keyboard module for power supply, institute State single-chip minimum system pass through described one-wire bus interface circuit and described communication interface module respectively with one-wire bus thermometric Cable and monitoring host computer connect;Described storage chip is connected with described single-chip minimum system, for storing cable data and temperature Degree parameter;Described clock chip is connected with described single-chip minimum system by bus, and carries for described single-chip minimum system For real-time clock;Described LCD MODULE and input through keyboard module are all connected with described single-chip minimum system, through described list Temperature information after piece machine minimum system is processed is shown by described LCD MODULE;By described input through keyboard module Enter the operating instructions information to described single-chip minimum system;On the panel of described input through keyboard module, four buttons are set, its It is respectively as follows: and represent the esc key cancelled or return upper level, the up key representing upwards or increasing, the down representing downwards or reducing And represent the enter key that current selection is confirmed, and utilize tri- Macintosh of esc+up, esc+down, esc+enter Extend the function of described input through keyboard module;
Some memory blocks are set, and the memory block of setting includes: cable for measuring temperature reference record storage in described single-chip minimum system Area, the record of cable temperature reference record memory block, cable for measuring temperature temperature parameter record pointer memory block and instrument management parameter Memory block;
Some memory blocks are set, and the memory block of setting includes: cable for measuring temperature reference record memory block, cable in described storage chip The record storage area of temperature parameter record storage area, cable for measuring temperature temperature parameter record pointer memory block and instrument management parameter;
Described implementation method comprises the following steps:
1) described power circuit is powered for described single-chip minimum system, and after upper electricity, described single-chip minimum system is carried out initially Change, and obtain present clock from described clock chip, by the selection picture of described LCD MODULE function menu, with Enter dormancy mode of operation afterwards;
The initialization of described single-chip minimum system includes initialization to default characteristic variable, described LCD MODULE is shown The initialization shown, to described clock chip initialize and read real-time clock parameter and to described communication interface module just Beginningization;Default characteristic variable includes function choosing-item variable menu_function, cable option-argument cable_select and fortune Row state variable run_status;
2) primary control program, three interrupt service routines and five subprocessing journeys are set in described single-chip minimum system Sequence, three interrupt service routines are respectively Interruption service routine, clock interrupt service routine and serial ports interrupt service routine; Five sub- processing routines are respectively measuring point monitoring subprogram, cable monitoring data record subprogram, measuring point search subroutine, record Consult subprogram and communication subprogram;
Primary control program is run using interrupting type of drive, after generation is interrupted and executed interrupt service routine, just exits not Sleep mode, enters keystroke handling process;Situation about being pressed according to button in described input through keyboard module and instrument are presently in Working condition, selects corresponding subprocessing program, modification state, realization is realized multi-functional and multi-ring using limited button The process of section;
Whether primary control program real-time query is currently in at-once monitor state run_status=2, if being in at-once monitor shape State, then call measuring point monitoring subprogram, the temperature of the specified measuring point of cable for measuring temperature selected by real-time update to the measuring point on selected cable Degree information;Run_status=14 under communication state, primary control program real-time inspection has or not communication command mark, if there are communication Order mark, then execution communication subprogram.
2. as claimed in claim 1 a kind of implementation method of portable one-wire bus temperature monitoring instrument it is characterised in that: institute State step 2) in, measuring point monitoring subprogram is realized by following steps:
(1) the first location of this cable for measuring temperature parameter storage is obtained from cable for measuring temperature reference record memory block according to cable number;
(2) adopt the execution verification of agreement method to calculate, and whether check results are effectively judged;If it is valid, execution Step (3);If invalid, exit measuring point monitoring subprogram;
(3) start the temperature transition to temperature point after the id code obtaining specified measuring point according to sensor sequence number and obtain specified survey The temperature information of point;
(4) temperature information obtaining is shown by described LCD MODULE.
3. as claimed in claim 1 a kind of implementation method of portable one-wire bus temperature monitoring instrument it is characterised in that: institute State step 2) in, cable monitoring data record subprogram is realized by following steps:
(1) measuring point sequence number is initialized as 0, and calls measuring point monitoring subprogram, the temperature information of extraction is transmitted to specified ram Kept in region;
(2) pass through to compare measuring point quantity on current measuring point sequence number and cable for measuring temperature, judge whether to have monitored the temperature of all measuring points, If completing to monitor, execution step (3);If not completing monitoring, continue to monitor the temperature of next measuring point;
(3) read real-time clock parameter, and temporary temperature information in Qi Yu ram area is assembled together;
(4) according to the record pointer parameter of storage in cable for measuring temperature numbering and temperature parameter record pointer memory space, will monitor To measuring point temperature information transmit and stored to cable temperature reference record memory block.
4. as claimed in claim 1 a kind of implementation method of portable one-wire bus temperature monitoring instrument it is characterised in that: institute State step 2) in, measuring point search subroutine is realized by following steps:
(1) extract cable data from cable for measuring temperature reference record memory block, and using corresponding to verification code check cable number Whether the parameter in cable for measuring temperature reference record memory block is effective;If parameter is effectively, enter to whether covering former cable data Row judges;If covering former cable data, execution step (2), if not covering former cable data, exits measuring point search Program;If invalid parameters, execution step (2);
(2) each sensor on search one-wire bus cable for measuring temperature, and Search Results are transmitted to enter to described LCD MODULE Row display;
(3) it is whether 0 to judge to the number of sensors searching, if Search Results are 0, exit measuring point and search for sub- journey Sequence, if Search Results are not 0, the id code of sensor is arranged in order, and is calculated cable characteristic parameter and verification Code;
(4) according to cable sequence number, number of sensors, sensor id code, cable characteristic parameter and check code are transmitted to thermometric electricity Cable reference record memory block is stored.
5. as claimed in claim 1 a kind of implementation method of portable one-wire bus temperature monitoring instrument it is characterised in that: institute State step 2) in, record is consulted subprogram and is realized by following steps:
(1) obtain the first location of cable temperature parameter memory block from cable for measuring temperature temperature parameter record storage area according to cable number;
(2) the storage head location of certain temperature parameter record is obtained according to LSN;
(3) temperature information of certain measuring point is obtained according to measuring point sequence number;
(4) temperature information obtaining is shown by described LCD MODULE.
6. as claimed in claim 1 a kind of implementation method of portable one-wire bus temperature monitoring instrument it is characterised in that: institute State step 2) in, communication subprogram is realized by following steps:
(1) whether primary control program real-time judge monitoring host computer sends Communication Control order, if receive that monitoring host computer sends is logical News control command, then communication subprogram parses this Communication Control order;Otherwise, exit communication subprogram;
(2) coding according to Communication Control order, communication subprogram carries out meter parameter setting, real-time clock setting, cable ginseng Number uploads and temperature parameter upload operation.
7. as claimed in claim 1 a kind of implementation method of portable one-wire bus temperature monitoring instrument it is characterised in that: institute State step 2) in, Interruption service routine is set to the Interruption of some cycles, for realizing the input processing of keyboard, obtains Go out the working condition of keyboard, included whether that Macintosh is pressed;During clock interrupt service routine produces once at regular intervals Disconnected, the real-time clock parameter of single-chip microcomputer memory storage is updated, provides real-time clock label for cable temperature reference record;String Mouth interrupt service routine starts serial ports transmitting-receiving under instrument communication mode and interrupts, and realizes the communication contact and between monitoring host computer, prison Control main frame and instrument cubicle adopt master-slave communication pattern;Interrupting receiving in service routine, instrument is to the monitoring host computer letter receiving Breath carries out syntactic analysiss, and after obtaining effective monitoring host computer Communication Control signal, setting corresponding order mark, then by leading Control program responds process to Communication Control signal.
CN201410389456.1A 2014-08-08 2014-08-08 Portable first-line bus temperature monitoring instrument and achievement method thereof Expired - Fee Related CN104199339B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410389456.1A CN104199339B (en) 2014-08-08 2014-08-08 Portable first-line bus temperature monitoring instrument and achievement method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410389456.1A CN104199339B (en) 2014-08-08 2014-08-08 Portable first-line bus temperature monitoring instrument and achievement method thereof

Publications (2)

Publication Number Publication Date
CN104199339A CN104199339A (en) 2014-12-10
CN104199339B true CN104199339B (en) 2017-01-25

Family

ID=52084640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410389456.1A Expired - Fee Related CN104199339B (en) 2014-08-08 2014-08-08 Portable first-line bus temperature monitoring instrument and achievement method thereof

Country Status (1)

Country Link
CN (1) CN104199339B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107576411A (en) * 2017-10-31 2018-01-12 河南柴油机重工有限责任公司 A kind of PT1000 temperature-measuring modules for diesel engine monitoring system
CN111353595A (en) * 2018-12-20 2020-06-30 上海寒武纪信息科技有限公司 Operation method, device and related product
CN109885740A (en) * 2019-01-24 2019-06-14 杭州志远科技有限公司 A kind of data visualization thermograph system
CN115808196A (en) * 2022-12-30 2023-03-17 北京康斯特仪表科技股份有限公司 Bus type measuring instrument detection method, detection device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002056071A (en) * 2000-08-14 2002-02-20 Yakiii Kk Environment management-type abnormality monitoring and urgent measure supporting system
CN2750392Y (en) * 2004-11-30 2006-01-04 北京农业信息技术研究中心 Portable multi-point digital earth temperature gauge
US20060039408A1 (en) * 2004-08-23 2006-02-23 Standard Microsystems Corporation Budget sensor bus
CN101556191A (en) * 2009-05-11 2009-10-14 天津科技大学 Multipath temperature patrol inspection system of mass concrete structure
CN101626367A (en) * 2008-07-07 2010-01-13 北京中煤矿山工程有限公司 1-wire bus device ID-based communication protocol
CN202141963U (en) * 2011-07-01 2012-02-08 无锡威泰迅电力科技有限公司 One wire digital temperature and humidity measurement and control apparatus
CN203037369U (en) * 2013-01-30 2013-07-03 深圳市金博联电力技术有限公司 Cable head temperature-measuring system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002056071A (en) * 2000-08-14 2002-02-20 Yakiii Kk Environment management-type abnormality monitoring and urgent measure supporting system
US20060039408A1 (en) * 2004-08-23 2006-02-23 Standard Microsystems Corporation Budget sensor bus
CN2750392Y (en) * 2004-11-30 2006-01-04 北京农业信息技术研究中心 Portable multi-point digital earth temperature gauge
CN101626367A (en) * 2008-07-07 2010-01-13 北京中煤矿山工程有限公司 1-wire bus device ID-based communication protocol
CN101556191A (en) * 2009-05-11 2009-10-14 天津科技大学 Multipath temperature patrol inspection system of mass concrete structure
CN202141963U (en) * 2011-07-01 2012-02-08 无锡威泰迅电力科技有限公司 One wire digital temperature and humidity measurement and control apparatus
CN203037369U (en) * 2013-01-30 2013-07-03 深圳市金博联电力技术有限公司 Cable head temperature-measuring system

Also Published As

Publication number Publication date
CN104199339A (en) 2014-12-10

Similar Documents

Publication Publication Date Title
CN104199339B (en) Portable first-line bus temperature monitoring instrument and achievement method thereof
CN103926899A (en) Multifunctional remote data monitoring system based on Internet of Things oil field
CN110008647A (en) The twin simulator of number and the twin analogue system of number
CN103092115A (en) Sensor transfer measurement and control system based on miniature universal serial bus (USB)
CN201237737Y (en) Sequence event logging performance test apparatus
CN104331170A (en) Method and device for realizing combined key in matrix keyboard
CN107820657A (en) Charged state indicating means, charged state instruction system and terminal device
CN201673498U (en) Keyboard test system
CN102901571B (en) Registration mechanism-based multi-point temperature measurement control system
CN107422254A (en) A kind of built-in chip health status towards integrated micro-system is from monitoring method
CN104424086A (en) Computer error detection module and method
CN206683659U (en) A kind of novel and multifunctional integrated building block system sensor
CN105046934A (en) Equipment able to realize data communication with seafloor heat flow measurement unit and communication method
CN106155859A (en) A kind of monitoring management system, information processing method and high density server
CN201166695Y (en) Fault detection case
CN106768413A (en) Multipoint temperature detecting device
CN102610074A (en) Mineral wireless data acquisition terminal
CN102788006A (en) Embedded air compressor control system
CN202916015U (en) Register mechanism based multipoint temperature-measuring control system
CN207301729U (en) A kind of embedded multi-axis controller with man-machine interface
CN208421584U (en) A kind of injection molding acquisition terminal
JP6926703B2 (en) Electric energy management system, electric energy monitor recognition program and recording medium
CN105183055B (en) X-ray bulb working condition on-line detecting system
CN111224175B (en) Battery management system
CN205691242U (en) A kind of wireless temperature acquisition system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170125

Termination date: 20180808