Meter and communication method thereof
By receiving and mapping the communication protocol between the monitoring device and the meter in the meter, the problem of inconsistent communication protocols of different equipment in the substation is solved, the communication is quickly established, fault processing and maintenance are simplified, and data collection is ensured. sex.
Patent Information
- Application Number
- CN202411251240.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-07
- Publication Date
- 2024-12-13
AI Technical Summary
In the substation, various models and styles of meter failures cause the monitoring device to fail to correctly collect voltage and current data, affecting judgment and signal actions. The meter models and styles of different equipment are different, and maintenance and fault handling are complicated, especially communication The agreement is inconsistent, resulting in difficulty in matching.
Provide a meter and its communication method. By receiving communication programs written by external devices, map the communication protocol between the monitoring device and the meter, match the data packet format and content, use the RS485 protocol to interact and broadcast data Packet and establish communication based on feedback.
It quickly matches the communication requirements of different devices with monitoring devices, simplifies the maintenance and fault handling of meters, and ensures the correctness and consistency of communication protocols.
Smart Images

Figure CN119135715A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power systems, and in particular to a meter and a communication method thereof. Background Art
[0002] The substation has AC and DC voltage meters and current meters of various models and styles, and the AC and DC voltage and current are collected by establishing communication with the meters through the monitoring devices built into the equipment.
[0003] Since the meter is a consumable item, once a fault occurs during operation, the monitoring device will not be able to collect the corresponding voltage and current, which will affect the judgment of the monitoring device and cause erroneous signal or malfunction. For example, if the battery ammeter of a DC device fails, once the floating charge current is too large, it will be judged as floating charge overcurrent and send a signal; for another example, if the battery ammeter of a DC device fails, once the equalization overcurrent times out and the voltage reduction output causes the charger to lock, it will cause the DC bus to lose voltage; for another example, if the voltage meter of an AC device fails, it may cause the backup automatic switch to malfunction and cause the AC bus to lose voltage.
[0004] At present, there are many equipment manufacturers in substations, and the models, styles and years of operation of the meters used in each device are different, which makes meter maintenance or troubleshooting more complicated, especially when replacing meters, different communication protocols need to be set to establish communication with the monitoring device.
[0005] Therefore, it is necessary to design a meter to match the communication requirements of the monitoring devices provided by different devices. Summary of the invention
[0006] The technical problem to be solved by the embodiments of the present invention is to provide a meter and a communication method thereof, which can match the communication requirements of monitoring devices provided by different equipment.
[0007] In order to solve the above technical problems, an embodiment of the present invention provides a communication method for a meter, the method comprising the following steps:
[0008] Receive a meter communication program written by an external device; wherein the meter communication program is an executable program based on establishing a communication protocol mapping between multiple monitoring devices and multiple meters; the communication protocol mapping is used to indicate that communication is allowed to be established between each monitoring device and its corresponding meter, which is set by the format and content of the data packets of each monitoring device and each meter;
[0009] Broadcast data packets, and after receiving data packets fed back by a monitoring device, establish communication with the monitoring device according to the meter communication procedure.
[0010] The data packet format of each monitoring device includes the lower machine address, command code, register address, number of data acquisitions and check code; the data packet format of each meter includes the local address, function code, data length, data and check code;
[0011] The communication protocol mapping is set based on whether the data base used by the local address in the meter data packet and the lower computer address in the monitoring device data packet are the same and the contents are consistent, and whether the data base used by the function code in the meter data packet and the command code in the monitoring device data packet are the same and the contents are consistent.
[0012] Among them, the communication protocol mapping is set when the local address in the data packet of a meter and the lower machine address in the data packet of a monitoring device use the same data base and the same content, and the function code in the data packet of the meter and the command code in the data packet of the monitoring device use the same data base and the same content, so as to allow communication to be established.
[0013] Wherein, the external device uses RS485 communication protocol for data exchange.
[0014] The embodiment of the present invention further provides a meter, including:
[0015] A program writing unit, used for receiving a meter communication program written by an external device; wherein the meter communication program is an executable program based on establishing a communication protocol mapping between a plurality of monitoring devices and a plurality of meters; the communication protocol mapping is used to indicate that communication is allowed to be established between each monitoring device and its corresponding meter, which is set by the format and content of the data packets of each monitoring device and each meter;
[0016] The communication establishing unit is used for broadcasting data packets and, after receiving a data packet fed back by a monitoring device, establishing communication with the monitoring device according to the meter communication procedure.
[0017] The data packet format of each monitoring device includes the lower machine address, command code, register address, number of data acquisitions and check code; the data packet format of each meter includes the local address, function code, data length, data and check code;
[0018] The communication protocol mapping is set based on whether the data base used by the local address in the meter data packet and the lower computer address in the monitoring device data packet are the same and the contents are consistent, and whether the data base used by the function code in the meter data packet and the command code in the monitoring device data packet are the same and the contents are consistent.
[0019] Among them, the communication protocol mapping is set when the local address in the data packet of a meter and the lower machine address in the data packet of a monitoring device use the same data base and the same content, and the function code in the data packet of the meter and the command code in the data packet of the monitoring device use the same data base and the same content, so as to allow communication to be established.
[0020] Wherein, the external device uses RS485 communication protocol for data exchange.
[0021] The implementation of the embodiments of the present invention has the following beneficial effects:
[0022] The present invention broadcasts data packets, and after receiving a data packet fed back by a monitoring device, executes a meter communication program written by an external device, realizes communication protocol mapping with the monitoring device that feeds back the data packet, so as to quickly establish communication with the monitoring device, thereby being able to match the communication requirements of the monitoring devices provided by different devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, without paying creative labor, other drawings obtained based on these drawings still belong to the scope of the present invention.
[0024] Figure 1 A flow chart of a communication method for a meter provided by an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of the system structure of a meter provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.
[0027] like Figure 1 As shown in the figure, a communication method of a meter is provided in an embodiment of the present invention, and the method comprises the following steps:
[0028] Step S1, receiving a meter communication program written by an external device; wherein the meter communication program is an executable program based on establishing a communication protocol mapping between multiple monitoring devices and multiple meters; the communication protocol mapping is used to indicate that communication is allowed to be established between each monitoring device and its corresponding meter, which is set by the format and content of the data packets of each monitoring device and each meter;
[0029] The specific process is that the external device (such as a computer) uses the RS485 communication protocol to exchange data to quickly write the meter communication program into the current meter; at this time, the meter communication program is an executable program that can establish a communication protocol mapping between multiple monitoring devices and multiple meters.
[0030] Since the data packet format of each monitoring device includes the lower machine address, command code, register address, number of data acquisitions and check code, and the data packet format of each meter includes the local address, function code, data length, data and check code, the communication protocol mapping can be set according to the format and content of the data packets of the monitoring device and the meter.
[0031] In one example, the communication protocol mapping is set based on whether the data base used by the local address in the meter data packet and the lower computer address in the monitoring device data packet are the same and the contents are consistent, and whether the data base used by the function code in the meter data packet and the command code in the monitoring device data packet are the same and the contents are consistent.
[0032] For example, if the local address in a meter's data packet and the lower machine address in a monitoring device's data packet use the same data base and have the same content, and the function code in the meter's data packet and the command code in the monitoring device's data packet use the same data base and have the same content, then the communication protocol mapping can be set to allow communication to be established;
[0033] For example, if the data base of the local address of the meter and the lower computer address of the monitoring device are different, the contents of the local address of the meter and the lower computer address of the monitoring device are inconsistent, the data base of the function code of the meter and the command code of the monitoring device are different, or the contents of the function code of the meter and the command code of the monitoring device are inconsistent, any of the following conditions will not be set.
[0034] Step S2, broadcasting a data packet, and after receiving a data packet fed back by a monitoring device, establishing communication with the monitoring device according to the meter communication procedure.
[0035] The specific process is as follows: first, a data packet is broadcast in the current meter so that each physically connected monitoring device can receive it; secondly, the monitoring device will parse the data packet broadcast by the current meter to determine whether to provide information feedback. If agreed, a corresponding data packet will be generated and fed back to the current meter; then, the current meter receives the data packet fed back by the monitoring device and parses it to extract the data base and content used by the local address in the current meter data packet, the data base and content used by the function code, and whether the data base and content used by the lower machine address in the monitoring device data packet are consistent, as well as the data base and content used by the command code; finally, the meter communication program is executed to make a judgment. If it passes, the communication protocol mapping between the monitoring device and the feedback data packet is implemented to quickly establish communication with the monitoring device.
[0036] It should be noted that the data packet broadcast by the current meter should be equipped with the local address and function code related content, and the data packet of the monitoring device should also be equipped with the lower machine address and command code of the downstream meter. In this way, after the current meter data packet is broadcast, the corresponding monitoring device will respond and feedback the data packet to the current meter.
[0037] The application scenario of a communication method for a meter provided in an embodiment of the present invention is further described as follows:
[0038] First, insert the USB port of the USB to 485 tool into the computer, and connect the two AB wires of the RS485 connector to the communication port AB of the current meter;
[0039] Secondly, based on the relevant data of the communication between multiple monitoring devices and their corresponding meters, the serial port software MXCOM V1.4.exe is opened on the computer to read and intercept the data packets between each monitoring device and its corresponding meter.
[0040] For example, 01 03 00 01 00 01D5 CA, this is the data packet sent from the monitoring device to the meter; among them, 01 is the lower computer address, 03 is the command code, 00 01 is the register address, 00 01 is the number of data to be taken, and D5 CA is the CRC check code;
[0041] 01 03 02 01F4 B8 53 This is the data packet sent by the meter to the monitoring device; among them, 01 is the local address, 03 is the function code, 02 is the data length, 01F4 is the data, and B8 53 is the CRC check code; at this time, 01F4=500 represents the current 5.00A.
[0042] Next, according to the relevant data of the communication between each monitoring device and its corresponding meter, a communication protocol mapping is set at the computer to indicate that each monitoring device and its corresponding meter are allowed to establish communication, and is stored in an executable meter communication program.
[0043] Finally, write the meter communication program into the current meter on the computer. Once the current meter is physically connected to the monitoring device, the current meter broadcasts the data packet first, and then the corresponding monitoring device feeds back the data packet. According to the meter communication program, the communication protocol mapping can be performed to establish communication between the two.
[0044] like Figure 2 As shown in the figure, a meter is provided in an embodiment of the present invention, including:
[0045] The program writing unit 110 is used to receive the meter communication program written by the external device; wherein the meter communication program is an executable program based on establishing a communication protocol mapping between multiple monitoring devices and multiple meters; the communication protocol mapping is used to indicate that communication is allowed to be established between each monitoring device and its corresponding meter, which is set by the format and content of the data packets of each monitoring device and each meter;
[0046] The communication establishing unit 120 is used to broadcast a data packet, and after receiving a data packet fed back by a monitoring device, establish communication with the monitoring device according to the meter communication program.
[0047] The data packet format of each monitoring device includes the lower machine address, command code, register address, number of data acquisitions and check code; the data packet format of each meter includes the local address, function code, data length, data and check code;
[0048] The communication protocol mapping is set based on whether the data base used by the local address in the meter data packet and the lower computer address in the monitoring device data packet are the same and the contents are consistent, and whether the data base used by the function code in the meter data packet and the command code in the monitoring device data packet are the same and the contents are consistent.
[0049] Among them, the communication protocol mapping is set when the local address in the data packet of a meter and the lower machine address in the data packet of a monitoring device use the same data base and the same content, and the function code in the data packet of the meter and the command code in the data packet of the monitoring device use the same data base and the same content, so as to allow communication to be established.
[0050] Wherein, the external device uses RS485 communication protocol for data exchange.
[0051] The implementation of the embodiments of the present invention has the following beneficial effects:
[0052] The present invention broadcasts data packets, and after receiving a data packet fed back by a monitoring device, executes a meter communication program written by an external device, realizes communication protocol mapping with the monitoring device that feeds back the data packet, so as to quickly establish communication with the monitoring device, thereby being able to match the communication requirements of the monitoring devices provided by different devices.
[0053] It is worth noting that in the above-mentioned device embodiment, the various device units included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the various functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0054] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as ROM / RAM, disk, CD-ROM, etc.
[0055] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A communication method for a meter, characterized in that: The method comprises the following steps: Receive a meter communication program written by an external device; wherein the meter communication program is an executable program based on establishing a communication protocol mapping between multiple monitoring devices and multiple meters; the communication protocol mapping is used to indicate that communication is allowed to be established between each monitoring device and its corresponding meter, which is set by the format and content of the data packets of each monitoring device and each meter; Broadcast data packets, and after receiving data packets fed back by a monitoring device, establish communication with the monitoring device according to the meter communication procedure.
2. The communication method of a meter as claimed in claim 1, characterized in that: The data packet format of each monitoring device includes the lower computer address, command code, register address, number of data acquisitions and check code; the data packet format of each meter includes the local address, function code, data length, data and check code; among them, The communication protocol mapping is set based on whether the data base used by the local address in the meter data packet and the lower computer address in the monitoring device data packet are the same and the contents are consistent, and whether the data base used by the function code in the meter data packet and the command code in the monitoring device data packet are the same and the contents are consistent.
3. The communication method of a meter as claimed in claim 2, characterized in that: The communication protocol mapping is set when the local address in a meter's data packet and the slave address in a monitoring device's data packet use the same data base and have the same content, and when the function code in the meter's data packet and the command code in the monitoring device's data packet use the same data base and have the same content, to allow communication to be established.
4. The communication method of a meter as claimed in claim 1, characterized in that: The external device uses RS485 communication protocol for data exchange.
5. A meter, characterized in that: include: A program writing unit, used for receiving a meter communication program written by an external device; wherein the meter communication program is an executable program based on establishing a communication protocol mapping between a plurality of monitoring devices and a plurality of meters; the communication protocol mapping is used to indicate that communication is allowed to be established between each monitoring device and its corresponding meter, which is set by the format and content of the data packets of each monitoring device and each meter; The communication establishing unit is used for broadcasting data packets and, after receiving a data packet fed back by a monitoring device, establishing communication with the monitoring device according to the meter communication procedure.
6. The meter according to claim 5, characterized in that The data packet format of each monitoring device includes the lower computer address, command code, register address, number of data acquisitions and check code; the data packet format of each meter includes the local address, function code, data length, data and check code; among them, The communication protocol mapping is set based on whether the data base used by the local address in the meter data packet and the lower computer address in the monitoring device data packet are the same and the contents are consistent, and whether the data base used by the function code in the meter data packet and the command code in the monitoring device data packet are the same and the contents are consistent.
7. The meter according to claim 6, characterized in that The communication protocol mapping is set when the local address in a meter's data packet and the slave address in a monitoring device's data packet use the same data base and have the same content, and when the function code in the meter's data packet and the command code in the monitoring device's data packet use the same data base and have the same content, to allow communication to be established.
8. The meter according to claim 5, characterized in that The external device uses RS485 communication protocol for data exchange.
