Alarm monitoring method based on PLC system and upper computer HMI system

By establishing an alarm cache area in the PLC system and using string variables, the problem of synchronous update of PLC and HMI programs is solved, efficient management of alarm information and optimization of CPU resources are achieved, and the work efficiency of engineers and the accuracy of real-time display of alarm information is improved.

CN120491545APending Publication Date: 2025-08-15安易行(常州)新能源科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510575320.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In automated systems, when modifying or adding alarm information under traditional methods, PLC and HMI programs need to be changed at the same time, resulting in large workloads and prone to problems such as not being updated in time.

Method used

By establishing an alarm buffer in the PLC system, storing the alarm information using string variables, and configuring it in the HMI system at one time, using logical judgment programs to optimize the transmission and display of alarm information to avoid repeated operations.

Benefits of technology

It reduces the workload of engineers, improves work efficiency, and optimizes the utilization of CPU resources to ensure the real-time display and accuracy of alarm information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491545A_ABST
    Figure CN120491545A_ABST
Patent Text Reader

Abstract

The invention discloses an alarm monitoring method based on a PLC (Programmable Logic Controller) system and an upper computer HMI (Human Machine Interface) system. The alarm monitoring method comprises the following steps: S1, establishing an alarm cache region; s2, the PLC continuously detects an alarm triggering condition; s3, the alarm information is stored in a cache region; s4, judging whether the alarm information C and the alarm information B are consistent in content or not; s5, checking whether the content of the alarm information C is within the range of the alarm cache region A or not; and S6, the HMI system records corresponding alarm information contents. According to the method, after the HMI is set at one time, only the PLC program needs to be edited when the alarm information needs to be changed, the setting of the HMI does not need to be edited, the workload of programmers is greatly reduced, and meanwhile the situation that the HMI cannot display an alarm due to the fact that the programmers do not update the HMI in time due to carelessness is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of PLC system control, and in particular relates to an alarm monitoring method based on a PLC system and a host computer HMI system. Background Art

[0002] A PLC is a digital computing and operating electronic system designed specifically for industrial applications. It uses a programmable memory to store instructions for performing logical operations, sequential control, timing, counting, and arithmetic operations. It controls various types of mechanical equipment or production processes through digital or analog input and output. The HMI is the medium for interaction and information exchange between the system and the user, converting information between its internal form and a form that humans can understand. A human-machine interface exists in all areas involving human-machine information exchange.

[0003] In automation systems, alarm information on the HMI is crucial, providing equipment operation guidance and fault diagnosis for maintenance personnel, operators, and engineers. During the automation system design process, engineers will continuously improve alarm information and prompt information. Regarding alarm information programming, the traditional method is for engineers to define alarm information in the PLC in the form of bit (BOOL) variables. That is, a one-bit variable represents an alarm. The address of this bit variable is then registered in the alarm information control of the HMI, and the corresponding alarm content is entered. Therefore, each modification or addition of an alarm requires changing the PLC and HMI programs at the same time, resulting in a significant time-consuming update. Moreover, if the engineer updates the PLC without updating the HMI program, the alarm information will not be displayed correctly, causing equipment abnormalities. Summary of the Invention

[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is as follows:

[0005] An alarm monitoring method based on a PLC system and a host computer HMI system includes the following steps:

[0006] S1: Create an alarm buffer: store several commonly used alarm messages, record them as alarm buffer A, and create a new string variable, record them as alarm message B;

[0007] S2: PLC continuous detection alarm trigger conditions:

[0008] When the alarm condition is triggered, it goes to the next step, otherwise the PLC continues to run;

[0009] S3: Store the alarm information in the buffer area: record the alarm information in the form of a string variable as alarm information C;

[0010] S4: Determine whether the alarm information C is consistent with the alarm information B:

[0011] When the information content is consistent, loop back to step S2;

[0012] When the information content is inconsistent, proceed to the next step;

[0013] S5: Check whether the content of alarm information C is within the range of alarm buffer area A:

[0014] When the alarm information C is within the range of the alarm buffer area A, the alarm information is sent to the HMI system and the next step S6 is directly executed;

[0015] When the alarm information C is not within the range of the alarm buffer area A, the alarm information C is added to the alarm buffer area A, and the content of the alarm information C is assigned to the alarm information B, and step S2 is repeated;

[0016] S6: HMI system records the corresponding alarm information content,

[0017] When the PLC does not send an alarm reset signal, the HMI system displays the alarm information C content;

[0018] When the PLC sends an alarm reset signal, the HMI system clears the displayed content and the alarm information B content at the same time.

[0019] Furthermore, the initial alarm information B in step S1 is empty text.

[0020] Furthermore, the communication methods between the PLC system and the HMI system include S7, Modbus, and TCP.

[0021] Furthermore, the HMI system may support a communication protocol for receiving character strings.

[0022] Furthermore, the PLC system is also connected to sensor elements and actuator elements.

[0023] Beneficial effects of the present invention:

[0024] 1. The present invention logically integrates PLC alarm information by writing a logic control program and uploads it to the host computer HMI in the form of a string. The host computer only needs to be configured once, and subsequent modifications or additions of alarms do not require any operation on the HMI, which greatly improves the work efficiency of engineers.

[0025] 2. The present invention optimizes the logic judgment program and detects in real time whether the alarm program is the same alarm error as the previous frame, thereby avoiding the same error from flowing into the subsequent logic and saving CPU computing resources.

[0026] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a logical schematic diagram of the present invention;

[0028] Figure 2 Schematic diagram of the system architecture of the present invention. DETAILED DESCRIPTION

[0029] The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more precise definition of the protection scope of the present invention. Specific embodiment:

[0031] like Figures 1 to 2 The alarm monitoring method shown is based on a PLC system and a host computer HMI system, comprising the following steps:

[0032] S1: Create an alarm buffer: Store several frequently used alarm messages, labeled Alarm Buffer A, and create a new string variable, labeled Alarm Message B. For example, in actual programming, you could define Alarm Buffer A as an array, name it ALM-Cfg.ALM-String, and set the array value to FALSE. Of course, you'll also need to customize the AddAlarmString function, whose alarm string interface is AddString, for later program calls. During initial execution, Alarm Message B in step S1 is initially empty text. To facilitate the following program, Alarm Message B is named AML_DB".StringOld.

[0033] S2: PLC continuous detection alarm trigger conditions:

[0034] When the alarm condition is triggered, it goes to the next step, otherwise the PLC continues to run;

[0035] S3: Store the alarm information in the buffer area: record the alarm information in the form of a string variable as alarm information C; here, alarm information C needs to be defined as a string variable named AML_DB.StringNow.

[0036] S4: Determine whether the alarm information C is consistent with the alarm information B:

[0037] When the information content is consistent, loop back to step S2;

[0038] When the information content is inconsistent, proceed to the next step;

[0039] The main purpose here is to save CPU computing resources. Because the CPU performs a calculation once per frame, it will loop many times in a short period of time. This will cause the same alarm information to be output repeatedly. Therefore, it is necessary to determine whether it is the same alarm information. If it is the same alarm information, the loop will be restarted to avoid the same alarm flowing to the following program and causing multiple calculations, which wastes CPU resources. In other words, determine whether the contents of the variable "AML_DB".StringNow" in the program are consistent with the variable "AML_DB".StringOld".

[0040] S5: Check whether the content of alarm information C is within the range of alarm buffer area A: that is, check whether there is a variable with the same content as "AML_DB".StringNow in the alarm buffer area "ALM_Cfg".ALM_String array.

[0041] When alarm information C is within the range of alarm buffer area A, the alarm information is sent to the HMI system, and step S6 is directly executed. Communication methods between the PLC system and the HMI system include S7, Modbus, and TCP. The HMI system can support a communication protocol for receiving character strings. Specifically, the communication method is selected based on the specific PLC system, and the selected protocol supports the communication protocol for receiving character strings. Of course, the PLC system is also connected to sensor components and actuator components.

[0042] If alarm information C is not within the range of alarm buffer area A, alarm information C is added to alarm buffer area A, and the content of alarm information C is assigned to alarm information B. Step S2 is then repeated; that is, the content of AML_DB.StringNow is stored in the ALM_Cfg.ALM_String array; and the corresponding ALM_Cfg.ALM_BOOL array value is set to TRUE.

[0043] S6: HMI system records the corresponding alarm information content,

[0044] When the PLC does not send an alarm reset signal, the HMI system displays the alarm information C content;

[0045] When the PLC sends an alarm reset signal, the HMI system clears the displayed content and the alarm information B content at the same time.

[0046] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An alarm monitoring method based on a PLC system and a host computer HMI system, characterized in that: The following steps are involved: S1: Create an alarm buffer: store several commonly used alarm messages, record them as alarm buffer A, and create a new string variable, record them as alarm message B; S2: PLC continuous detection alarm trigger conditions: When the alarm condition is triggered, it goes to the next step, otherwise the PLC continues to run; S3: Store the alarm information in the buffer area: record the alarm information in the form of a string variable as alarm information C; S4: Determine whether the alarm information C is consistent with the alarm information B: When the information content is consistent, loop back to step S2; When the information content is inconsistent, proceed to the next step; S5: Check whether the content of alarm information C is within the range of alarm buffer area A: When the alarm information C is within the range of the alarm buffer area A, the alarm information is sent to the HMI system and the next step S6 is directly executed; When the alarm information C is not within the range of the alarm buffer area A, the alarm information C is added to the alarm buffer area A, and the content of the alarm information C is assigned to the alarm information B, and step S2 is repeated; S6: HMI system records the corresponding alarm information content, When the PLC does not send an alarm reset signal, the HMI system displays the alarm information C content; When the PLC sends an alarm reset signal, the HMI system clears the displayed content and the alarm information B content at the same time.

2. The alarm monitoring method based on a PLC system and a host computer HMI system according to claim 1, characterized in that: In step S1, the initial alarm information B is empty text.

3. The alarm monitoring method based on a PLC system and a host computer HMI system according to claim 1, characterized in that: The communication methods between the PLC system and the HMI system include S7, Modbus, and TCP.

4. The alarm monitoring method based on a PLC system and a host computer HMI system according to claim 1, characterized in that: The HMI system may support a receive string communication protocol.

5. The alarm monitoring method based on a PLC system and a host computer HMI system according to claim 1, characterized in that: The PLC system is also connected to sensor components and actuator components.