Method and system for early warning power failure of PLC (Programmable Logic Controller) of automatic control system of power plant and medium
By defining a multi-state heartbeat signal in the power plant PLC, the problem that the host computer cannot get a warning in time when the PLC is powered off is solved, and timely warning and response to PLC powered off is achieved, which improves the reliability and safety of the system.
Patent Information
- Application Number
- CN202510323943.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-20
AI Technical Summary
After the PLC in the existing power plant is powered off, the remote monitoring upper computer cannot be promptly informed and issued early warnings, resulting in production interruptions and economic losses.
By defining a heartbeat signal with multiple states in the PLC, the upper computer can collect and monitor the signal in real time, and issue an early warning when the PLC is powered off according to the state switching process.
It realizes the timely warning to the upper computer when the PLC is powered off, improves the response and safety of the power plant automation control system, and reduces production interruptions and economic losses.
Smart Images

Figure CN120178778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic control of power plants and is applied to the early warning process of programmable logic controllers (PLCs). Specifically, it relates to a method, system, and medium for early warning of PLC power failure in a power plant automation control system. Background Art
[0002] In the automatic control system of modern power plants, programmable logic controllers (PLCs) play a crucial role. As one of the core components of the control system, PLCs manage and monitor the operations of various devices by executing preset programs to ensure the safety, stability, and efficiency of the entire production process. However, despite the significant progress made in PLC technology, it still faces some challenges, especially when encountering power interruption problems.
[0003] Unstable power supply may cause the PLC to lose power, which may have a significant impact on the operation of the power plant. Once a power failure occurs, all devices that rely on the PLC for operation and monitoring will immediately stop working, which will not only directly lead to the stagnation of the production line but also indirectly affect the power quality and power generation efficiency of the power plant. In addition, since the PLC is usually responsible for processing a large amount of key data, such as program data, counter values, and timer status, without an effective power failure protection function, these important information may be permanently lost, further prolonging the system recovery time and increasing the maintenance cost.
[0004] In the current PLC design, although there is a certain degree of local alarm mechanism, such as indicating specific fault signals through status indicators or LEDs, these measures can only provide limited information prompts within a local range. With the wide application of the unmanned operation mode in power plants, this local-based fault alarm method often fails to meet the need to detect and solve problems in a timely manner. Notably, when the PLC loses its communication connection with the upper computer due to power failure, any locally generated fault signals cannot be recognized by the remote monitoring system, which greatly limits the possibility of quick response and may cause greater economic losses.
[0005] Therefore, to improve the reliability and maintenance efficiency of the power plant automation control system, there is an urgent need for a solution that enables the upper computer to receive and feedback early warning information in a timely manner even when the PLC loses power and quickly take corresponding measures to reduce potential losses. This is not only the key to improving the performance of the existing PLC system but also a necessary condition for promoting the development of the industrial automation field to a higher level. Summary of the Invention
[0006] Based on the current situation in the background art, the object of the present invention is to solve the problem that after a power failure of the PLC in an existing power plant, the remote monitoring host computer cannot obtain information and give an early warning. Therefore, an early warning method, system and medium for the power failure of the PLC in the power plant automation control system are proposed. The present invention takes constructing the PLC heartbeat signal as the core, enabling the host computer to realize the power failure early warning of the PLC based on this heartbeat signal, thus successfully solving the aforementioned problem. As a result, the operator can timely understand the situation at the power generation site and take corresponding measures.
[0007] The present invention adopts the following technical solutions to achieve the object:
[0008] An early warning method for the power failure of the PLC in the power plant automation control system, including: defining a heartbeat signal with multiple states in the PLC, and the multiple states of the heartbeat signal are switched according to a preset period; the host computer collects and monitors the heartbeat signal in real time, and based on the state switching process of the heartbeat signal, gives an early warning externally when the PLC loses power.
[0009] Specifically, in each preset period, the heartbeat signal sends its current state to the host computer; the sending method adopts a preset data packet or a preset state recognition signal. When the PLC loses power, the sending process of the heartbeat signal to the host computer stops, and the host computer's reception of the heartbeat signal stays at its previous state.
[0010] Preferably, the states of the heartbeat signal are determined by defining the format of the heartbeat signal. The format of the heartbeat signal includes "action" and "reset", corresponding to the action state and the reset state of the heartbeat signal.
[0011] Preferably, the duration of the preset period is 1 second; during the process of the host computer collecting and monitoring the heartbeat signal in real time, the host computer continuously receives the action state heartbeat signal and the reset state heartbeat signal output by the PLC in an alternating manner every 1 second, and thereby determines that the PLC is in a normal working state without power failure.
[0012] Further, a heartbeat alarm program is defined in the host computer, and the judgment logic of the heartbeat alarm program is as follows:
[0013] When the host computer collects and monitors the heartbeat signal in real time, if the duration of any state of the heartbeat signal received by the host computer reaches or exceeds the first preset threshold, the host computer determines that the PLC has lost power and gives an early warning externally.
[0014] Specifically, the states of the heartbeat signal include an action state and a reset state, and the two are switched according to the preset period; the duration of the preset period is less than the duration of the first preset threshold.
[0015] Preferably, the duration of the first preset threshold is 180 seconds; in the judgment logic of the heartbeat alarm program:
[0016] When the action state duration of the heartbeat signal received by the host computer reaches or exceeds 180 seconds, the host computer determines that the PLC has lost power and issues a warning externally;
[0017] When the restoration state duration of the heartbeat signal received by the host computer reaches or exceeds 180 seconds, the host computer determines that the PLC has lost power and issues a warning externally.
[0018] Preferably, a power failure warning processing program is also defined in the host computer; when the judgment logic is triggered due to the power failure of the PLC in the heartbeat alarm program, the alarm output point of the heartbeat alarm program sends the alarm information to the power failure warning processing program; after receiving the alarm information, the power failure warning processing program pops up an alarm window corresponding to the power failure of the PLC on the host computer display interface, records and stores the alarm information, and at the same time issues a warning externally and waits for the operator's response and processing.
[0019] The present invention also provides a computer system, including a memory, a processor, and a computer program stored on the memory, and the processor executes the computer program to implement the steps of the foregoing method for warning of PLC power failure in a power plant automation control system.
[0020] The present invention also provides a computer-readable storage medium, on which a computer program / instructions are stored, and when the computer program / instructions are executed by a processor, the steps of the foregoing method for warning of PLC power failure in a power plant automation control system are implemented.
[0021] In summary, due to the adoption of the present technical solution, the beneficial effects of the present invention are mainly reflected in that it significantly improves the response ability and safety of the power plant automation control system in the face of PLC power failure.
[0022] The present invention introduces a heartbeat mechanism to monitor the connection status between the host computer and the PLC in real time, and can effectively realize the instant capture and alarm of the PLC power failure signal. This mechanism not only ensures a rapid response in the event of a power failure, but also greatly reduces the risk of production interruption and corresponding economic losses caused by power interruption.
[0023] Specifically, the present invention ensures precise monitoring of the working state of the PLC by continuously collecting heartbeat signals and combining logical programs for judgment and analysis. Once an abnormality in the heartbeat signal is detected, it indicates that the PLC may have lost power. The system will immediately trigger the corresponding alarm output point, thereby sending a clear warning message to the host computer in the control room, and the host computer can then issue an external warning. This method greatly enhances the speed at which operators can identify problems and take corrective measures, thus effectively avoiding a series of chain reactions caused by the failure to promptly detect the power loss of the PLC, such as equipment shutdown and data loss.
[0024] In addition, the method of this solution of the present invention can be seamlessly integrated into the existing power plant automation control system without the need for large-scale modification or replacement of the existing hardware facilities. This enables the power plant to significantly improve the reliability and maintenance efficiency of the system without incurring excessive costs. Brief Description of the Drawings
[0025] Figure 1 is an example diagram of the overall process of the method of the present invention;
[0026] Figure 2 is a schematic diagram of the logical principle of the heartbeat alarm program in the method of the present invention. Detailed Description of the Embodiment
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Generally, the components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations.
[0028] Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the present invention claimed, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0029] Embodiment
[0030] A method for warning of power loss of a PLC in a power plant automation control system. A specific example of this method is presented in the Figure 1 process, which also covers the core points of this method. This embodiment is generally described herein as: defining a heartbeat signal with multiple states in the PLC, and the multiple states of this heartbeat signal are switched according to a preset period; the host computer collects and monitors this heartbeat signal in real time, and issues an external warning when the PLC loses power based on the state switching process of this heartbeat signal.
[0031] In this embodiment, a special heartbeat signal is defined inside the PLC. This heartbeat signal has multiple states, and these states automatically switch according to a preset time period. In this way, the working state of the PLC can be effectively monitored.
[0032] Specifically, the design of the heartbeat signal is the key to the entire early warning mechanism. Different states are assigned to the heartbeat signal, and these states can be switched within a set time interval. For example, the heartbeat signal can be in an active state at a certain moment and switch to a reset state at the next preset time point. Such a design is the key point to enhance the accuracy of PLC working state monitoring.
[0033] The host computer, as the monitoring center in the system, is responsible for real-time collecting and monitoring the heartbeat signal from the PLC. Once the PLC loses power, the heartbeat signal will no longer be able to continue its normal state switching process, and this will be immediately detected by the host computer. After the host computer identifies and determines that the heartbeat signal has stopped updating through its built-in program, it will trigger an external early warning to notify relevant operators to take corresponding measures to deal with possible problems.
[0034] This early warning method detects whether the PLC has lost power through a simple and effective way, thus ensuring the stable operation of the power system. In addition, by adjusting parameters such as the number of states of the heartbeat signal and the state transition period, the performance of the early warning system can be optimized according to the requirements of different application scenarios.
[0035] Embodiment 2
[0036] Based on Embodiment 1, this embodiment introduces the state definition of the heartbeat signal and its sending mechanism. To effectively monitor the state of the PLC, the heartbeat signal in this embodiment has multiple states, and these states switch according to a preset period. In particular, within each preset period, the heartbeat signal actively sends the state information it is currently in to the host computer. This process can be achieved through a preset data packet or a state recognition signal of a specific state, thus ensuring the accurate transmission of the state information.
[0037] In this embodiment, the heartbeat signal is designed to include two basic states: the active state and the reset state. These two states not only help to clearly distinguish whether the PLC is still in a normal working condition, but also can characterize the reliability and stability of the system through periodic state switching. Specifically, when the PLC is working normally, the heartbeat signal will automatically switch from one state to another at the end of each cycle. For example, if the heartbeat signal is in the active state at the start of the current cycle, it will switch to the reset state at the end of the cycle, and vice versa. In this way, by observing the state change of the heartbeat signal, the host computer can continuously confirm whether the PLC remains powered on and operates normally.
[0038] Once the PLC experiences a power failure, the heartbeat signal will no longer be able to continue its state switching process and stop transmitting new state information to the host computer. In this case, the heartbeat signal received by the host computer will stay in the last successfully received state and will not be updated. This indicates that the PLC may have lost power supply, thus triggering the subsequent early warning processing flow.
[0039] In this embodiment, by defining clear active state and reset state, the system's response ability to abnormal situations can be enhanced, ensuring the stability and security of the power plant automation control system.
[0040] Embodiment 3
[0041] Based on the above embodiment, this embodiment will explain the state switching period of the heartbeat signal, the host computer monitoring logic, and the early warning trigger conditions, etc.
[0042] In this embodiment, the state switching period of the heartbeat signal is set to 1 second. This means that under normal working conditions, the heartbeat signal will switch between the active state and the reset state once every second. For example, if the heartbeat signal is in the active state at the current moment, it will automatically switch to the reset state at the start of the next second-level cycle; and vice versa. This high-frequency state switching can quickly detect and trigger an early warning even if the PLC experiences a very short power failure anomaly when needed.
[0043] For the host computer, under normal circumstances, the host computer will continuously receive the heartbeat signal from the PLC that alternates between the active state and the reset state with a period of 1 second. In this way, the host computer can accurately determine whether the PLC is in a normal non-powered-off working state. The core design of this embodiment at the host computer is that once the heartbeat signal stops switching states according to the preset period, for example, the duration of a certain state (whether it is the active state or the reset state) reaches or exceeds the first preset threshold, it indicates that the PLC may have lost power supply. In this embodiment, the duration of the first preset threshold is greater than the preset period of the heartbeat signal.
[0044] To further enhance the reliability of the system, in this embodiment, a set of heartbeat alarm programs is defined in the host computer. For the PLC installed in the control cabinet, reference can be made to Figure 2 the logical schematic. In the heartbeat alarm program: If the duration of any state of the heartbeat signal reaches or exceeds the first preset threshold, the host computer determines that the PLC has lost power and issues a warning externally. It should be noted here that in this exemplary embodiment, the preset period of the heartbeat signal is 1 second, while the first preset threshold can be set to 180 seconds. The former is significantly shorter than the latter. This is a situation where the alarm logic is triggered only when it is clear that the heartbeat signal cannot continue its periodic state switching due to the power failure of the PLC. In actual applications, according to the working characteristics and environment of the corresponding PLC, the method of power failure warning for the PLC can be determined, and the size relationship between the preset period of the heartbeat signal and the first preset threshold can be controlled to obtain the best effect.
[0045] In the core of this embodiment: The two states of the heartbeat signal, the action state and the return state, are switched according to the above preset period. This not only effectively ensures the stability and predictability of the heartbeat signal, but also provides a clear benchmark for the host computer to accurately judge whether the behavior of the heartbeat signal meets the expectations. When the heartbeat signal fails to switch states as scheduled, it indicates that there may be an abnormal situation and immediate action needs to be taken.
[0046] Embodiment 4
[0047] Based on the above embodiments, this embodiment details the specific application details of the heartbeat alarm program and the related functions for subsequent power failure warning processing.
[0048] In this embodiment, the duration of the first preset threshold is determined to be 180 seconds. This means that if the duration of the action state or the return state of the heartbeat signal received by the host computer reaches or exceeds 180 seconds, the system will determine that the PLC has lost power and trigger the corresponding warning program. For example, when the heartbeat signal is in the action state and the duration of this state reaches 180 seconds, or when the heartbeat signal is in the return state and the duration of this state also reaches 180 seconds, the host computer will automatically identify this situation and start the warning program.
[0049] In this embodiment, choosing 180 seconds as the threshold can ensure that the system can respond to the PLC power failure event in a timely manner while avoiding false alarms caused by short network delays or instantaneous failures. If the threshold is set too short (for example, a few seconds), even a short communication interruption may trigger unnecessary warnings; while an overly long threshold may cause actual power failure situations to not be detected in a timely manner.
[0050] In addition, in some cases, the PLC will undergo an automatic restart or attempt to self-recover. The 180-second time frame provides an adequate time window for this type of recovery to determine that there is currently no power loss in the PLC; at the same time, it also ensures that if the PLC is indeed unable to resume normal operation due to power loss or other reasons, the system can issue an early warning in a timely manner. According to the actual operating experience of power plants, for the automated control systems in power plants, system equipment of different scales and configurations have different requirements for the sensitivity of power loss early warning. As an intermediate value, 180 seconds can find a good balance in most application scenarios, which can not only meet the high reliability requirements but also not be too sensitive to affect some normal operations.
[0051] In this embodiment, in order to effectively manage the power loss early warning, a dedicated power loss early warning processing program is also defined in the host computer. The main function of this program is to receive the alarm information from the heartbeat alarm program after the heartbeat alarm program triggers the alarm output point due to detecting the power loss of the PLC. Once the alarm information is received, the power loss early warning processing program will perform a series of predetermined operations. This includes but is not limited to: popping up a corresponding PLC power loss alarm window on the display interface of the host computer so that the operator can immediately notice this emergency; recording and storing the alarm information to provide data support for subsequent problem analysis and solution; at the same time, this program can also send out an early warning notice externally to ensure that all relevant parties can obtain the information and make responses in a timely manner.
[0052] In addition, the power loss early warning processing program can also include a mechanism to wait for the operator to make relevant response operations. In this case, after the operator views the detailed alarm information through the host computer interface, corresponding measures can be taken according to the specific situation and interact with the host computer. This design improves the user interactivity of the system, making it more flexible and efficient in dealing with emergencies. In the case of a power loss in the PLC, the impact on the operation of the entire power plant power system is minimized as much as possible to ensure the stability and safety of the system.
[0053] The method processes of the above embodiments can all be effectively applied to a computer system. This computer system can be directly used as a host computer or can also include a memory, a processor, and a computer program stored on the memory; when the processor executes the computer program, the steps of the above-mentioned early warning method for power loss of the PLC in the power plant automated control system can be realized. At the same time, the method processes of the above embodiments can all be stored in a computer-readable storage medium in the form of computer programs / instructions. When these computer programs / instructions are executed by the processor, the steps of the above-mentioned early warning method for power loss of the PLC in the power plant automated control system can be realized.
[0054] In summary, the present invention provides an efficient and reliable PLC power failure warning method for power plants, which helps to maintain the continuity and stability of production and reduce the economic losses caused by unexpected shutdowns.
Claims
1. A method for early warning of power failure of PLC in power plant automation control system, characterized by: A heartbeat signal with multiple states is defined in the PLC, and the multiple states of the heartbeat signal are switched according to a preset cycle; The host computer collects and monitors the heartbeat signal in real time, and issues an early warning when the PLC loses power based on the state switching process of the heartbeat signal.
2. The early warning method for power failure of the PLC of the power plant automation control system according to claim 1 is characterized by: In each preset cycle, the heartbeat signal sends its current state to the host computer; The sending method adopts the method of preset data packet or preset state identification signal. When the PLC loses power, the heartbeat signal stops sending to the host computer, and the host computer stays in its previous state of receiving the heartbeat signal.
3. The early warning method for power failure of the PLC of the power plant automation control system according to claim 2 is characterized by: The state of the heartbeat signal is determined by defining the format of the heartbeat signal, and the format of the heartbeat signal includes "action" and "reset", corresponding to the action state and the reset state of the heartbeat signal.
4. The early warning method for power failure of the PLC of the power plant automation control system according to claim 3 is characterized by: The duration of the preset cycle is 1 second; in the process of the upper computer collecting and monitoring the heartbeat signal in real time, the upper computer continuously receives the action state heartbeat signal and the reset state heartbeat signal output by the PLC, which alternate with 1 second, and thereby determines that the PLC is in a normal working state without power failure.
5. The early warning method for power failure of the PLC of the power plant automation control system according to claim 2 is characterized in that: The heartbeat alarm program is defined in the host computer. The judgment logic of the heartbeat alarm program is: When the host computer collects and monitors the heartbeat signal in real time, if the duration of any state of the heartbeat signal received by the host computer reaches or exceeds the first preset threshold, the host computer determines that the PLC has lost power and issues an early warning.
6. The early warning method for power failure of the PLC of the power plant automation control system according to claim 5 is characterized by: The state of the heartbeat signal includes an action state and a reset state, and the two are switched according to the preset period; the duration of the preset period is less than the duration of the first preset threshold.
7. The early warning method for power failure of the PLC of the power plant automation control system according to claim 6 is characterized in that: The duration of the first preset threshold is 180 seconds; in the judgment logic of the heartbeat alarm program: When the action state of the heartbeat signal received by the host computer lasts for 180 seconds or more, the host computer determines that the PLC has lost power and issues an early warning. When the duration of the reset state of the heartbeat signal received by the host computer reaches or exceeds 180 seconds, the host computer determines that the PLC has lost power and issues an early warning.
8. The early warning method for power failure of the PLC of the power plant automation control system according to claim 5 is characterized by: A power-off warning processing program is also defined in the host computer; when the heartbeat alarm program triggers the judgment logic due to PLC power off, the alarm output point of the heartbeat alarm program sends the alarm information to the power-off warning processing program; after the power-off warning processing program receives the alarm information, an alarm window corresponding to the PLC power off will pop up on the host computer display interface, the alarm information will be recorded and stored, and a warning will be issued to the outside at the same time, waiting for the operator's response.
9. A computer system comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the early warning method for power failure of the power plant automation control system PLC as described in any one of claims 1-8.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the early warning method for power failure of a power plant automation control system PLC as described in any one of claims 1 to 8 are implemented.