Multi-channel adaptive module starting method and electric energy meter
By implementing a multi-channel adaptable module startup method on the power meter, the complex problems of power meter communication module startup and management are solved, the compatibility and reliability between modules are improved, the design and development process is simplified, and the normal startup and communication of modules is ensured.
Patent Information
- Application Number
- CN202411623177.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-25
AI Technical Summary
The startup and management of the power meter communication module faces complex technical challenges, including hardware timing control, baud rate adaptation and module type identification, which may cause the communication module to be unable to start stably or the connection is unstable, affecting the normal operation of the entire power meter system.
A multi-channel adaptable module startup method is proposed. By starting the module according to the timing required by the hardware, it is determined whether the module is started successfully, and the communication function of each channel is enabled based on channel module plug-in and unplugging detection, and whether there is a heartbeat in the communication module on the channel, realizing module type identification and baud rate adaptation.
This method simplifies the module startup process, improves the compatibility and reliability between the communication module and the power meter, realizes intelligent management of multi-channel communication, reduces the difficulty of the communication design and development of the power meter module channel, and ensures that any communication module can be started and communicate normally after being connected.
Smart Images

Figure CN119697523A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of communication module startup, and in particular to a multi-channel adaptive module startup method and an electric energy meter. Background Art
[0002] At present, some electric energy meters on the market contain a single module communication channel, while others contain multiple module communication channels. The types of communication modules carried on the channels are inconsistent. Some channels also require that the communication module on a channel is replaceable, but there are differences in the startup requirements of different communication modules.
[0003] Assume that the module type carried on each channel of the energy meter is unknown before it leaves the factory, or the module needs to be replaced after the energy meter is installed on site. For example, when the energy meter leaves the factory, it is unknown whether it is connected to a PLC module or a 4G module. It is necessary to go to the site to decide which module to connect based on the communication environment. This requires changing the energy meter software or reconfiguring the energy meter parameters to adapt to the startup of different communication modules on different channels. If any communication module can start and communicate normally after being connected to the energy meter, this will reduce the difficulty of developing energy meter module channel communication.
[0004] However, the startup and management of the energy meter communication module faces a series of complex technical challenges. The primary issue is how to ensure that the communication module can be started stably and reliably and establish a connection with the energy meter. This involves multiple key links such as hardware timing control, baud rate adaptation, and module type identification. If these problems cannot be solved, the communication module may fail to start or the connection may be unstable, which in turn affects the normal operation of the entire energy meter system. Summary of the invention
[0005] The purpose of the present invention is to propose a multi-channel adaptive module startup method and an electric energy meter to solve the problem of communication module startup, and propose how to start the module according to the timing required by the hardware, how to judge whether the startup is successful after startup, and how to determine whether the communication function of each channel is enabled according to the channel priority. The proposed adaptive startup method is suitable for an electric energy meter containing multiple module communication channels and switchable module types on the channels.
[0006] The technical solution of the present invention is:
[0007] A multi-channel adaptive module startup method comprises the following steps:
[0008] S1. Start the module according to the timing required by the hardware;
[0009] S2, determine whether the module is started successfully;
[0010] S3, determining whether the communication function of each channel is enabled according to the channel module plug-in detection;
[0011] S4. Determine whether there is a heartbeat in the communication module on the channel.
[0012] Furthermore, the S1 specifically includes the following process:
[0013] S1.1. Reset the channel for preprocessing, pull down the power supply and clear the data generated during the operation of the corresponding communication module of each channel, including the module type of each channel;
[0014] S1.2, after the power is pulled down for a fixed time α, the baud rate is set to the initial baud rate, and the power is pulled up further, the S2 specifically includes the following process:
[0015] S2.1, the communication module uses different baud rates to send data frames requesting baud rates to poll the initial baud rate of the energy meter;
[0016] S2.2, check whether both parties in the channel communication receive reasonable data frames within a fixed time β;
[0017] If the electric energy meter receives a reasonable data frame, the module type is determined. If it is found that the baud rate is inconsistent with the negotiated baud rate, the communication module is notified to switch to the negotiated baud rate, and its own baud rate is configured as the negotiated baud rate. After receiving the notification, the communication module switches the module baud rate to the negotiated baud rate;
[0018] If the communication module does not receive a reasonable data frame within the fixed time β, the initial baud rate of the electric energy meter is repeatedly polled. If the electric energy meter does not receive a reasonable data frame, the step S1 needs to be repeated.
[0019] Furthermore, the S3 specifically includes the following process:
[0020] S3.1. If there is a pluggable communication module on the channel, determine whether the communication function of other channels is enabled based on the module plug-in test result;
[0021] S3.2, if the module is inserted, determine whether the module type on other channels is consistent with that on this channel. If they are consistent, clear the data generated during the operation of other channel modules including the module type, and close the communication function of other channels;
[0022] S3.3. If the module is removed, the communication function of the channel whose communication function is turned off is turned on.
[0023] Furthermore, the S4 specifically includes the following process: whether a reasonable data frame is received within a fixed time γ, if no reasonable data frame is received, it is necessary to repeat the S1, and if a reasonable data frame is received, the time counter is cleared to 0.
[0024] A multi-channel electric energy meter capable of adaptive module startup, using the method described, the electric energy meter comprises:
[0025] Start the module according to the timing: used to start the module according to the timing required by the hardware;
[0026] Start judgment module: used to complete the baud rate adaptation process with the module and confirm the channel module type;
[0027] Plug-in detection module: used to determine whether the communication function of each channel is enabled based on the plug-in detection of the channel module;
[0028] Heartbeat detection module: used to determine whether there is a heartbeat in the communication module on the channel.
[0029] Furthermore, the timing-based startup module includes:
[0030] The reset preprocessing unit is used to reset the channel preprocessing, pull down the power supply and clear the data generated during the operation of the corresponding communication module of each channel, including the module type of each channel;
[0031] The power control unit is used to set the baud rate to the initial baud rate and pull the power high after the power is pulled low for a fixed time α.
[0032] Furthermore, the startup judgment module includes:
[0033] A baud rate polling unit, used for controlling the communication module to use different baud rates to send data frames requesting baud rates to poll the initial baud rate of the electric energy meter;
[0034] The data frame receiving judgment unit is used to check whether both parties of the channel communication have received reasonable data frames within a fixed time β. If the electric energy meter receives a reasonable data frame, the module type can be determined. If it is found that the baud rate and the negotiated baud rate are inconsistent at this time, the communication module needs to be notified to switch to the negotiated baud rate, and its own baud rate is configured as the negotiated baud rate. After receiving the notification, the communication module switches the module baud rate to the negotiated baud rate. If the communication module does not receive a reasonable data frame within the fixed time β, it is necessary to repeatedly poll the initial baud rate of the electric energy meter. If the electric energy meter does not receive a reasonable data frame, it is necessary to repeat the module startup.
[0035] Furthermore, the electric energy meter has multiple communication channels, each of which can be configured with different types of communication modules, including WMBUS modules, 4G modules and PLC modules, to adapt to communication environments and requirements.
[0036] Beneficial effects of the present invention:
[0037] The startup process steps of the present invention are simple, and the module startup involved only requires that the hardware startup timings of each communication module be compatible with each other; whether the module is successfully started is determined by the interaction of the first frame data of the communication module and the electric energy meter, and the interaction baud rate is polled by the communication module, which can be compatible with different interaction baud rates and does not require the baud rate of the communication module; the present invention does not fix the type of communication module that each channel can carry, and when the communication module is plugged in and replaced, each communication channel can be adjusted accordingly according to the plug-in detection; this makes it possible for any communication module to start normally and communicate normally after being connected to the electric energy meter, which reduces the difficulty of designing and developing the channel communication of the electric energy meter module.
[0038] The invention discloses a method for starting and managing a communication module of an electric energy meter. The method starts the module according to the timing required by hardware, thereby realizing baud rate adaptation and module type identification between the communication module and the electric energy meter.
[0039] During the startup process, the present invention adopts steps such as reset preprocessing, power supply control and baud rate polling to ensure that the communication module can be successfully started and establish a stable connection with the electric energy meter.
[0040] In addition, the present invention also introduces plug-in detection and heartbeat detection mechanisms to monitor the status of the communication module in real time and dynamically adjust the communication function of each channel according to the detection results.
[0041] This method not only improves the compatibility and reliability between the electric energy meter and the communication module, but also realizes the intelligent management of multi-channel communication, effectively solving the problems of startup failure and communication interruption that the electric energy meter communication module may encounter in actual applications, thereby improving the stability and efficiency of the entire system.
[0042] Other features and advantages of this process will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The above and other objects, features and advantages of the present invention will become more apparent through a more detailed description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present invention.
[0044] Figure 1 It is a flow chart of the present invention.
[0045] Figure 2 It is a schematic diagram of how to judge whether the startup is successful in the present invention.
[0046] Figure 3 This is a flow chart of the present invention for determining whether the communication function of each channel is enabled according to the channel module plug-in detection. DETAILED DESCRIPTION
[0047] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0048] The present invention provides a multi-channel adaptive module startup method, comprising the following steps:
[0049] S1, start the module according to the timing required by the hardware;
[0050] S1.1: reset the channel for preprocessing, pull down the power supply and clear the data generated during the operation of the corresponding modules of each channel, including the module type of each channel;
[0051] S1.2: After the power is pulled down for a fixed time α, the baud rate is set to the initial baud rate and the power is pulled up;
[0052] S2, determine whether the module is started successfully;
[0053] S2.1: The communication module needs to use different baud rates to send data frames requesting baud rates to poll the initial baud rate of the energy meter;
[0054] S2.2: Check whether both parties in the channel communication receive reasonable data frames within a fixed time β;
[0055] If the electric energy meter receives a reasonable data frame, it determines the module type. If it finds that the baud rate is inconsistent with the negotiated baud rate, it needs to notify the module to switch to the negotiated baud rate and configure its own baud rate to the negotiated baud rate. After receiving the notification, the module switches the module baud rate to the negotiated baud rate.
[0056] If the module does not receive a reasonable data frame within the fixed time β, it is necessary to repeatedly poll the initial baud rate of the electric energy meter. If the electric energy meter does not receive a reasonable data frame, it is necessary to repeat S1;
[0057] S3, determining whether the communication function of each channel is enabled according to the channel module plug-in detection;
[0058] S3.1: If there is a pluggable communication module on the channel, determine whether the communication function of other channels is enabled based on the module plug-in detection result;
[0059] S3.2: If a module is inserted, it is necessary to determine whether the module type on other channels is consistent with that on this channel. If consistent, it is necessary to clear the data generated during the operation of the modules of other channels, including the module type, and close the communication function of other channels;
[0060] S3.3: If the module is removed, the communication function of the channel where the communication function is disabled needs to be enabled;
[0061] S4, determine whether there is a heartbeat in the communication module on the channel;
[0062] Whether a reasonable data frame is received within the fixed time γ, if no reasonable data frame is received, it is necessary to repeat S1, and if a reasonable data frame is received, the time counter is cleared to 0.
[0063] A multi-channel electric energy meter capable of adaptive module startup, the electric energy meter comprising:
[0064] Start the module according to the timing: start the module according to the timing required by the hardware;
[0065] Start the judgment module: complete the baud rate adaptation process with the module and confirm the channel module type;
[0066] Plug-in detection module: determines whether the communication function of each channel is enabled based on the plug-in detection of the channel module;
[0067] Heartbeat detection module: determines whether there is a heartbeat in the communication module on the channel.
[0068] Wherein, the timing-based startup module includes:
[0069] The reset preprocessing unit is used to reset the channel preprocessing, pull down the power supply and clear the data generated during the operation of the corresponding communication module of each channel, including the module type of each channel;
[0070] The power control unit is used to set the baud rate to the initial baud rate and pull the power high after the power is pulled low for a fixed time α.
[0071] Wherein, the startup judgment module includes:
[0072] A baud rate polling unit, used for controlling the communication module to use different baud rates to send data frames requesting baud rates to poll the initial baud rate of the electric energy meter;
[0073] The data frame receiving judgment unit is used to check whether both parties of the channel communication have received reasonable data frames within a fixed time β. If the electric energy meter receives a reasonable data frame, the module type can be determined. If it is found that the baud rate and the negotiated baud rate are inconsistent at this time, the communication module needs to be notified to switch to the negotiated baud rate, and its own baud rate is configured as the negotiated baud rate. After receiving the notification, the communication module switches the module baud rate to the negotiated baud rate. If the communication module does not receive a reasonable data frame within the fixed time β, it is necessary to repeatedly poll the initial baud rate of the electric energy meter. If the electric energy meter does not receive a reasonable data frame, it is necessary to repeat the module startup.
[0074] Example
[0075] In this embodiment, the electric energy meter has three channels, namely channel 1, channel 2, and channel 3. The communication module on channel 1 is pluggable. The initial baud rate of the three channels is 9600bps, and the negotiated baud rate is 19200bps. There are three types of communication modules, namely WMBUS module, 4G module, and PLC module. The data frame formats of these three modules are different. The electric energy meter can determine the module type by the received frame format;
[0076] S1, start the module according to the timing required by the hardware;
[0077] First, reset the three channels, pull down the power supply and clear the data generated during the operation of the corresponding modules of each channel, including the module type of each channel. At this time, the module type on each channel is unknown.
[0078] Secondly, because the startup timing of the WMBUS module, 4G module, and PLC module are compatible, the WMBUS and PLC modules only need to pull the power pin low for 4s and then pull it high to start. The 4G module needs to pull the power pin low for 8s and then keep the power pin high. The power-on signal pin is first pulled low for 2s and then pulled high for 2s. Therefore, after the compatible timing processing, the power pin is kept low for 8s and then pulled high, and the initial baud rate is configured to 9600bps, and then the power-on signal pin is first pulled low for 2s and then pulled high for 2s.
[0079] S2, determine whether the module is started successfully;
[0080] After the communication module is started, it needs to use different baud rates to send data frames with request baud rates within a fixed time β to poll the initial baud rate of the energy meter. Figure 2 As shown;
[0081] When the module is polling, the baud rate is polled from high to low, one baud rate is communicated once, and the waiting time for the energy meter to respond is 1s. If there is no response within 1s, the next baud rate is switched to communicate.
[0082] (1) If the fixed time β is 60s,
[0083] At 45 seconds, the energy meter receives a reasonable data frame on channel 1 and finds that the initial baud rate of 9600bps is inconsistent with the negotiated baud rate of 19200bps. It notifies the communication module on channel 1 that the baud rate needs to be switched to 19200bps and configures the baud rate of channel 1 to 19200bps. After receiving the notification, the module on channel 1 switches the module baud rate to 19200bps. Since a reasonable data frame is received, the module type of channel 1 is known, which is a 4G module.
[0084] At 23 seconds, the electric energy meter receives a reasonable frame on channel 2 and processes it in the same way as channel 1. The module type of channel 2 is a PLC module.
[0085] At 15 seconds, the electric energy meter receives a reasonable frame on channel 3 and processes it in the same way as channel 1. The module type of channel 3 is a WMBUS module.
[0086] (2) If the fixed time β is 30s,
[0087] Because the electric energy meter channel 1 cannot receive a reasonable data frame, the meter resets channel 1 according to S1.
[0088] The communication module on channel 1 is pluggable. After the module is removed and the PLC module is inserted, if the fixed time β is 30s, the electric energy meter receives a reasonable frame on channel 1 at 23s, and the module type of channel 1 is a PLC module; at 23s, the electric energy meter receives a reasonable frame on channel 2, and the processing is the same as channel 1, and the module type of channel 2 is a PLC module. At 15s, the electric energy meter receives a reasonable frame on channel 3, and the processing is the same as channel 1, and the module type of channel 3 is a WMBUS module;
[0089] S3, determine whether the communication function of each channel is enabled according to the channel module plug-in detection, such as Figure 3 As shown;
[0090] The module of channel 1 is plugged in and the module type identified is the same as that of channel 1, both of which are PLC modules. The communication function of channel 2 is turned off and the data of the module during operation of channel 2 is cleared. The module type of channel 2 is unknown.
[0091] Remove the PLC module on channel 1, turn on the communication function of channel 2, and repeat S1 for channel 2;
[0092] S4, determine whether there is a heartbeat in the communication module on the channel;
[0093] Disconnect the receiving pins of the three channels at the meter end. If each channel fails to receive a reasonable data frame from the communication module within 3 minutes, repeat S1 for the three channels to re-identify.
[0094] The above descriptions are merely embodiments of the present invention and are not intended to limit the scope of the present invention. Any equivalent structures and equivalent process conversions made using the contents of this specification and the drawings, or directly or indirectly applied in other related technical fields, are also included in the protection scope of this invention.
[0095] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.
Claims
1. A multi-channel adaptive module startup method, characterized in that The following steps are involved: S1. Start the module according to the timing required by the hardware; S2, determine whether the module is started successfully; S3, determining whether the communication function of each channel is enabled according to the channel module plug-in detection; S4. Determine whether there is a heartbeat in the communication module on the channel.
2. A multi-channel adaptive module startup method according to claim 1, characterized in that The S1 specifically The process includes: S1.
1. Reset the channel for preprocessing, pull down the power supply and clear the data generated during the operation of the corresponding communication module of each channel, including the module type of each channel; S1.
2. After the power is pulled low for a fixed time α, the baud rate is set to the initial baud rate and the power is pulled high.
3. A multi-channel adaptive module startup method according to claim 1, characterized in that The S2 specifically includes the following processes: S2.1, the communication module uses different baud rates to send data frames requesting baud rates to poll the initial baud rate of the energy meter; S2.2, check whether both parties in the channel communication receive reasonable data frames within a fixed time β; If the electric energy meter receives a reasonable data frame, the module type is determined. If it is found that the baud rate is inconsistent with the negotiated baud rate, the communication module is notified to switch to the negotiated baud rate, and its own baud rate is configured as the negotiated baud rate. After receiving the notification, the communication module switches the module baud rate to the negotiated baud rate; If the communication module does not receive a reasonable data frame within the fixed time β, the initial baud rate of the electric energy meter is repeatedly polled. If the electric energy meter does not receive a reasonable data frame, the step S1 needs to be repeated.
4. A multi-channel adaptive module startup method according to claim 1, characterized in that The S3 specifically includes the following processes: S3.
1. If there is a pluggable communication module on the channel, determine whether the communication function of other channels is enabled based on the module plug-in test result; S3.2, if the module is inserted, determine whether the module type on other channels is consistent with that on this channel. If they are consistent, clear the data generated during the operation of other channel modules including the module type, and close the communication function of other channels; S3.
3. If the module is removed, the communication function of the channel whose communication function is turned off is turned on.
5. A multi-channel adaptive module startup method according to claim 1, characterized in that The S4 specifically includes the following process: Whether a reasonable data frame is received within the fixed time γ, if no reasonable data frame is received, it is necessary to repeat S1, and if a reasonable data frame is received, the time counter is cleared to 0.
6. A multi-channel adaptive module-started electric energy meter, using the method according to any one of claims 1 to 5, characterized in that: The energy meter includes: Start the module according to the timing: used to start the module according to the timing required by the hardware; Start judgment module: used to complete the baud rate adaptation process with the module and confirm the channel module type; Plug-in detection module: used to determine whether the communication function of each channel is enabled based on the plug-in detection of the channel module; Heartbeat detection module: used to determine whether there is a heartbeat in the communication module on the channel.
7. A multi-channel adaptive module-started electric energy meter according to claim 6, characterized in that: The timing-based startup module includes: The reset preprocessing unit is used to reset the channel preprocessing, pull down the power supply and clear the data generated during the operation of the corresponding communication module of each channel, including the module type of each channel; The power control unit is used to set the baud rate to the initial baud rate and pull the power high after the power is pulled low for a fixed time α.
8. The multi-channel adaptive module-started electric energy meter according to claim 6, characterized in that: The startup judgment module includes: A baud rate polling unit, used for controlling the communication module to use different baud rates to send data frames requesting baud rates to poll the initial baud rate of the electric energy meter; The data frame receiving judgment unit is used to check whether both parties of the channel communication have received reasonable data frames within a fixed time β. If the electric energy meter receives a reasonable data frame, the module type can be determined. If it is found that the baud rate and the negotiated baud rate are inconsistent at this time, the communication module needs to be notified to switch to the negotiated baud rate, and its own baud rate is configured as the negotiated baud rate. After receiving the notification, the communication module switches the module baud rate to the negotiated baud rate. If the communication module does not receive a reasonable data frame within the fixed time β, it is necessary to repeatedly poll the initial baud rate of the electric energy meter. If the electric energy meter does not receive a reasonable data frame, it is necessary to repeat the module startup.
9. The multi-channel adaptive module-started electric energy meter according to claim 6, characterized in that: The electric energy meter has multiple communication channels, each of which can be configured with different types of communication modules, including WMBUS modules, 4G modules and PLC modules, to adapt to communication environments and requirements.