Disclosure of Invention
In view of the above, there is a need to provide a power meter testing system, method, apparatus, computer device and storage medium based on graphical programming, which can improve the power meter testing efficiency.
An electric energy meter testing system based on graphical programming comprises: the device comprises electric energy meter test equipment, electric energy meter calibration equipment and a tested electric energy meter arranged on the electric energy meter calibration equipment; the electric energy meter calibration equipment and the tested electric energy meter are both connected with the electric energy meter test equipment;
the electric energy meter testing equipment is used for responding to a graphical testing instruction aiming at the tested electric energy meter and converting the graphical testing instruction into a target testing instruction matched with a communication protocol of the electric energy meter checking equipment; the graphical test instruction is generated by performing graphical programming on a test task of the tested electric energy meter;
the electric energy meter calibration equipment is used for receiving the target test instruction and configuring an electric power test environment of the tested electric energy meter according to the target test instruction;
the electric energy meter test equipment is also used for acquiring test result data output by the tested electric energy meter in the electric power test environment.
In one embodiment, the electric energy meter calibration device is further configured to determine a test voltage, a test current and a test power factor for the measured electric energy meter according to the target test instruction;
the electric energy meter calibration equipment is further used for outputting the test voltage, the test current and the test power factor to the tested electric energy meter.
In one embodiment, the electric energy meter calibration equipment and the tested electric energy meter are both in communication connection with the electric energy meter testing equipment through a communication interface; the communication interface comprises at least one of an RS232 serial port, an RS485 serial port, Bluetooth and Ethernet.
In one embodiment, the electric energy meter testing device is further configured to respond to a graphical calibration instruction for the tested electric energy meter and convert the graphical calibration instruction into a target calibration instruction matched with a communication protocol of the electric energy meter calibration device; the graphical calibration instruction is generated by performing graphical programming on a calibration task of the measured electric energy meter;
and the electric energy meter calibration equipment is used for receiving the target calibration instruction and calibrating the measured electric energy meter according to the target calibration instruction.
In one embodiment, the graphical calibration instructions include at least one of a meter date calibration instruction and a meter time calibration instruction.
A method for testing an electric energy meter based on graphical programming, the method comprising:
responding to a graphical test instruction aiming at the tested electric energy meter, and converting the graphical test instruction into a target test instruction matched with a communication protocol of the electric energy meter calibration device; the graphical test instruction is generated by performing graphical programming on a test task of the tested electric energy meter;
sending the target test instruction to the electric energy meter calibration device; the electric energy meter calibration device is used for configuring an electric power test environment of the tested electric energy meter according to the target test instruction after receiving the target test instruction;
and collecting test data output by the tested electric energy meter in the electric power test environment.
In one embodiment, the acquiring test data output by the measured electric energy meter in the electric power test environment includes:
acquiring active power data output by the tested electric energy meter in the electric power test environment, and acquiring actual output power data of the electric energy meter calibration device;
and generating an electric energy meter test result aiming at the test task according to the difference between the active power data and the actual output power data, and using the electric energy meter test result as the test data.
An electric energy meter testing device based on graphical programming, the device comprising:
the response module is used for responding to a graphical test instruction aiming at the tested electric energy meter and converting the graphical test instruction into a target test instruction matched with a communication protocol of the electric energy meter calibration device; the graphical test instruction is generated by performing graphical programming on a test task of the tested electric energy meter;
the sending module is used for sending the target test instruction to the electric energy meter calibration device; the electric energy meter calibration device is used for configuring an electric power test environment of the tested electric energy meter according to the target test instruction after receiving the target test instruction;
and the acquisition module is used for acquiring the test data output by the tested electric energy meter in the electric power test environment.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The electric energy meter testing system based on the graphical programming comprises electric energy meter testing equipment, electric energy meter checking equipment and a tested electric energy meter arranged on the electric energy meter checking equipment; the electric energy meter calibration equipment and the tested electric energy meter are both connected with electric energy meter testing equipment; responding to a graphical test instruction aiming at the tested electric energy meter through electric energy meter test equipment, and converting the graphical test instruction into a target test instruction matched with a communication protocol of electric energy meter calibration equipment; the graphical test instruction is generated by carrying out graphical programming on a test task of the tested electric energy meter; then, receiving a target test instruction through the electric energy meter calibration equipment, and configuring an electric power test environment of the tested electric energy meter according to the target test instruction; finally, collecting test result data output by the tested electric energy meter in the electric power test environment through electric energy meter test equipment; therefore, a user only needs to input an easily-edited and easily-understood graphical test instruction into the electric energy meter test equipment, the electric energy meter test equipment converts the graphical test instruction into a target test instruction matched with a communication protocol of the electric energy meter calibration equipment, the electric energy meter calibration equipment can configure a corresponding electric power test environment for the tested electric energy meter based on the target test instruction, test data output by the tested electric energy meter in the electric power test environment is collected through the electric power test environment, complexity in the electric energy meter test process is reduced, the test period of the electric energy meter is shortened, and test efficiency of the electric energy meter is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the description of the present application, it is to be understood that the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the description of the present application, it will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. In contrast, when an element is referred to as being "directly connected" to another element, there are no intervening elements present.
To facilitate understanding of those skilled in the art, fig. 1 provides a block diagram of a power meter testing system based on graphical programming; the electric energy meter test system based on graphical programming comprises: the electric energy meter testing device 110, the electric energy meter checking device 130 and the tested electric energy meter 120 installed on the electric energy meter checking device; the electric energy meter calibration equipment and the tested electric energy meter are connected with the electric energy meter testing equipment. In practical application, the tested electric energy meter is electrically connected with the electric energy meter calibration equipment.
The electric energy meter testing equipment is used for responding to the graphical testing instruction aiming at the tested electric energy meter and converting the graphical testing instruction into a target testing instruction matched with the communication protocol of the electric energy meter checking equipment. In practical application, the electric energy meter testing equipment can also be named as an electric energy meter testing device.
The graphical test instruction is generated by performing graphical programming on a test task of the tested electric energy meter.
In specific implementation, when a user needs to test the tested electric energy meter, the user can input a graphical test instruction for the tested electric energy meter through the electric energy meter test equipment. Specifically, a user may input graphical test instructions for the electrical energy meter under test through graphical programming software installed on the electrical energy meter testing device, for example, Scratch software. In practical application, the control interface for editing, running and stopping the graphical program can be provided through Scratch software.
After the electric energy meter test equipment receives the graphical test instruction, the electric energy meter test equipment responds to the graphical test instruction aiming at the tested electric energy meter and converts the graphical test instruction into a target test instruction matched with a communication protocol of the electric energy meter calibration equipment. Specifically, the electric energy meter testing equipment can convert a graphical testing instruction based on a Scratch communication protocol received by the electric energy meter testing equipment into a target testing instruction matched with communication protocols of the electric energy meter checking equipment and the tested electric energy meter through protocol conversion service software installed on the electric energy meter testing equipment. In practical application, the graphical programming software and the protocol conversion service software adopt HTTP Get requests to realize mutual communication. Wherein the graphical programming software acts as a web server. The graphical programming software sends the data of the graphical test instruction to the protocol conversion service software, and then the protocol conversion service software receives the data and converts the graphical test instruction into a target test instruction matched with the communication protocol of the electric energy meter calibration equipment and the tested electric energy meter.
To facilitate understanding by those skilled in the art, fig. 2 provides a system architecture diagram of a power meter testing system.
After the electric energy meter testing equipment determines the target testing instruction, the electric energy meter testing equipment can send the target testing instruction to the electric energy meter checking equipment through the communication interface. In practical application, the electric energy meter testing equipment can send the target testing instruction to the electric energy meter checking equipment through at least one communication interface of an RS232 serial port, an RS485 serial port, Bluetooth and Ethernet.
And the electric energy meter calibration equipment is used for receiving the target test instruction and configuring the electric power test environment of the tested electric energy meter according to the target test instruction. In practical application, the electric energy meter calibration equipment can also be named as an electric energy meter calibration device.
In specific implementation, after the electric energy meter calibration equipment receives a target test instruction sent by the electric energy meter test equipment, the electric energy meter calibration equipment configures an electric power test environment corresponding to the target test instruction for the tested electric energy meter based on the target test instruction, so that the tested electric energy meter runs in the electric power test environment.
The electric energy meter test equipment is also used for acquiring test result data output by the tested electric energy meter in an electric power test environment.
In the specific implementation, the electric energy meter testing equipment also collects test result data output by the tested electric energy meter in the electric power testing environment. Particularly, the electric energy meter test equipment can also collect test result data output by the tested electric energy meter in the electric power test environment through at least one communication interface of an RS232 serial port, an RS485 serial port, Bluetooth and Ethernet. In practical applications, the power testing environment may also be named as a power supply environment.
The electric energy meter testing system based on the graphical programming comprises electric energy meter testing equipment, electric energy meter checking equipment and a tested electric energy meter arranged on the electric energy meter checking equipment; the electric energy meter calibration equipment and the tested electric energy meter are both connected with electric energy meter testing equipment; responding to a graphical test instruction aiming at the tested electric energy meter through electric energy meter test equipment, and converting the graphical test instruction into a target test instruction matched with a communication protocol of electric energy meter calibration equipment; the graphical test instruction is generated by carrying out graphical programming on a test task of the tested electric energy meter; then, receiving a target test instruction through the electric energy meter calibration equipment, and configuring an electric power test environment of the tested electric energy meter according to the target test instruction; finally, collecting test result data output by the tested electric energy meter in the electric power test environment through electric energy meter test equipment; therefore, a user only needs to input an easily-edited and easily-understood graphical test instruction into the electric energy meter test equipment, the electric energy meter test equipment converts the graphical test instruction into a target test instruction matched with a communication protocol of the electric energy meter calibration equipment, the electric energy meter calibration equipment can configure a corresponding electric power test environment for the tested electric energy meter based on the target test instruction, test data output by the tested electric energy meter in the electric power test environment is collected through the electric power test environment, complexity in the electric energy meter test process is reduced, the test period of the electric energy meter is shortened, and test efficiency of the electric energy meter is improved.
In another embodiment, the electric energy meter calibration equipment is further used for determining a test voltage, a test current and a test power factor for the tested electric energy meter according to the target test instruction; the electric energy meter calibration equipment is also used for outputting test voltage, test current and test power factor to the tested electric energy meter.
In the specific implementation, the electric energy meter calibration equipment configures an electric power test environment corresponding to the target test instruction for the tested electric energy meter, and specifically includes: the electric energy meter calibration equipment can determine the test voltage, the test current and the test power factor applied to the tested electric energy meter according to the target test instruction. And then, the electric energy meter calibration equipment outputs test voltage, test current and test power factor to the tested electric energy meter, so that an electric power test environment corresponding to the target test instruction is configured for the tested electric energy meter, and the tested electric energy meter runs in the electric power test environment.
According to the technical scheme, the electric energy meter calibration equipment determines the test voltage, the test current and the test power factor applied to the tested electric energy meter according to the target test instruction, outputs the test voltage, the test current and the test power factor to the tested electric energy meter, and further configures an electric power test environment corresponding to the target test instruction for the tested electric energy meter so that the tested electric energy meter runs in the electric power test environment conforming to the test task.
In another embodiment, the electric energy meter testing device is further used for responding to a graphical calibration instruction for the tested electric energy meter and converting the graphical calibration instruction into a target calibration instruction matched with a communication protocol of the electric energy meter checking device; the graphical calibration instruction is generated by performing graphical programming on a calibration task of the measured electric energy meter; and the electric energy meter calibration equipment is used for receiving the target calibration instruction and calibrating the measured electric energy meter according to the target calibration instruction.
The graphical calibration instruction is generated by performing graphical programming on a calibration task of the measured electric energy meter.
The graphical calibration instruction is generated by performing graphical programming on a calibration task of the measured electric energy meter. In practical application, the graphical calibration instruction includes at least one of a date calibration instruction and a time calibration instruction of the electric energy meter.
In specific implementation, when a user needs to calibrate the tested electric energy meter, the user can input a graphical calibration instruction for the tested electric energy meter through the electric energy meter testing equipment. Specifically, a user may input a graphical calibration instruction for the electrical energy meter under test through graphical programming software installed on the electrical energy meter testing device.
After the electric energy meter test equipment receives the graphical calibration instruction, the electric energy meter test equipment responds to the graphical calibration instruction aiming at the tested electric energy meter and converts the graphical calibration instruction into a target calibration instruction matched with a communication protocol of the electric energy meter calibration equipment. Specifically, the electric energy meter testing equipment can convert a graphical calibration instruction based on a Scratch communication protocol received by the electric energy meter testing equipment into a target calibration instruction matched with communication protocols of the electric energy meter calibration equipment and the tested electric energy meter through protocol conversion service software installed on the electric energy meter testing equipment.
After the electric energy meter testing equipment determines the target calibration instruction, the electric energy meter testing equipment can send the target calibration instruction to the electric energy meter checking equipment through the communication interface. In practical application, the electric energy meter testing equipment can send the target calibration instruction to the electric energy meter checking equipment through at least one communication interface of an RS232 serial port, an RS485 serial port, Bluetooth and Ethernet.
After the electric energy meter calibration equipment receives the target calibration instruction, the electric energy meter to be tested is calibrated according to the target calibration instruction.
According to the technical scheme of the embodiment, the graphical calibration instruction for the tested electric energy meter is responded, and the graphical calibration instruction is converted into the target calibration instruction matched with the communication protocol of the electric energy meter calibration equipment; the graphical calibration instruction is generated by performing graphical programming on a calibration task of the measured electric energy meter; the target calibration instruction is received through the electric energy meter calibration equipment, and the electric energy meter to be tested is calibrated according to the target calibration instruction, so that a user can calibrate the electric energy meter to be tested conveniently and quickly.
In one embodiment, as shown in fig. 3, a power meter testing method based on graphical programming is provided, which is described by taking the power meter testing device 110 in fig. 1 as an example, and includes the following steps:
step S310, responding to a graphical test instruction aiming at the tested electric energy meter, and converting the graphical test instruction into a target test instruction matched with a communication protocol of the electric energy meter calibration device; the graphical test instruction is generated by performing graphical programming on a test task of the tested electric energy meter.
Step S320, sending a target test instruction to the electric energy meter calibration device; the electric energy meter calibration device is used for configuring the electric power test environment of the tested electric energy meter according to the target test instruction after receiving the target test instruction.
Step S330, collecting test data output by the tested electric energy meter in the electric power test environment.
It should be noted that, for the specific limitations of the above steps, reference may be made to the above specific limitations of the electric energy meter testing method based on graphical programming, and details are not repeated here.
According to the electric energy meter testing method based on graphical programming, a user only needs to input an easily edited and easily understood graphical testing instruction to the electric energy meter testing equipment, the electric energy meter testing equipment converts the graphical testing instruction into a target testing instruction matched with a communication protocol of the electric energy meter checking equipment, and therefore the electric energy meter checking equipment can configure a corresponding electric power testing environment for the tested electric energy meter based on the target testing instruction, and then collects testing data output by the tested electric energy meter in the electric power testing environment through the electric power testing environment, complexity in the electric energy meter testing process is reduced, testing period of the electric energy meter is shortened, and testing efficiency of the electric energy meter is improved.
In another embodiment, collecting test data output by a measured electric energy meter in an electric power test environment comprises: acquiring active power data output by the tested electric energy meter in an electric power test environment, and acquiring actual output power data of an electric energy meter calibration device; and generating an electric energy meter test result aiming at the test task according to the difference between the active power data and the actual output power data, and taking the electric energy meter test result as test data.
In the concrete implementation, the electric energy meter test equipment is gathering the in-process of the test data of being surveyed electric energy meter output in electric power test environment, specifically includes: the electric energy meter testing equipment acquires active power data output by the tested electric energy meter in an electric power testing environment, and acquires actual output power data of the electric energy meter checking device. Then, the electric energy meter testing device generates an electric energy meter testing result for the testing task according to the deviation between the active power data and the actual output power data, for example, a txt file (a text file) is generated as the testing data.
According to the technical scheme of the embodiment, active power data output by the tested electric energy meter in an electric power test environment are collected, actual output power data of an electric energy meter calibration device are obtained, and finally, an electric energy meter test result aiming at a test task is generated according to the difference between the active power data and the actual output power data and serves as test data; therefore, the user can know the actual performance of the measured electric energy meter based on the difference between the active power data and the actual output power data conveniently.
In another embodiment, as shown in fig. 4, a power meter testing method based on graphical programming is provided, which is described by taking the power meter testing device 110 in fig. 1 as an example, and includes the following steps:
step S410, responding to a graphical test instruction aiming at the tested electric energy meter, and converting the graphical test instruction into a target test instruction matched with a communication protocol of the electric energy meter calibration device; the graphical test instruction is generated by performing graphical programming on a test task of the tested electric energy meter.
Step S420, sending the target test instruction to the electric energy meter checking device; and the electric energy meter calibration device is used for configuring the electric power test environment of the tested electric energy meter according to the target test instruction after receiving the target test instruction.
Step S430, collecting active power data output by the tested electric energy meter in the electric power test environment, and obtaining actual output power data of the electric energy meter checking device.
Step S440, generating an electric energy meter test result for the test task according to a difference between the active power data and the actual output power data, as the test data.
It should be noted that, for the specific limitations of the above steps, reference may be made to the above specific limitations of the electric energy meter testing method based on graphical programming, and details are not repeated here.
It should be understood that although the steps in the flowcharts of fig. 3 and 4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 3 and 4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 5, there is provided a power meter testing apparatus based on graphical programming, including:
the response module 510 is configured to respond to a graphical test instruction for the tested electric energy meter, and convert the graphical test instruction into a target test instruction matched with a communication protocol of the electric energy meter calibration device; the graphical test instruction is generated by performing graphical programming on a test task of the tested electric energy meter;
a sending module 520, configured to send the target test instruction to the electric energy meter calibration apparatus; the electric energy meter calibration device is used for configuring an electric power test environment of the tested electric energy meter according to the target test instruction after receiving the target test instruction;
an acquiring module 530, configured to acquire test data output by the electrical energy meter under test in the electrical test environment.
In one embodiment, the collecting module 530 is specifically configured to collect active power data output by the electric energy meter under test in the electric power test environment, and obtain actual output power data of the electric energy meter verifying device; and generating an electric energy meter test result aiming at the test task according to the difference between the active power data and the actual output power data, and using the electric energy meter test result as the test data.
For specific limitations of the electric energy meter testing device based on the graphical programming, refer to the above limitations of the electric energy meter testing method based on the graphical programming, and no further description is provided herein. The modules in the electric energy meter testing device based on graphical programming can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a graphical programming based electric energy meter testing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, which includes a memory and a processor, the memory storing a computer program, which when executed by the processor, causes the processor to perform the steps of one of the above-mentioned power meter testing methods based on graphical programming. The steps of a method for testing an electric energy meter based on graphical programming herein may be steps of a method for testing an electric energy meter based on graphical programming in the above embodiments.
In one embodiment, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, causes the processor to perform the steps of one of the above-mentioned power meter testing methods based on graphical programming. The steps of a method for testing an electric energy meter based on graphical programming herein may be steps of a method for testing an electric energy meter based on graphical programming in the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.