CN102445286B - Temperature measuring method and system based on programmable logic controller - Google Patents
Temperature measuring method and system based on programmable logic controller Download PDFInfo
- Publication number
- CN102445286B CN102445286B CN201010502032.3A CN201010502032A CN102445286B CN 102445286 B CN102445286 B CN 102445286B CN 201010502032 A CN201010502032 A CN 201010502032A CN 102445286 B CN102445286 B CN 102445286B
- Authority
- CN
- China
- Prior art keywords
- temperature
- passage
- temperature survey
- measuring
- subcycle
- 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.)
- Active
Links
Landscapes
- Testing Or Calibration Of Command Recording Devices (AREA)
Abstract
The embodiment of the invention discloses a temperature measuring method based on a programmable logic controller. The method comprises the following steps of: starting a temperature measuring module through a PLC (Programmable Logic Controller) to measure the temperature of at least two preset temperature measuring channels; judging whether to measure the temperature of a current temperature measuring channel according to preset temperature measurement scheduling information by using the temperature measuring module; when a judged result is positive, measuring the temperature of the current temperature measuring channel, switching a next temperature measuring channel to the current temperature measuring channel after measurement is completed, and continually performing the step for judging whether to measure the temperature of the current temperature measuring channel according to preset temperature measurement scheduling information; and when the judged result is negative, switching the next temperature measuring channel to the current temperature measuring channel, and continually performing the step for judging whether to measure the temperature of the current temperature measuring channel according to preset temperature measurement scheduling information. Correspondingly, the invention further discloses a temperature measuring system based on a programmable logic controller.
Description
Technical field
The present invention relates to electronic communication field, relate in particular to a kind of thermometry and system based on programmable logic controller (PLC).
Background technology
Programmable logic controller (PLC) (PLC, Programmable Logic Controller) is the electronic installation that a kind of digital operation that is specially application designs under industrial environment operates, and PLC has been widely used in industrial automation.
Temperature survey is one of universal functionality of possessing of PLC system; For the consideration of cost, in prior art, generally adopt analog to digital converter (ADC, Analog-to-Digital Converter) multiple spot patrol and examine structure, each measurement passage is measured successively, input signal is input to successively in ADC and carries out analog to digital conversion, then offers performance element and carries out computing and control.The measuring speed that temperature-measuring module in PLC system is measured passage to each is identical, has identical valid data return period to being connected to each measured temperature of same temperature measurement module.
But in actual industrial automation control system, the especially middle-size and small-size automation equipment of distinct device, to temperature survey speed require different, or same equipment is not identical to the measuring speed of diverse location and process procedure requirement yet, and even same equipment also has different measuring speed requirements to different process process same temperature collection point.Such as: in pile foundation concrete column molding process, its temperature control cooling procedure is very long to be calculated with multiple hours; And in ball grid array structure (BGA, Ball Grid Array) welding rework equipments, need to, up to 10hz, just can reach reasonable effect to the thermometric frequency of welding target.
Temperature-measuring module in the PLC system of prior art can not adapt to these different demands, so often needs to configure the temperature-measuring module of multiple different measuring speed, but, so greatly increase production cost.
Summary of the invention
Embodiment of the present invention technical matters to be solved is that the temperature survey based on PLC in prior art can not meet the demand of different measuring speeds, if configure the problem that the temperature-measuring module of multiple different measuring speed causes production cost to increase, a kind of thermometry and system based on programmable logic controller (PLC) be provided.
In order to solve the problems of the technologies described above, a kind of thermometry based on programmable logic controller (PLC) that the embodiment of the present invention proposes, comprising:
PLC start-up temperature measurement module carries out temperature survey at least two default temperature measuring channels;
Described temperature-measuring module judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey; The instruction metrical information that described temperature survey schedule information comprises each temperature measuring channel in measuring period;
When judged result is when being, the temperature survey speed to preset, Current Temperatures when in pre-test subcycle is measured to passage and carry out temperature survey, and by MUX, next temperature measuring channel is switched to Current Temperatures measurement passage after measuring, continue to carry out according to default temperature survey schedule information judging whether that Current Temperatures is measured to passage carries out thermometric step; When judged result is while being no, next temperature measuring channel is switched to Current Temperatures and measure passage, continue to carry out according to default temperature survey schedule information judging whether that Current Temperatures is measured to passage carries out thermometric step;
Wherein, further comprise: described PLC is according to the modify instruction receiving, to the setting of modifying of the temperature survey schedule information in described temperature-measuring module.
Wherein, comprise that at least two are measured subcycle described measuring period;
Described temperature-measuring module judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage to carry out also comprising before thermometric step:
Each is set and measures instruction metrical information corresponding to each temperature measuring channel in subcycle.
Wherein, describedly next temperature measuring channel is switched to Current Temperatures measure the step of passage and comprise:
Detect the temperature survey whether completing each temperature measuring channel when in pre-test subcycle;
When testing result is while being no, will measure passage when next temperature measuring channel in pre-test subcycle switch to Current Temperatures; When the test results is yes, the temperature measuring channel that next is measured to subcycle switches to Current Temperatures measurement passage, and described next measurement subcycle is switched to when pre-test subcycle.
Correspondingly, the embodiment of the invention discloses a kind of temperature measurement system based on programmable logic controller (PLC), comprising:
Comprise PLC and temperature-measuring module, described PLC starts described temperature-measuring module at least two default temperature measuring channels is carried out to temperature survey, it is characterized in that, described temperature-measuring module comprises:
Schedule information setting unit, for set temperature measurement scheduling information, the instruction metrical information that described temperature survey schedule information comprises each temperature measuring channel in measuring period;
Measure judging unit, for judging whether that according to the temperature survey schedule information of described schedule information setting unit setting Current Temperatures is measured to passage carries out temperature survey;
Measuring speed arranges module, for set temperature measuring speed;
Temperature survey subelement, for when the judged result of described measurement judging unit is when being, the temperature survey speed that according to described measuring speed module setting is set is measured passage to Current Temperatures and is carried out temperature survey;
Passage switch unit, after Current Temperatures being measured to channel measurement when described temperature survey subelement, or when the judged result of described measurement judging unit is while being no, control MUX and next temperature measuring channel is switched to Current Temperatures measure passage, and trigger described measurement judging unit and judge;
Wherein, described PLC is according to the modify instruction receiving, to the temperature survey schedule information arranging in the described schedule information setting unit setting of modifying.
Wherein, comprise that at least two are measured subcycle described measuring period;
Described schedule information setting unit arranges each and measures instruction metrical information corresponding to each temperature measuring channel in subcycle.
Wherein, described passage switch unit comprises:
Detecting unit, after Current Temperatures being measured to channel measurement when described temperature survey subelement, or when the judged result of described measurement judging unit is while being no, detect the temperature survey whether completing each temperature measuring channel when in pre-test subcycle;
Check processing unit, when being no when the testing result of described detecting unit, will measure passage when next temperature measuring channel in pre-test subcycle switch to Current Temperatures; When the testing result of described detecting unit is when being, the temperature measuring channel that next is measured to subcycle switches to Current Temperatures and measures passage, and described next measurement subcycle is switched to when pre-test subcycle.
Implement the embodiment of the present invention, there is following beneficial effect:
Temperature-measuring module judges whether that according to this temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey, user can preset temperature measurement scheduling information, the instruction metrical information that this temperature survey schedule information comprises each temperature measuring channel in measuring period, reaching the effect of flexible configuration temperature survey speed, effectively solve the temperature survey based on PLC in prior art and can not meet the demand of different measuring speeds; User can dynamically adjust temperature survey schedule information according to actual needs, improve the thermometric adaptability based on PLC, avoid the problem that needs the temperature-measuring module that configures multiple different measuring speed to cause production cost to increase in prior art, when having realized the temperature survey performance of taking into account based on PLC, reduce production cost.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic flow sheet that the present invention is based on the first embodiment of the thermometry of PLC;
Fig. 2 is the principle schematic of the thermometry based on PLC of the embodiment of the present invention;
Fig. 3 is the schematic flow sheet that the present invention is based on the second embodiment of the thermometry of PLC;
Fig. 4 is the structural representation that the present invention is based on the first embodiment of the temperature measurement system of PLC;
Fig. 5 is the structural representation that the present invention is based on the second embodiment of the temperature measurement system of PLC.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The schematic flow sheet of the first embodiment of the thermometry that the present invention is based on PLC as shown in Figure 1, comprising:
Step S101:PLC start-up temperature measurement module carries out temperature survey at least two default temperature measuring channels;
Particularly, PLC (being specially PLC master controller) receives after temperature survey instruction, according to this instruction start-up temperature measurement module, at least two default temperature measuring channels is carried out to temperature survey.
Step S102: described temperature-measuring module judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey;
Particularly, user can be according to self need to set in advance temperature survey schedule information, the instruction metrical information that this temperature survey schedule information comprises each temperature measuring channel in measuring period,, this instruction metrical information has indicated which temperature measuring channel within test period need to carry out temperature survey, and which temperature measuring channel does not need to carry out temperature survey; PLC master controller starts this temperature-measuring module at least two default temperature measuring channels is carried out after temperature survey, this temperature-measuring module will judge whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey, when judged result is when being, perform step S103; When judged result is while being no, perform step S104.
Step S103: Current Temperatures is measured to passage and carry out temperature survey;
Step S104: next temperature measuring channel is switched to Current Temperatures and measure passage.
Particularly, temperature-measuring module switches to Current Temperatures by next temperature measuring channel and measures passage, then re-executes step S102.It should be noted that, this temperature-measuring module cyclically carries out temperature survey at least two default temperature measuring channels; Temperature-measuring module switches to Current Temperatures by next temperature measuring channel and measures passage, is equivalent to this temperature-measuring module and successively and cyclically at least two default temperature measuring channels is carried out to temperature survey in order.
Below in conjunction with the principle schematic of the thermometry based on PLC of the embodiment of the present invention shown in Fig. 2, further describe the thermometry based on PLC of the embodiment of the present invention.
As shown in Figure 2, describe as example to adopt the multiple spot of multiplexing ADC to patrol and examine structure, PLC master controller receives after temperature survey instruction, communicate (being that temperature-measuring module is equivalent to PLC temperature expansion module) by expansion bus and temperature-measuring module, initiate temperature survey enabled instruction to temperature-measuring module, with start-up temperature measurement module, at least two default temperature measuring channels (in Fig. 2 taking 8 temperature measuring channels as example) are carried out to temperature survey, the expansion bus communication unit of temperature-measuring module receives after the temperature survey enabled instruction of PLC master controller, temperature survey performance element will judge whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey, when judged result is when being, Current Temperatures is measured to passage and carry out temperature survey, after measurement, MUX switches to Current Temperatures by next temperature measuring channel and measures passage, then temperature survey performance element judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey again, when judged result is while being no, MUX switches to Current Temperatures by next temperature measuring channel and measures passage, and then temperature survey performance element judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey again.Temperature-measuring module one by one channel cycle goes down, and periodically carries out temperature survey.
Wherein, Current Temperatures measurement passage is carried out to temperature survey can be specially, measuring passage as Current Temperatures is passage 1, MUX has been switched to passage 1 so, start AD conversion, the temperature sensing data of the temperature sensor from passage 1 correspondence are carried out to filtering, and implement to measure temperature computation according to AD transformation result, then implement to measure temperature results filtering, temperature survey performance element stores filtered measurement result into measurement result storage area, then MUX is switched to passage 2, to complete, next temperature measuring channel is switched to Current Temperatures measurement passage.
It should be noted that, according to the principle of work difference of different sensors, for example thermopair need configure local compensation temperature survey sensor, and thermal resistance does not need to configure local compensation temperature survey sensor etc.
Further, the schematic flow sheet of the second embodiment of the thermometry that the present invention is based on PLC as shown in Figure 3, comprising:
Step S301:PLC start-up temperature measurement module carries out temperature survey at least two default temperature measuring channels;
Particularly, step S301 is identical with step S101 in above-described embodiment, repeats no more here.
Step S302: described temperature-measuring module judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey;
What particularly, user can be according to self need to set in advance temperature survey schedule information, the instruction metrical information that this temperature survey schedule information comprises each temperature measuring channel in measuring period; Comprise that at least two are measured subcycle this measuring period, that is, each is measured subcycle and is combined into an overall measurement cycle, the instruction metrical information that temperature survey schedule information comprises each temperature measuring channel in each measurement subcycle; PLC master controller starts this temperature-measuring module at least two default temperature measuring channels is carried out after temperature survey, this temperature-measuring module will judge whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey, when judged result is when being, perform step S303; When judged result is while being no, perform step S304.
Step S303: according to default temperature survey speed, the Current Temperatures when in pre-test subcycle is measured to passage and carry out temperature survey;
Particularly, user can set in advance temperature survey speed according to actual needs, as the processor by set temperature measurement module carries out temperature survey with 10hz or 60hz equifrequent, the temperature survey that completes a temperature measuring channel with every 1/10 second or every 1/60 second uniform velocity is set in embodiments of the present invention, and temperature-measuring module will be measured passage to the Current Temperatures when in pre-test subcycle according to this temperature survey speed and carry out temperature survey so.
Step S304: detect the temperature survey whether completing each temperature measuring channel when in pre-test subcycle;
Particularly, when the test results is yes, perform step S306; When testing result is while being no, perform step S305.
Step S305: will measure passage when next temperature measuring channel in pre-test subcycle switches to Current Temperatures;
Particularly, step S305 re-executes step S302 after carrying out.
Step S306: the temperature measuring channel that next is measured to subcycle switches to Current Temperatures measurement passage, and described next measurement subcycle is switched to when pre-test subcycle.
Particularly, step S306 re-executes step S302 after carrying out.
Again further, user need to set in advance instruction metrical information corresponding to each temperature measuring channel in each measurement subcycle according to self, temperature survey schedule information can be, but not limited to as shown in table 1 below, to comprise that 4 are measured subcycle measuring period, temperature measuring channel is that 8 temperature measuring channels are example:
Channel number | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Measure subcycle 1 | E | E | E | E | E | E | E | E |
Measure subcycle 2 | E | E | E | E | E | E | E | E |
Measure subcycle 3 | E | E | E | E | E | E | E | E |
Measure subcycle 4 | E | E | E | E | E | E | E | E |
Table 1
In table 1, for example, in the time that E value is 0, the temperature survey of passage corresponding in this measurement subcycle is not carried out in instruction; In the time that E value is 1, the temperature survey of passage corresponding in this measurement subcycle is carried out in instruction.Temperature-measuring module is measured subcycle according to these 4, in order successively from measuring subcycle 1 to measuring subcycle 2 to measuring subcycle 3 finally to measuring subcycle 4, each temperature measuring channel is carried out to temperature survey, after measuring subcycle 4 measurements, again successively each is measured to subcycle in order and carry out temperature survey,, 4 measurement subcycles are an overall measurement cycle; User can need to arrange each and measure E value corresponding to each passage in subcycle according to self, and default a certain temperature survey speed, temperature-measuring module carries out temperature survey by the Current Temperatures when in pre-test subcycle being measured to passage according to the temperature survey speed of this setting.Example is as shown in table 2 below:
Channel number | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Measure subcycle 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
Measure subcycle 2 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 |
Measure subcycle 3 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
Measure subcycle 4 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
Each passage actual measurement | 5/n | 5/n | 5/n | 5/n | 20/n | 20/n | 20/n | 20/n |
Cycle unit: second | ? | ? | ? | ? | ? | ? | ? | ? |
Table 2
As in table 2, having supposed user preset completes once thermometric speed taking every 1/n second (n is as the numerical value of arbitrary size) temperature measuring channel is carried out to temperature survey, temperature-measuring module carries out before temperature survey first judging whether this temperature measuring channel to carry out temperature survey to each temperature measuring channel of measuring in subcycle successively so, in the time judging instruction metrical information that temperature measuring channel is corresponding and be 1, just carry out the temperature survey to this temperature measuring channel, for example, in measurement subcycle 1, temperature-measuring module completes the temperature survey to passage 5 to passage 1 second with 1/n respectively successively, passage 6 to passage 8 is not carried out to temperature survey, then enter and measure subcycle 2, successively respectively to complete the temperature survey to passage 4 to passage 1 second with 1/n, then complete the temperature survey to passage 6 second with 1/n, not to passage 5, passage 7 and passage 8 carry out temperature survey etc., therefore, can calculate passage 1, passage 2, be all 5/n second (be every 5/n second carry out a temperature survey) measuring period of passage 3 and passage 4, passage 5, passage 6, be all 20/n second (be every 20/n second carry out a temperature survey) measuring period of passage 7 and passage 8, show that user can pass through set temperature measurement scheduling information according to actual needs, to complete the passage higher to some the temperature survey rate requests setting of (if passage 1 is to passage 4), complete the passage lower to some the temperature survey rate requests setting of (if passage 5 is to passage 8).
The example that and for example another temperature survey schedule information in following table 3 arranges:
Table 3
Similar in table 3 and table 2, be all 1/n second (be every 1/n second carry out a temperature survey) measuring period that can calculate passage 1, passage 2 to passage 8 do not carried out to temperature survey.
It should be noted that, in the embodiment of the present invention, user can revise temperature survey schedule information according to actual needs at any time, user is not limited to 4 measurement subcycles that above-described embodiment arranges, more measurement subcycle can be set as required, thereby can configure more flexibly the measuring period of each temperature measuring channel, user can send modify instruction to PLC master controller at any time so, PLC master controller is according to the modify instruction receiving, to the setting of modifying of the temperature survey schedule information in described temperature-measuring module.
Implement the embodiment of the present invention, temperature-measuring module judges whether that according to this temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey, user can preset temperature measurement scheduling information, the instruction metrical information that this temperature survey schedule information comprises each temperature measuring channel in measuring period, reaching the effect of flexible configuration temperature survey speed, effectively solve the temperature survey based on PLC in prior art and can not meet the demand of different measuring speeds; User can dynamically adjust temperature survey schedule information according to actual needs, improve the thermometric adaptability based on PLC, avoid the problem that needs the temperature-measuring module that configures multiple different measuring speed to cause production cost to increase in prior art, when having realized the temperature survey performance of taking into account based on PLC, reduce production cost.
Describe the thermometry based on PLC of the embodiment of the present invention above in detail, below correspondingly, the structure of the temperature measurement system based on programmable logic controller (PLC) of the accompanying drawings embodiment of the present invention.
The structural representation of the first embodiment of the temperature measurement system that the present invention is based on PLC as shown in Figure 4, temperature measurement system based on PLC comprises PLC41 and temperature-measuring module 42, wherein temperature-measuring module 42 comprises schedule information setting unit 421, measures judging unit 422, temperature survey subelement 423 and passage switch unit 424
Schedule information setting unit 421 is for set temperature measurement scheduling information, the instruction metrical information that described temperature survey schedule information comprises each temperature measuring channel in measuring period;
Particularly, user can be according to self need to set in advance temperature survey schedule information by schedule information setting unit 421, the instruction metrical information that this temperature survey schedule information comprises each temperature measuring channel in measuring period,, this instruction metrical information has indicated which temperature measuring channel within test period need to carry out temperature survey, and which temperature measuring channel does not need to carry out temperature survey.
Measure judging unit 422 and judge whether that for the temperature survey schedule information arranging according to schedule information setting unit 421 Current Temperatures is measured to passage carries out temperature survey;
Particularly, PLC41 (being specially PLC master controller) receives after temperature survey instruction, according to this instruction start-up temperature measurement module 42, at least two default temperature measuring channels are carried out to temperature survey, the measurement judging unit 422 in temperature-measuring module 42 judges whether that by the temperature survey schedule information arranging according to schedule information setting unit 421 Current Temperatures is measured to passage carries out temperature survey so.
Temperature survey subelement 423, for when the judged result of measuring judging unit 422 is when being, carries out temperature survey to Current Temperatures measurement passage;
Passage switch unit 424 is for after measuring channel measurement when temperature survey subelement 423 Current Temperatures, or in the time that to measure the judged result of judging unit 422 be no, next temperature measuring channel is switched to Current Temperatures and measure passage, and triggering measurement judging unit 422 judges.
It should be noted that, temperature-measuring module 42 cyclically carries out temperature survey at least two default temperature measuring channels; Passage switch unit 424 switches to Current Temperatures by next temperature measuring channel and measures passage, is equivalent to temperature-measuring module 42 and successively and cyclically at least two default temperature measuring channels is carried out to temperature survey in order.
Particularly, as shown in Figure 2, the structure of the temperature measurement system based on PLC is described as example to adopt the multiple spot of multiplexing ADC to patrol and examine structure, wherein PLC master controller is equivalent to PLC41, and temperature survey performance element has comprised measurement judging unit 422 and temperature survey subelement 423 and passage switch unit 424; PLC master controller receives after temperature survey instruction, communicate (being that temperature-measuring module 42 is equivalent to PLC temperature expansion module) by expansion bus and temperature-measuring module 42, initiate temperature survey enabled instruction to temperature-measuring module 42, with start-up temperature measurement module 42, at least two default temperature measuring channels (in Fig. 2 taking 8 temperature measuring channels as example) are carried out to temperature survey, the expansion bus communication unit (not drawing in Fig. 4) of temperature-measuring module 42 receives after the temperature survey enabled instruction of PLC master controller, temperature survey performance element will judge whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey, when judged result is when being, Current Temperatures is measured to passage and carry out temperature survey, after measurement, passage switch unit 424 is controlled MUX next temperature measuring channel is switched to Current Temperatures measurement passage, then temperature survey performance element judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey again, when judged result is while being no, passage switch unit 424 is controlled MUX next temperature measuring channel is switched to Current Temperatures measurement passage, and then temperature survey performance element judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey again.Temperature-measuring module one by one channel cycle goes down, and periodically carries out temperature survey.
Wherein, Current Temperatures measurement passage is carried out to temperature survey can be specially, measuring passage as Current Temperatures is passage 1, MUX has been switched to passage 1 so, start AD conversion, the temperature sensing data of the temperature sensor from passage 1 correspondence are carried out to filtering, and implement to measure temperature computation according to AD transformation result, then implement to measure temperature results filtering, temperature survey performance element stores filtered measurement result into measurement result storage area, then MUX is switched to passage 2, to complete, next temperature measuring channel is switched to Current Temperatures measurement passage.
Further, the structural representation of the second embodiment of the temperature measurement system that the present invention is based on PLC as shown in Figure 5, temperature measurement system based on PLC comprises outside PLC41 and temperature-measuring module 42, also comprise that measuring speed arranges module 43, passage switch unit 424 in temperature-measuring module 42 comprises detecting unit 4241 and Check processing unit 4242, particularly:
Schedule information setting unit 421 specifically arranges each and measures instruction metrical information corresponding to each temperature measuring channel in subcycle; What particularly, user can be according to self need to set in advance temperature survey schedule information by schedule information setting unit 421, the instruction metrical information that this temperature survey schedule information comprises each temperature measuring channel in measuring period; Comprise that at least two are measured subcycle this measuring period, that is, each is measured subcycle and is combined into an overall measurement cycle, the instruction metrical information that temperature survey schedule information comprises each temperature measuring channel in each measurement subcycle;
Measuring speed arranges module 43 for set temperature measuring speed; Particularly, the processor that user can arrange module 43 set temperature measurement modules 42 by measuring speed carries out temperature survey with 10hz or 60hz equifrequent, and the temperature survey that completes a temperature measuring channel with every 1/10 second or every 1/60 second uniform velocity is set in embodiments of the present invention; It should be noted that, it can be an independent physical location that measuring speed arranges module 43, also can be integrated in temperature-measuring module 42.
Particularly, measure temperature survey schedule information judgement that judging unit 422 arranges according to schedule information setting unit 421 need to measure passage and carry out temperature survey Current Temperatures time, temperature survey subelement 423 arranges according to measuring speed the temperature survey speed that module 43 arranges, and the Current Temperatures when in pre-test subcycle is measured to passage and carry out temperature survey.
Detecting unit 4241 is for after measuring channel measurement when temperature survey subelement 423 to Current Temperatures, or in the time that to measure the judged result of judging unit 422 be no, detect the temperature survey whether completing each temperature measuring channel when in pre-test subcycle;
Passage when being no when the testing result of detecting unit 4241, will be measured when next temperature measuring channel in pre-test subcycle switch to Current Temperatures in Check processing unit 4242; When the testing result of detecting unit 4241 is when being, the temperature measuring channel that next is measured to subcycle switches to Current Temperatures and measures passage, and will be described next measure subcycle and switch to when pre-test subcycle, and trigger measurement judging unit 422 and judge.
Again further, user need to set in advance instruction metrical information corresponding to each temperature measuring channel in each measurement subcycle according to self, temperature survey schedule information can be, but not limited to as shown in table 4 below, to comprise that 4 are measured subcycle measuring period, temperature measuring channel is that 8 temperature measuring channels are example:
Channel number | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Measure subcycle 1 | E | E | E | E | E | E | E | E |
Measure subcycle 2 | E | E | E | E | E | E | E | E |
Measure subcycle 3 | E | E | E | E | E | E | E | E |
Measure subcycle 4 | E | E | E | E | E | E | E | E |
Table 4
In table 4, for example, in the time that E value is 0, the temperature survey of passage corresponding in this measurement subcycle is not carried out in instruction; In the time that E value is 1, the temperature survey of passage corresponding in this measurement subcycle is carried out in instruction.Temperature-measuring module 42 is measured subcycle according to these 4, in order successively from measuring subcycle 1 to measuring subcycle 2 to measuring subcycle 3 finally to measuring subcycle 4, each temperature measuring channel is carried out to temperature survey, after measuring subcycle 4 measurements, again successively each is measured to subcycle in order and carry out temperature survey,, 4 measurement subcycles are an overall measurement cycle; User can need to arrange each and measure E value corresponding to each passage in subcycle according to self, and default a certain temperature survey speed, temperature-measuring module 42 carries out temperature survey by the Current Temperatures when in pre-test subcycle being measured to passage according to the temperature survey speed of this setting.Example is as shown in table 5 below:
Table 5
As in table 5, having supposed user preset completes once thermometric speed taking every 1/n second (n is as the numerical value of arbitrary size) temperature measuring channel is carried out to temperature survey, the temperature survey subelement 423 of temperature-measuring module 42 carries out before temperature survey each temperature measuring channel of measuring in subcycle successively so, measuring judging unit 422 first judges whether this temperature measuring channel to carry out temperature survey, in the time judging instruction metrical information that temperature measuring channel is corresponding and be 1, temperature survey subelement 423 just carries out the temperature survey to this temperature measuring channel, for example, in measurement subcycle 1, temperature survey subelement 423 completes the temperature survey to passage 5 to passage 1 second with 1/n respectively successively, passage 6 to passage 8 is not carried out to temperature survey, then enter and measure subcycle 2, successively respectively to complete the temperature survey to passage 4 to passage 1 second with 1/n, then complete the temperature survey to passage 6 second with 1/n, not to passage 5, passage 7 and passage 8 carry out temperature survey etc., therefore, can calculate temperature survey subelement 423 to passage 1, passage 2, be all 5/n second (be every 5/n second carry out a temperature survey) measuring period of passage 3 and passage 4, to passage 5, passage 6, be all 20/n second (be every 20/n second carry out a temperature survey) measuring period of passage 7 and passage 8, show that user can pass through set temperature measurement scheduling information according to actual needs, to complete the passage higher to some the temperature survey rate requests setting of (if passage 1 is to passage 4), complete the passage lower to some the temperature survey rate requests setting of (if passage 5 is to passage 8).
The example that and for example another temperature survey schedule information in following table 6 arranges:
Table 6
Similar in table 6 and table 5, be all 1/n second (be every 1/n second carry out a temperature survey) measuring period that can calculate passage 1, passage 2 to passage 8 do not carried out to temperature survey.
It should be noted that, in the embodiment of the present invention, user can revise temperature survey schedule information according to actual needs at any time, user is not limited to 4 measurement subcycles that above-described embodiment arranges, more measurement subcycle can be set as required, thereby can configure more flexibly the measuring period of each temperature measuring channel, user can send modify instruction to PLC master controller at any time so, PLC master controller is according to the modify instruction receiving, to the temperature survey schedule information setting of modifying arranging in scheduling information setting unit 421.。
In sum, implement the embodiment of the present invention, temperature-measuring module judges whether that according to this temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey, user can preset temperature measurement scheduling information, the instruction metrical information that this temperature survey schedule information comprises each temperature measuring channel in measuring period, reaching the effect of flexible configuration temperature survey speed, effectively solve the temperature survey based on PLC in prior art and can not meet the demand of different measuring speeds; User can dynamically adjust temperature survey schedule information according to actual needs, improve the thermometric adaptability based on PLC, avoid the problem that needs the temperature-measuring module that configures multiple different measuring speed to cause production cost to increase in prior art, when having realized the temperature survey performance of taking into account based on PLC, reduce production cost.
One of ordinary skill in the art will appreciate that the function that realizes all or part of flow process in above-described embodiment method, be can be relevant by the programmed instruction of writing for controller hardware complete, described program can be stored in magnetic disc, CD, read-only store-memory body (Read-Only Memory, or random store-memory body (Random Access Memory ROM), RAM), EEPROM (Electrically Erasable Programmable Read Only Memo) (ElectricallyErasable Programmable Read-Only Memory, EEPROM) etc.
Above disclosed is only the preferred embodiment in the embodiment of the present invention, the interest field that certainly can not limit the present invention with this, and the equivalent variations of therefore doing according to the claims in the present invention, still belongs to the scope that the present invention is contained.
Claims (6)
1. the thermometry based on programmable logic controller (PLC), is characterized in that, comprising:
Programmable logic controller (PLC) PLC start-up temperature measurement module carries out temperature survey at least two default temperature measuring channels;
Described temperature-measuring module judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage carries out temperature survey; The instruction metrical information that described temperature survey schedule information comprises each temperature measuring channel in measuring period, comprises that at least two are measured subcycle described measuring period;
When judged result is when being, the temperature survey speed to preset, Current Temperatures when in pre-test subcycle is measured to passage and carry out temperature survey, and by MUX, next temperature measuring channel is switched to Current Temperatures measurement passage after measuring, continue to carry out according to default temperature survey schedule information judging whether that Current Temperatures is measured to passage carries out thermometric step; When judged result is while being no, next temperature measuring channel is switched to Current Temperatures and measure passage, continue to carry out according to default temperature survey schedule information judging whether that Current Temperatures is measured to passage carries out thermometric step;
Wherein, further comprise: described PLC is according to the modify instruction receiving, to the setting of modifying of the temperature survey schedule information in described temperature-measuring module.
2. the method for claim 1, is characterized in that, described temperature-measuring module judges whether that according to default temperature survey schedule information Current Temperatures is measured to passage to carry out also comprising before thermometric step:
Each is set and measures instruction metrical information corresponding to each temperature measuring channel in subcycle.
3. method as claimed in claim 2, is characterized in that, describedly next temperature measuring channel is switched to Current Temperatures measures the step of passage and comprises:
Detect the temperature survey whether completing each temperature measuring channel when in pre-test subcycle;
When testing result is while being no, will measure passage when next temperature measuring channel in pre-test subcycle switch to Current Temperatures; When the test results is yes, the temperature measuring channel that next is measured to subcycle switches to Current Temperatures measurement passage, and described next measurement subcycle is switched to when pre-test subcycle.
4. the temperature measurement system based on programmable logic controller (PLC), comprise programmable logic controller (PLC) PLC and temperature-measuring module, described PLC starts described temperature-measuring module at least two default temperature measuring channels is carried out to temperature survey, it is characterized in that, described temperature-measuring module comprises:
Schedule information setting unit, for set temperature measurement scheduling information, the instruction metrical information that described temperature survey schedule information comprises each temperature measuring channel in measuring period, comprises that at least two are measured subcycle described measuring period;
Measure judging unit, for judging whether that according to the temperature survey schedule information of described schedule information setting unit setting Current Temperatures is measured to passage carries out temperature survey;
Measuring speed arranges module, for set temperature measuring speed;
Temperature survey subelement, for when the judged result of described measurement judging unit is when being, the temperature survey speed that according to described measuring speed module setting is set is measured passage to Current Temperatures and is carried out temperature survey;
Passage switch unit, after Current Temperatures being measured to channel measurement when described temperature survey subelement, or when the judged result of described measurement judging unit is while being no, control MUX and next temperature measuring channel is switched to Current Temperatures measure passage, and trigger described measurement judging unit and judge;
Wherein, described PLC is according to the modify instruction receiving, to the temperature survey schedule information arranging in the described schedule information setting unit setting of modifying.
5. system as claimed in claim 4, is characterized in that, described schedule information setting unit arranges each and measures instruction metrical information corresponding to each temperature measuring channel in subcycle.
6. system as claimed in claim 5, is characterized in that, described passage switch unit comprises:
Detecting unit, after Current Temperatures being measured to channel measurement when described temperature survey subelement, or when the judged result of described measurement judging unit is while being no, detect the temperature survey whether completing each temperature measuring channel when in pre-test subcycle;
Check processing unit, when being no when the testing result of described detecting unit, will measure passage when next temperature measuring channel in pre-test subcycle switch to Current Temperatures; When the testing result of described detecting unit is when being, the temperature measuring channel that next is measured to subcycle switches to Current Temperatures and measures passage, and described next measurement subcycle is switched to when pre-test subcycle, and triggers described measurement judging unit and judge.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010502032.3A CN102445286B (en) | 2010-09-30 | 2010-09-30 | Temperature measuring method and system based on programmable logic controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010502032.3A CN102445286B (en) | 2010-09-30 | 2010-09-30 | Temperature measuring method and system based on programmable logic controller |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102445286A CN102445286A (en) | 2012-05-09 |
CN102445286B true CN102445286B (en) | 2014-07-23 |
Family
ID=46007999
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010502032.3A Active CN102445286B (en) | 2010-09-30 | 2010-09-30 | Temperature measuring method and system based on programmable logic controller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102445286B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113588132B (en) * | 2021-07-27 | 2023-08-08 | 吉林省中赢高科技有限公司 | Temperature processing method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1796950A (en) * | 2004-12-29 | 2006-07-05 | 中国科学院空间科学与应用研究中心 | Temperature acquisition system in multiple channels suitable to examination of microgravity liquid |
CN101105691A (en) * | 2007-05-23 | 2008-01-16 | 深圳市合信自动化技术有限公司 | Input and output enlargement module and programmable controller system |
CN101105412A (en) * | 2007-05-23 | 2008-01-16 | 深圳市合信自动化技术有限公司 | PLC system and its temperature measurement and control expansion module, its implement method |
CN101551279A (en) * | 2008-12-26 | 2009-10-07 | 深圳市合信自动化技术有限公司 | Multi-channel thermocouple signal acquisition and measurement device |
-
2010
- 2010-09-30 CN CN201010502032.3A patent/CN102445286B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1796950A (en) * | 2004-12-29 | 2006-07-05 | 中国科学院空间科学与应用研究中心 | Temperature acquisition system in multiple channels suitable to examination of microgravity liquid |
CN101105691A (en) * | 2007-05-23 | 2008-01-16 | 深圳市合信自动化技术有限公司 | Input and output enlargement module and programmable controller system |
CN101105412A (en) * | 2007-05-23 | 2008-01-16 | 深圳市合信自动化技术有限公司 | PLC system and its temperature measurement and control expansion module, its implement method |
CN101551279A (en) * | 2008-12-26 | 2009-10-07 | 深圳市合信自动化技术有限公司 | Multi-channel thermocouple signal acquisition and measurement device |
Also Published As
Publication number | Publication date |
---|---|
CN102445286A (en) | 2012-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101105691B (en) | Input and output enlargement module and programmable controller system | |
CN108845563A (en) | A kind of method and system for testing PLC program and PLC monitoring software | |
CN105393187A (en) | Thermal profile based on temperature information for computing device location | |
CN102272685A (en) | Method for transferring parameter data during uploading and/or downloading of parameter settings between field devices and/or a control center | |
CN101609424A (en) | System hardware monitoring and simulation testing module and method thereof | |
CN102445286B (en) | Temperature measuring method and system based on programmable logic controller | |
CN105527893A (en) | Anti-interference multi-channel analog sampling circuit and method | |
CN104237773A (en) | Touch key testing system and method | |
CN206339542U (en) | The data acquisition of VOC environmental test chambers and expansible control device | |
CN105716890A (en) | Airplane temperature compensator test system and test method | |
CN105302655A (en) | System halt processing method and apparatus | |
CN104238394A (en) | Universal control method including triggering conditions, state judgment conditions and judgment implementation conditions | |
CN202257905U (en) | Wireless environmental temperature-humidity monitoring system for laboratories | |
CN204043759U (en) | Liquid level sensor automatic testing equipment | |
CN102999382A (en) | Electronic device and switching method thereof | |
CN104330103A (en) | Constant-temperature and constant-humidity system fault detection device | |
CN105182131A (en) | General test platform and test method | |
CN101719000A (en) | Gas mass flow detection and control system and method | |
CN102915032A (en) | Method for detecting state of electronic control system and diagnosing faults | |
CN114761760A (en) | Method for optimizing the measurement rate of a field device | |
CN101286262A (en) | Composite linear temperature-sensing fire disaster detector and alarming method | |
CN202230119U (en) | Novel two-channel intelligent electrical parameter measuring module | |
CN101719040A (en) | Testing apparatus of touch panel | |
CN101127154B (en) | Scan test display method and device | |
CN204101092U (en) | A kind of digital damp-warm syndrome sensor based on SHT1X |
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 |