CN113484816B - System and method for transmitting error data of electric energy meter calibrating device - Google Patents
System and method for transmitting error data of electric energy meter calibrating device Download PDFInfo
- Publication number
- CN113484816B CN113484816B CN202110692514.8A CN202110692514A CN113484816B CN 113484816 B CN113484816 B CN 113484816B CN 202110692514 A CN202110692514 A CN 202110692514A CN 113484816 B CN113484816 B CN 113484816B
- Authority
- CN
- China
- Prior art keywords
- error
- upper computer
- data
- error data
- machine
- 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
- 238000000034 method Methods 0.000 title claims abstract description 22
- 230000005540 biological transmission Effects 0.000 claims abstract description 24
- 238000004891 communication Methods 0.000 description 15
- 238000012360 testing method Methods 0.000 description 7
- 238000001514 detection method Methods 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 230000005587 bubbling Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 201000004569 Blindness Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R35/00—Testing or calibrating of apparatus covered by the other groups of this subclass
- G01R35/04—Testing or calibrating of apparatus covered by the other groups of this subclass of instruments for measuring time integral of power or current
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Arrangements For Transmission Of Measured Signals (AREA)
Abstract
The invention belongs to the technical field of data transmission, and particularly relates to a system and a method for transmitting error data of an electric energy meter calibrating device. The invention has the advantages that: the upper computer queries the error data without querying the error machine through a serial port, only by expanding an I/O port, queries corresponding hardware flag bits, and reads the error data from the error machine only when the hardware flag bits are low.
Description
Technical Field
The invention belongs to the technical field of data transmission, and particularly relates to a system and a method for transmitting error data of an electric energy meter calibrating device.
Background
Along with the continuous popularization and application of the intelligent electric energy meter calibrating device in the electric power system, higher real-time performance is required to be achieved in the process of monitoring the multi-meter position electric energy meter calibrating device, especially in the aspect of serial communication, real-time communication with equipment is required, error data are timely read and processed, and the data are fed back. The intelligent electric energy meter verification device is used for recording the accuracy, the safety and the reliability of the transmission of the electric power metering data to the computer, and the electric energy meter data is quickly and efficiently read from the verification device to a corresponding computer background operating system, so that the intelligent electric energy meter verification device has become an important work for related staff. The widely used calibrating device generally has the defects of long calibrating period, low efficiency, poor system stability and the like, and the phenomenon of dead halt occurs. The root cause is the reliability bottleneck problem encountered in the large-scale data transmission process.
The traditional transmission adopts RS485 or RS232 for transmission, and the transmission advantages and disadvantages are as follows:
The RS485 communication has the advantages of low hardware cost and simple circuit. The defects are as follows: ① RS485 is a quasi-two-way communication mode, and when the upper computer sends out a read error command to a certain error machine, each error machine receives the same information, and according to the 48 epitope calibration device, the error machine receives an extra approximately 48 times of command quantity, and the accuracy of the test error of the lower singlechip is possibly directly influenced, so that the lower computer is disturbed too much to tolerate. ② For the multi-meter position device, because the number of hanging nodes under the RS485 bus is too many, the accuracy of the upper computer receiving data can be affected, so that error data sent by the lower computer must contain check codes and meter position codes, otherwise, the upper computer cannot recognize the error data. Therefore, the error data sent by the lower computer is additionally added with 3 bytes (2-byte table bit code and 1-byte check code), and the serial port occupation time of the lower computer is also increased. ③ In the commands sent to the error machine by the upper computer, at least keywords and tokens are included, the number of bytes is more than 2, the serial port of the error machine is only buffered by one byte, and when the single-chip machine is in a state of interruption of the serial port, the receiving buffer can only store the last byte of the received command string, so that the commands are possibly lost, and even the single-chip machine is halted or communication is halted.
The above problems can be solved by the following method without considering time and efficiency: ① The error machine stops the serial port interruption during the error testing period, and stops testing after a new error value is tested, and the serial port interruption is opened to wait for an upper computer command; ② After the error data is sent, the error machine is interrupted by closing the serial port, and the next round of test is carried out. It can be seen that efficiency is lost in the waiting. The maximum waiting time of 48 meters is 2.8s according to the communication time of 0.05s per meter, and the conventional constant is 2000 imp/(kW.h), the pulse frequency is about 1Hz under rated voltage and current, errors are more than 2 in the waiting time, and the efficiency is reduced by about 50 percent.
The RS232 communication has the disadvantages of slightly large hardware overhead and complex circuit. The advantages are that: ① The electronic switch is utilized for switching, the point-to-point communication is good in reliability, the bit number can be directly identified from the port, and check codes and tokens are not needed, so that the length of instructions and data is shortened, and finally the time for occupying the serial port is shortened. ② The command of the upper computer is only transmitted to the appointed error machine, and no interruption is generated to other error machines; ③ The command of the upper computer can adopt a handshake signal with only one byte, and the serial port occupation time is extremely short. The upper computer receives the error data, and can adopt an interrupt mode, and can execute other tasks before receiving the error machine data. For the error machine, one byte of command data can be stored in the serial port receiving buffer area without loss, and once serial port interruption is opened, the handshake signal can be received. If new error data exist, the new error data are directly sent to an upper computer; if not, a one byte reply signal may be sent. There is no command loss. Therefore, in the electric energy meter calibrating device, the serial communication mode has obvious advantages due to the real-time characteristic and the reliability requirement of the error test.
As a further improvement of the above scheme, the serial communication mode has the following problems in the multi-epitope system: ① The upper computer has certain blindness when applying for 'reading' error machine error data. Because the upper computer may have queried 3, 4 or more times, but only once, during the period that the error engine generates a new error data. Thus, the working time of the upper computer is wasted; the error machine is disturbed by multiple invalid interrupts, so that the accuracy of error testing is affected. ② In devices such as devices above 48 epitopes, the query mode of the upper computer is that the data is looped from 1 to 48 epitopes in turn, and the occurrence of error data is uncertain and is not generated from 1 to 48 epitopes in turn, so that the timeliness of reading the error data is not yet achieved.
Disclosure of Invention
In order to solve the technical problem of low error data transmission efficiency of the existing electric energy meter calibrating device, the invention provides a transmission system and a transmission method of error data of the electric energy meter calibrating device, and the specific scheme is as follows:
The utility model provides a transmission system of electric energy meter calibrating installation error data, includes a plurality of error machines on host computer, the electric energy meter calibrating installation, the I/O port of error machine is connected with the extension I/O port of host computer.
Specifically, the extended I/O port of the upper computer is connected with the corresponding I/O port of the corresponding error machine through RS232 or RS 485.
The method for using the transmission system of the error data of the electric energy meter calibrating device comprises the following steps:
s1, adding a connecting line between an I/O port of an error machine and an expansion I/O port of an upper computer as hardware zone bits, and setting the initial states of all the hardware zone bits to be high by the upper computer;
s2, determining the sequence of inquiring all error machines by the upper computer;
And S3, judging whether the error machine generates new error data, wherein when the error machine generates the new error data, the upper computer is used for enabling the hardware mark position to be low, and when the error machine is used for transmitting the error data, the upper computer is used for enabling the hardware mark position to be high.
Specifically, step S2 specifically includes:
S21, the upper computer queries the sequence of the error machine, and the initial priority is the same as the epitope;
S22, entering a step S3, wherein after the error machine generates error data and the upper computer reads the epitope data, the epitope priority is reduced to the lowest, the rest epitope priorities are improved by 1 level, and when the error data is not generated, the corresponding epitope priority is unchanged; the upper computer queries the errors of all the epitopes and repeats step S22.
The invention has the beneficial effects that:
(1) The upper computer queries the error data without querying the error machine through a serial port, only by expanding an I/O port, queries corresponding hardware flag bits, and reads the error data from the error machine only when the hardware flag bits are low.
(2) The method ensures that each communication between the upper computer and the error machine is effective, can obtain expected data, and avoids blind and repeated 'disturbing' of the error machine by a common serial communication mode, so that the error machine is always in a 'quiet' working state.
(3) In the step S2 of the method, the data of the error machines are read by adopting an bubbling sequencing method, which is a fuzzy control mode, and the fuzzy control mode is completely matched with the time law of the occurrence of the data of each error machine, so that the detection process can be completed in the shortest time, and the high-efficiency transmission of the error data is achieved.
(4) The electric energy meter error test is actually the comparison and conversion of the measured electric energy meter pulse and the standard electric energy meter pulse. Generally, in setting N pulse time intervals of the measured meter, the counter performs accumulated calculation on the standard meter pulse and transmits error data to the upper computer and the display buffer area. The real-time detection system is characterized in that a task is completed by a singlechip, and the singlechip is required to be interrupted by a related serial port when accumulating standard meter pulses and measured meter pulses, calculating error values and transmitting the error data to an upper computer and a display buffer in order to ensure the accuracy of error data and the reliability of working states. After generating the error data, the error data must be sent out within a certain time, otherwise, the error buffer area is covered by the updated error data. The high-efficiency transmission method for error data of the electric energy meter calibrating device does not receive serial port interruption in the detection process, and the error data is quickly transmitted to the upper computer when new error data exists, so that the high-efficiency transmission method is a high-efficiency and reliable data transmission method, and the requirements of real-time performance, reliability and rapidity of error data transmission in the electric energy meter calibrating device are met. The data transmission rate is quickened, and the reliability of the system is improved.
Drawings
Fig. 1 is a block diagram of hardware communication.
FIG. 2 is a flow chart of an eight bit table system bubble ordering method.
Detailed Description
As shown in FIG. 1, the transmission system of error data of the electric energy meter calibrating device comprises an upper computer and a plurality of error machines on the electric energy meter calibrating device, wherein I/O ports of the error machines are connected with expansion I/O ports of the upper computer. At this time, the upper computer queries the error data without querying the error machine through the serial port, and only the corresponding hardware flag bit is queried through expanding the I/O port, and the error data is read by the error machine only when the hardware flag bit is low. The structure ensures that each communication between the upper computer and the error machine is effective, expected data can be obtained, and the blind repeated 'disturbance' of the error machine by a common serial port communication mode is avoided, so that the error machine is always in a 'quiet' working state.
Optimally, the expansion I/O port of the upper computer is connected with the corresponding I/O port of the corresponding error machine through RS232 or RS 485. Thus, the advantages of the traditional RS232 or RS485 can be utilized to realize the data transmission.
The method for using the transmission system of the error data of the electric energy meter calibrating device comprises the following steps:
s1, adding a connecting line between an I/O port of an error machine and an expansion I/O port of an upper computer as hardware zone bits, and setting the initial states of all the hardware zone bits to be high by the upper computer;
s2, determining the sequence of inquiring all error machines by the upper computer;
And S3, judging whether the error machine generates new error data, wherein when the error machine generates the new error data, the upper computer is used for enabling the hardware mark position to be low, and when the error machine is used for transmitting the error data, the upper computer is used for enabling the hardware mark position to be high.
The step S2 specifically comprises the following steps:
S21, the upper computer queries the sequence of the error machine, and the initial priority is the same as the epitope;
S22, entering a step S3, wherein after the error machine generates error data and the upper computer reads the epitope data, the epitope priority is reduced to the lowest, the rest epitope priorities are improved by 1 level, and when the error data is not generated, the corresponding epitope priority is unchanged; the upper computer queries the errors of all the epitopes and repeats step S22.
As can be seen from fig. 2: ① In the first round of queries, the query priority is the same as the epitope. The method comprises the steps that epitopes 3 and 7 have no error data, and in the second round of inquiry priority, the epitopes 3 and 7 are sequentially lifted to 1 and 2, and the epitopes 1,2,4, 5, 6 and 8 are sequentially lowered to 3-8; ② In the second round of inquiry, the epitopes 5 and 8 have no error data, and in the third round of inquiry priority, the epitopes 5 and 8 are sequentially lifted to 1 and 2, and the epitopes 1,2, 3,4, 6 and 7 are sequentially lowered to 3-8. It can be seen that query priorities are most reasonably assigned. The error machine data is read regularly by adopting the bubbling sequencing method, which is a fuzzy control mode and completely coincides with the time law of the occurrence of the data of each error machine, so that the detection process can be completed in the shortest time, and the high-efficiency transmission of the error data is achieved.
The foregoing is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art, who is within the scope of the present invention, should make equivalent substitutions or modifications according to the technical scheme of the present invention and the inventive concept thereof, and should be covered by the scope of the present invention.
Claims (1)
1. The method is characterized in that the method is applied to a transmission system of error data of the electric energy meter calibrating device, the transmission system comprises an upper computer and a plurality of error machines on the electric energy meter calibrating device, and I/O ports of the error machines are connected with expansion I/O ports of the upper computer;
the expansion I/O port of the upper computer is connected with the corresponding I/O port of the corresponding error machine through RS232 or RS 485;
the method comprises the steps of:
s1, adding a connecting line between an I/O port of an error machine and an expansion I/O port of an upper computer as hardware zone bits, and setting the initial states of all the hardware zone bits to be high by the upper computer;
s2, determining the sequence of inquiring all error machines by the upper computer;
S3, judging whether the error machine generates new error data, when the error machine generates the new error data, enabling the upper computer to enable the hardware mark position to be low, and when the error machine transmits the error data, enabling the upper computer to enable the hardware mark position to be high;
the step S2 specifically comprises the following steps:
S21, the upper computer queries the sequence of the error machine, and the initial priority is the same as the epitope;
S22, entering a step S3, wherein after the error machine generates error data and the upper computer reads the epitope data, the epitope priority is reduced to the lowest, the rest epitope priorities are improved by 1 level, and when the error data is not generated, the corresponding epitope priority is unchanged; the upper computer queries the errors of all the epitopes and repeats step S22.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110692514.8A CN113484816B (en) | 2021-06-22 | 2021-06-22 | System and method for transmitting error data of electric energy meter calibrating device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110692514.8A CN113484816B (en) | 2021-06-22 | 2021-06-22 | System and method for transmitting error data of electric energy meter calibrating device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113484816A CN113484816A (en) | 2021-10-08 |
CN113484816B true CN113484816B (en) | 2024-09-20 |
Family
ID=77935792
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110692514.8A Active CN113484816B (en) | 2021-06-22 | 2021-06-22 | System and method for transmitting error data of electric energy meter calibrating device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113484816B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114754924A (en) * | 2022-04-29 | 2022-07-15 | 东风电驱动系统有限公司 | Processing method, device and equipment for sensor calibration interruption and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104101857A (en) * | 2014-07-01 | 2014-10-15 | 杭州电子科技大学 | FlexRay bus-based electric energy meter error detection system and method |
CN204116881U (en) * | 2014-10-11 | 2015-01-21 | 四川九洲电器集团有限责任公司 | There is the supervisory system of easily extensible I/O interface |
CN108762182A (en) * | 2018-05-02 | 2018-11-06 | 精技电子(南通)有限公司 | A kind of efficient communication control method in servo-drive system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
MXPA02009213A (en) * | 2000-03-21 | 2003-03-12 | Siemens Energy & Automat | A communication interface system, method and apparatus. |
CN100383544C (en) * | 2005-01-26 | 2008-04-23 | 华为技术有限公司 | Method and apparatus for real-time monitoring level signal |
CN100573184C (en) * | 2006-06-01 | 2009-12-23 | 上海安科瑞电气有限公司 | A kind of control method of electrical energy meter accuracy |
CN105426334B (en) * | 2015-12-25 | 2018-08-07 | 河海大学常州校区 | Parallel extensive usb expansion device and working method, system |
-
2021
- 2021-06-22 CN CN202110692514.8A patent/CN113484816B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104101857A (en) * | 2014-07-01 | 2014-10-15 | 杭州电子科技大学 | FlexRay bus-based electric energy meter error detection system and method |
CN204116881U (en) * | 2014-10-11 | 2015-01-21 | 四川九洲电器集团有限责任公司 | There is the supervisory system of easily extensible I/O interface |
CN108762182A (en) * | 2018-05-02 | 2018-11-06 | 精技电子(南通)有限公司 | A kind of efficient communication control method in servo-drive system |
Also Published As
Publication number | Publication date |
---|---|
CN113484816A (en) | 2021-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101699298B (en) | One-phase digital current/voltage measuring instrument and measuring method thereof | |
CN106131056B (en) | Industrial wireless adapter and working method thereof | |
CN113484816B (en) | System and method for transmitting error data of electric energy meter calibrating device | |
CN109100579B (en) | High-speed data acquisition system and method of three-phase unbalance monitoring device | |
CN101369142A (en) | Remote I/O data acquisition system and method based on embedded type platform | |
CN206271174U (en) | A kind of communication interface converter and the double engine control systems of M Bus | |
CN108924014A (en) | A kind of electric system 4G wireless module test device and test method | |
CN108490251B (en) | Satisfy digital electric energy metering device of 3/2 wiring | |
CN104330621A (en) | Electric appliance energy consumption tester | |
CN101916464A (en) | Zigbee technology-based access control management method and device | |
CN204402461U (en) | A kind of intelligent well sniffer | |
CN112379139A (en) | Alternating current-direct current hybrid universal intelligent electric meter | |
CN201867627U (en) | System based on CAN bus for detecting breakdown signals of numerical control machine tool | |
CN111766449A (en) | Short circuit impedance detection system and detection method | |
CN111223286A (en) | Meter BUS-based data acquisition device and method | |
CN213399965U (en) | Infrared intelligent network acquisition terminal | |
CN202077059U (en) | Bus bridge capable of changing PROFIBUS protocol to MODBUS protocol | |
CN106707892B (en) | Two speed resolver wiring automatic detection device and method suitable for photoelectric turntable | |
CN201247487Y (en) | Input device for multipath Weggen signal | |
CN201266121Y (en) | Distributed temperature collection apparatus | |
CN111707983B (en) | Electric energy meter constant test method, equipment, system and medium | |
CN208924262U (en) | A kind of electric system 4G wireless module test device | |
CN103970076A (en) | Large-volume deposit concrete cooling water intelligent control system | |
CN202904298U (en) | Remote measurement and control apparatus for oil pumping unit | |
CN109088620B (en) | PFM modulation circuit based on data control |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |