Numerical value and script linkage method and system based on HMI
Through the numerical and script linkage method between HMI and PLC, the problem of data interaction and control logic fixed in the existing technology is solved, and the system's rapid response and automated control of on-site changes is realized, which improves intelligence and stability and reduces Human intervention risk.
Patent Information
- Application Number
- CN202411066704.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-06
AI Technical Summary
The data interaction and control logic between existing HMI and PLC is relatively fixed, and lacks flexibility and adaptability, which leads to the need for professionals to manually modify the interface and procedures when changing the operating status of the equipment or adjusting the control strategy, which is time-consuming and labor-intensive and error-prone.
Using the HMI-based numerical and script linkage method, by obtaining PLC controller data, the preset script is associated with the HMI element, and the script is triggered according to the threshold, the initial and cumulative linkage control interface update is realized, the update quality value is calculated to judge the interface reupdate, and the improvement is improved. System flexibility and adaptability.
It realizes the system's rapid response and accurate processing of on-site changes, automates data processing and control, improves the intelligence level and stability of the system, reduces the risks of human intervention and misoperation, and provides a more accurate basis for reflecting and maintaining equipment status. .
Smart Images

Figure CN118981183A_ABST
Abstract
Description
Technical Field
[0001] The invention proposes a method and system for linking numerical values and scripts based on HMI, and relates to the technical field of linking numerical values and scripts of HMI. Background Art
[0002] In the field of industrial automation, the integrated application of human-machine interface (HMI) and programmable logic controller (PLC) has become quite common. As a window for users to interact with automation equipment, HMI can display the operating status of the equipment in real time and provide operation and control functions. As the core controller of the automation system, PLC is responsible for receiving instructions from HMI and controlling the equipment according to the preset logic program. However, in the existing technology, the data interaction and control logic between HMI and PLC are often relatively fixed, lacking sufficient flexibility and adaptability. When the operating status of the equipment changes or the control strategy needs to be adjusted, professionals are usually required to manually modify the HMI interface and PLC program, which is time-consuming, labor-intensive, and error-prone. Summary of the invention
[0003] The present invention provides a method and system for linking values and scripts based on HMI, which is used to solve the problem that the data interaction and control logic between HMI and PLC in the existing technology are often relatively fixed, lacking sufficient flexibility and adaptability. When the operation status of the equipment changes or the control strategy needs to be adjusted, professionals are usually required to manually modify the HMI interface and PLC program, which is time-consuming, laborious, and prone to errors.
[0004] The present invention proposes a method and system for linking numerical values and scripts based on HMI, the method comprising:
[0005] S1. Obtain the data read by the HMI from the PLC controller, associate the preset scripts with the read data and the elements of the HMI respectively, perform a first-level trigger mark on the read data according to the preset operation threshold, trigger the preset script, and obtain the initial linkage control interface;
[0006] S2. Perform cumulative monitoring of changes in the read data, associate the acquired cumulative monitoring data with a preset script, perform cumulative trigger marking on the read data according to a preset cumulative threshold, cumulatively trigger the preset script, obtain a cumulative linkage control interface, and then obtain an update interface;
[0007] S3. Calculate the update quality value of the update interface and determine whether to re-update the update interface.
[0008] Furthermore, the S1 includes:
[0009] Connect the HMI to the PLC controller to obtain the linkage device group;
[0010] Reading the real-time data of the PLC controller through the linkage device group to obtain the read data;
[0011] Preprocessing the read data to obtain preprocessed read data;
[0012] Classifying the preprocessed read data according to data types to obtain multiple types of read data;
[0013] Associating the plurality of types of read data with preset scripts respectively to obtain data association;
[0014] Associate the preset scripts with the elements of the HMI respectively to obtain multiple element associations;
[0015] The plurality of types of read data are marked as first-level triggers by using preset operation thresholds, and the preset scripts are triggered.
[0016] Furthermore, the first-level triggering marking of the plurality of types of read data by using a preset operation threshold value to trigger a preset script includes:
[0017] Comparing the read data of each category with the operating threshold of its corresponding category in the preset operating threshold;
[0018] When the read data exceeds the operation threshold of the corresponding type in the preset operation threshold, a first-level trigger mark is performed on the read data;
[0019] When the read data does not exceed the operation threshold of the corresponding type in the preset operation threshold, the read data is not marked as a first-level trigger;
[0020] The preset script corresponding to the read data in the data association is triggered according to the first-level trigger mark, and the preset script executes the script according to the read data to form an initial linkage control interface.
[0021] Furthermore, triggering a preset script corresponding to the read data in the data association according to the first-level trigger annotation, and executing the preset script according to the read data to form an initial linkage control interface includes:
[0022] When the PLC controller recognizes a first-level trigger mark, the preset script corresponding to the first-level trigger mark is triggered;
[0023] The preset script executes the control of the corresponding element in the element association to obtain the control interface of the first-level trigger annotation of each type;
[0024] The control interfaces of multiple types of first-level trigger annotations form an initial linkage control interface.
[0025] Further, the S2 includes:
[0026] Perform cumulative monitoring of changes in each type of read data to obtain cumulative monitoring data;
[0027] Preprocessing the accumulated monitoring data to obtain accumulated monitoring data of multiple types of preprocessed reading data;
[0028] Associating the accumulated monitoring data of the plurality of types of read data with preset scripts respectively to obtain accumulated data associations;
[0029] Accumulative triggering is performed on the accumulated monitoring data of the plurality of types of read data through a preset cumulative threshold to obtain a cumulative triggering mark.
[0030] Furthermore, the cumulative monitoring data of the plurality of types of read data are cumulatively triggered by a preset cumulative threshold to obtain a cumulative trigger mark, including:
[0031] Compare the accumulated monitoring data of each type of read data with the accumulated threshold value of the corresponding type in the preset accumulated threshold value;
[0032] When the accumulated monitoring data of the read data exceeds the accumulated threshold of the corresponding category in the preset accumulated threshold, the accumulated monitoring data of the read data is cumulatively triggered and marked;
[0033] When the read data does not exceed the cumulative threshold of the corresponding category in the preset cumulative threshold, no cumulative trigger marking is performed on the read data;
[0034] According to the cumulative trigger mark, the preset script corresponding to the read data in the data association is cumulatively triggered, and the preset script executes the script according to the cumulative monitoring data of the read data to obtain a cumulative linkage control interface, and then obtain an update interface.
[0035] Further, the preset script corresponding to the read data in the data association is cumulatively triggered according to the cumulative trigger annotation, and the preset script executes the script according to the cumulative monitoring data of the read data to obtain the cumulative linkage control interface, and then obtain the update interface, including:
[0036] When the PLC controller recognizes the cumulative trigger mark, the preset script corresponding to the cumulative trigger mark is triggered;
[0037] The preset script executes the control of the corresponding element in the element association to obtain the control interface of the cumulative trigger annotation of each type;
[0038] The control interface of multiple types of cumulative trigger annotations forms a cumulative linkage control interface;
[0039] The initial linkage control interface is updated through the cumulative linkage control interface to obtain an updated interface.
[0040] Further, the S3 includes:
[0041] Calculating an update quality value of the update interface, and comparing the update quality value with a preset quality threshold;
[0042] When the update quality value is greater than a preset quality threshold, stopping updating the update interface;
[0043] When the update quality value is less than or equal to the preset quality threshold, the update interface is re-updated until the update quality value is greater than the preset quality threshold.
[0044] Furthermore, the update quality value includes:
[0045] The calculation formula of the update quality value is:
[0046]
[0047] Among them, f gz is the updated quality value, L is the type of read data, Δe dhi is the cumulative monitoring data of the i-th reading data after update, Δe yi is the cumulative threshold of the i-th type of read data, Δe dQi is the cumulative monitoring data of the i-th reading data before updating, c dhi For the i-th read data after update, c yi is the running threshold of the i-th type of read data, c dQi Read data for the i-th time before updating.
[0048] Furthermore, the system comprises:
[0049] The initial trigger linkage module is used to obtain the data read by the HMI from the PLC controller, associate the preset scripts with the read data and the elements of the HMI respectively, perform a first-level trigger mark on the read data according to the preset operation threshold, trigger the preset script, and obtain the initial linkage control interface;
[0050] The cumulative trigger linkage module is used to monitor the changes of the read data, associate the acquired cumulative monitoring data with the preset script, perform cumulative trigger marking on the read data according to the preset cumulative threshold, cumulatively trigger the preset script, obtain the cumulative linkage control interface, and then obtain the update interface;
[0051] The calculation update judgment module is used to calculate the update quality value of the update interface and judge whether to re-update the update interface.
[0052] The beneficial effects of the present invention are as follows: by reading the data of the device or sensor in real time through the PLC controller, and triggering the preset script based on these data, the system can reflect the status of the on-site equipment in real time and accurately perform the corresponding control operation. This ensures that the system responds quickly and accurately to changes on the site. By associating the preset script with the read data, the system realizes the automated data processing and control functions. At the same time, the system can perform trigger judgment according to the preset threshold value, and can perform the corresponding operation without manual intervention, thereby improving the intelligence level of the system. The HMI provides a visual linkage control interface to intuitively display the operating status and control situation of the system. Through the display and operation of elements on the interface, the operator can conveniently monitor and control the system, thereby improving work efficiency and convenience. The system not only pays attention to the changes in real-time data, but also processes the cumulative effect of the data through cumulative monitoring. This enables the system to more comprehensively reflect the long-term operation and cumulative effect of the equipment, and provides a more accurate basis for the maintenance and management of the equipment. The system ensures that the interface display and control logic are always in the best state by calculating the update quality value of the update interface and triggering the re-update process as needed. This dynamic update capability enables the system to adapt to different working environments and demand changes, thereby improving the flexibility and adaptability of the system. By triggering and executing preset scripts, the system can automatically handle abnormal situations and take corresponding measures, thereby improving the stability and reliability of the system. At the same time, the system can also make intelligent decisions and controls based on real-time data and cumulative effects, reducing the risk of human intervention and misoperation. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a schematic diagram of a method for linking numerical values and scripts based on HMI. DETAILED DESCRIPTION
[0054] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0055] In one embodiment of the present invention, a method and system for linking numerical values and scripts based on HMI is proposed, and the method includes:
[0056] S1. Obtain the data read by the HMI from the PLC controller, associate the preset scripts with the read data and the elements of the HMI respectively, perform a first-level trigger mark on the read data according to the preset operation threshold, trigger the preset script, and obtain the initial linkage control interface;
[0057] S2. Perform cumulative monitoring of changes in the read data, associate the acquired cumulative monitoring data with a preset script, perform cumulative trigger marking on the read data according to a preset cumulative threshold, cumulatively trigger the preset script, obtain a cumulative linkage control interface, and then obtain an update interface;
[0058] S3. Calculate the update quality value of the update interface and determine whether to re-update the update interface.
[0059] The working principle of the above technical solution is as follows: the PLC controller collects data from field devices or sensors in real time and sends these data to the HMI. The preset script (programming logic, function or algorithm) is associated with the read data and the elements of the HMI (such as buttons, indicator lights, etc.). The elements on the HMI interface will display or operate accordingly according to the data sent by the PLC. According to the preset operating threshold, the system judges the read data. If the data exceeds or falls below these thresholds, the system will trigger the preset script to perform a certain operation or change the display of the HMI interface. After the above processing, the HMI interface will be updated according to the read data and the triggered script to form an initial linkage control interface corresponding to the current system state. The system continuously monitors the data sent by the PLC and records the change amount or cumulative value of the data. In addition to the real-time operating threshold, the system also has a preset cumulative threshold. When the cumulative amount of data change reaches or exceeds these thresholds, the system will trigger the preset script again. Similar to the first-level trigger, but this time the trigger is based on the cumulative change of the data rather than the instantaneous value. This triggering method can be used to handle situations that require cumulative effects to judge, such as the total operating time and total output of the equipment. According to the cumulative trigger, the HMI interface will be updated again to form a cumulative linkage control interface that reflects the long-term status of the system or the cumulative effect. Finally, through the processing of S1 and S2, the system obtains an updated interface that combines the real-time status and cumulative effect. The system calculates the update quality value of the update interface according to certain algorithms or standards (such as data accuracy, interface response speed, user feedback, etc.). If the update quality value is lower than the preset standard, the system may think that the current interface needs further optimization or correction. At this time, the system will trigger the re-update process, which may be re-reading data, recalculation, or re-triggering scripts. If the system decides to re-update, it will return to the steps of S1 or S2 and regenerate the linkage control interface according to the new data or conditions. This process forms a closed-loop control system that can reflect the status of the system in real time and automatically adjust as needed.
[0060] The technical effect of the above technical solution is: by reading the data of the device or sensor in real time through the PLC controller, and triggering the preset script based on these data, the system can reflect the status of the on-site equipment in real time and accurately perform the corresponding control operations. This ensures that the system responds quickly and accurately to changes on the site. Through the association of the preset script with the read data, the system realizes the automated data processing and control functions. At the same time, the system can trigger judgment according to the preset threshold and perform the corresponding operation without manual intervention, which improves the intelligence level of the system. HMI provides a visual linkage control interface to intuitively display the operating status and control status of the system. Through the display and operation of elements on the interface, the operator can easily monitor and control the system, improving work efficiency and convenience. The system not only pays attention to the changes in real-time data, but also processes the cumulative effect of data through cumulative monitoring. This enables the system to more comprehensively reflect the long-term operation and cumulative effect of the equipment, providing a more accurate basis for the maintenance and management of the equipment. The system ensures that the interface display and control logic are always in the best state by calculating the update quality value of the update interface and triggering the re-update process as needed. This dynamic update capability enables the system to adapt to different working environments and changes in demand, improving the flexibility and adaptability of the system. By triggering and executing preset scripts, the system can automatically handle abnormal situations and take corresponding measures, thereby improving the stability and reliability of the system. At the same time, the system can also make intelligent decisions and controls based on real-time data and cumulative effects, reducing the risk of human intervention and misoperation.
[0061] In one embodiment of the present invention, the S1 includes:
[0062] Connect the HMI to the PLC controller to obtain the linkage device group;
[0063] Reading the real-time data of the PLC controller through the linkage device group to obtain the read data;
[0064] Preprocessing the read data to obtain preprocessed read data;
[0065] Classifying the preprocessed read data according to data types to obtain multiple types of read data;
[0066] Associating the plurality of types of read data with preset scripts respectively to obtain data association;
[0067] Associate the preset scripts with the elements of the HMI respectively to obtain multiple element associations;
[0068] The plurality of types of read data are marked as first-level triggers by using preset operation thresholds, and the preset scripts are triggered.
[0069] The working principle of the above technical solution is: a communication connection is established between the HMI (human-machine interface) and the PLC (programmable logic controller), usually using communication protocols such as Ethernet and serial ports to ensure that data can be transmitted accurately and quickly. After the communication connection between the HMI and the PLC is established, the system identifies and configures the linkage device group associated with the PLC. Through the communication interface of the PLC, the HMI system reads the real-time data of the PLC controller. These data include device status, sensor readings, control parameters, etc. The read PLC real-time data is preprocessed, including data cleaning (noise removal, outlier removal), data conversion (unit conversion, data type conversion), etc., to ensure the quality and accuracy of the data. The preprocessed data is classified according to its type, such as temperature data, pressure data, flow data, etc. Multiple types of read data are associated with preset scripts respectively. These scripts may contain specific logic, algorithms or control strategies for responding to data changes or triggering specific operations. The preset scripts are associated with elements on the HMI interface (such as buttons, indicator lights, text boxes, etc.). When the script is triggered, the corresponding elements on the HMI interface will be updated or operated. Multiple types of read data are judged according to preset operating thresholds. If the data exceeds or falls below these thresholds, the system will trigger the preset scripts associated with these data. The execution of these scripts will change the display of the HMI interface or perform corresponding control operations.
[0070] The technical effect of the above technical solution is: through the real-time communication between HMI and PLC, the system can quickly respond to changes in field equipment and update the HMI interface in time. This improves the real-time and responsiveness of the system. The use of preset scripts enables the system to automatically process data and control equipment, reducing the need for manual intervention. At the same time, through data classification and association, the system can intelligently respond to different data changes, improving the intelligence level of the system. Data preprocessing and classification improve the accuracy and reliability of data and reduce the impact of noise and outliers on the system. This helps to ensure that the system makes decisions and controls based on accurate data. The HMI interface enables operators to intuitively understand the status of the system and operate it through the association of elements with scripts. This improves the friendliness and ease of use of the interface and reduces the difficulty and error rate of operation. Through the association of preset scripts with HMI elements, the system can flexibly adapt to different control requirements. At the same time, the system can easily add new equipment, data and scripts to achieve functional expansion and upgrading. Through mechanisms such as data preprocessing and threshold judgment, the system can ensure correct response and control in abnormal situations, improving the safety and stability of the system. At the same time, the modular design of the system and good communication protocol selection also help to improve the stability of the system.
[0071] In one embodiment of the present invention, the step of performing a first-level trigger mark on the plurality of types of read data by using a preset operation threshold and triggering a preset script includes:
[0072] The read data of each category is compared with the operation threshold of the corresponding category in the preset operation threshold; the preset operation threshold includes operation thresholds of multiple categories.
[0073] When the read data exceeds the operation threshold of the corresponding type in the preset operation threshold, a first-level trigger mark is performed on the read data;
[0074] When the read data does not exceed the operation threshold of the corresponding type in the preset operation threshold, the read data is not marked as a first-level trigger;
[0075] The preset script corresponding to the read data in the data association is triggered according to the first-level trigger mark, and the preset script executes the script according to the read data to form an initial linkage control interface.
[0076] The working principle of the above technical solution is as follows: first, the cumulative monitoring data and the cumulative script execution data are integrated. The data is used to generate a cumulative linkage control interface. This interface includes various charts, indicator lights, buttons and other elements to display the cumulative operating status of the equipment, the execution status of the script, and any related warnings or notifications. Over time, the cumulative monitoring data and the cumulative script execution data will be continuously updated. The system will update the cumulative linkage control interface in real time based on these updated data to ensure that the operator can always see the latest information. The cumulative linkage control interface usually also contains some user interaction elements, such as buttons or sliders, allowing the operator to control or adjust the system as needed.
[0077] The technical effects of the above technical solution are as follows: the cumulative linkage control interface can fully display the cumulative operation status of the equipment and the execution status of the script, so that the operator can have a deeper understanding of the overall status of the system. The real-time update function of the interface ensures that the operator can always obtain the latest system information, so as to respond or adjust in time. The cumulative data and script execution data provide valuable decision-making support information for management, helping them to formulate more effective maintenance plans, optimize resource allocation, etc. By promptly discovering and handling abnormal situations, the cumulative linkage control interface helps to improve the stability and reliability of the system. The intuitive and easy-to-understand interface design and user interaction function enable operators to use the system more conveniently, thereby improving user experience and work efficiency.
[0078] In one embodiment of the present invention, triggering a preset script corresponding to the read data in the data association according to the first-level trigger annotation, and executing the preset script according to the read data to form an initial linkage control interface includes:
[0079] When the PLC controller recognizes a first-level trigger mark, the preset script corresponding to the first-level trigger mark is triggered;
[0080] The preset script executes the control of the corresponding element in the element association to obtain the control interface of the first-level trigger annotation of each type;
[0081] The control interfaces of multiple types of first-level trigger annotations form an initial linkage control interface.
[0082] The working principle of the above technical solution is as follows: the PLC controller continuously monitors the reading data of each sensor and determines whether the data exceeds the limit according to the preset operating threshold. When the reading data exceeds the preset threshold, the PLC generates a first-level trigger annotation. After identifying the first-level trigger annotation, the PLC controller will search for the preset script associated with the annotation. These scripts are pre-written programs used to process control logic under specific conditions. The preset script contains information about element associations, that is, which control elements (such as valves, motors, indicator lights, etc.) the script is associated with. When the script is triggered, the PLC will operate these associated control elements according to the instructions in the script, such as opening the valve, starting the motor, lighting the indicator light, etc. For each type of first-level trigger annotation, the PLC controller will generate a corresponding control interface. This interface shows the status and operation options of the control elements related to the annotation. When multiple types of first-level trigger annotations are identified and triggered, the PLC controller will generate multiple control interfaces. These interfaces are interconnected through a linkage mechanism to form an initial linkage control interface. This interface shows the operating status of the entire system and the available control options, allowing the operator to fully understand and control the system.
[0083] The technical effect of the above technical solution is that when the system is abnormal or requires intervention, the PLC controller can quickly identify the first-level trigger mark and trigger the corresponding preset script to achieve a quick response. This helps to avoid potential risks and losses. The initial linkage control interface integrates multiple control interfaces together, which improves work efficiency and ease of operation. The control interface graphically displays the operating status and control options of the system, allowing the operator to intuitively understand the system situation and operate it. Preset scripts and element associations can be configured and modified as needed to meet different control requirements. This makes the system highly flexible and scalable. Through the triggering of preset scripts and the generation of linkage control interfaces, the system can automatically take corresponding measures in abnormal situations, reducing the need for human intervention and the risk of misoperation, thereby improving the reliability and stability of the system.
[0084] In one embodiment of the present invention, S2 includes:
[0085] Perform cumulative monitoring of changes in each type of read data to obtain cumulative monitoring data;
[0086] Preprocessing the accumulated monitoring data to obtain accumulated monitoring data of multiple types of preprocessed reading data;
[0087] Associating the accumulated monitoring data of the plurality of types of read data with preset scripts respectively to obtain accumulated data associations;
[0088] Accumulative triggering is performed on the accumulated monitoring data of the plurality of types of read data through a preset cumulative threshold to obtain a cumulative triggering mark.
[0089] The working principle of the above technical solution is: the pre-processed read data is classified according to its type, ensuring that each type of data matches its corresponding preset operating threshold. The preset operating threshold includes multiple types, and each type of data has a corresponding threshold range. The system compares the read data of each type with the threshold of the corresponding type in the preset operating threshold. This step is to determine whether the read data meets the standard that requires triggering the corresponding operation. If the read data exceeds the operating threshold of the corresponding type in the preset operating threshold, the system will perform a first-level trigger mark on these data. The first-level trigger mark is an identifier or mark used to indicate that the system needs to execute the preset script related to these data. If the read data does not exceed the operating threshold of the corresponding type in the preset operating threshold, the system will not perform a first-level trigger mark on these data, which means that no preset script related to these data needs to be executed at present. According to the first-level trigger mark, the system will find the preset scripts corresponding to these marks in the data association and execute these scripts. The execution of these scripts will be based on the read data, and the display content of the HMI (human-machine interface) will be changed or updated as needed, thereby forming an initial linkage control interface. The linkage control interface displays the system status and control options based on real-time data.
[0090] The technical effect of the above technical solution is that by accurately comparing the read data with the preset operating threshold, the system can accurately determine when the preset script needs to be triggered, thereby achieving precise control. This helps to improve the control accuracy and efficiency of the system. When the read data exceeds the preset threshold, the system can immediately perform a first-level trigger mark and script execution to form an initial linkage control interface. This real-time response capability enables the system to respond quickly to changes on site and ensure the stability and security of the system. The preset operating threshold and script can be configured and modified as needed to adapt to different control requirements. At the same time, the system can easily add new data types, thresholds and scripts to achieve functional expansion and upgrading. The initial linkage control interface is generated based on real-time data and preset scripts, and intuitively displays the status and control options of the system. This enables the operator to easily understand the system situation and perform corresponding operations, thereby improving the user-friendliness of the system. Through precise data comparison and trigger judgment, the system can avoid unnecessary script execution and misoperation, thereby improving the reliability and stability of the system. At the same time, the modular design of the system and good communication protocol selection also help to improve the reliability of the system.
[0091] In one embodiment of the present invention, the cumulative monitoring data of the plurality of types of read data are cumulatively triggered by a preset cumulative threshold to obtain a cumulative trigger mark, including:
[0092] The accumulated monitoring data of each type of read data is compared with the accumulated threshold of the corresponding type in the preset accumulated threshold; the preset accumulated threshold includes accumulated thresholds of multiple accumulated stages of multiple types.
[0093] When the accumulated monitoring data of the read data exceeds the accumulated threshold of the corresponding category in the preset accumulated threshold, the accumulated monitoring data of the read data is cumulatively triggered and marked;
[0094] When the read data does not exceed the cumulative threshold of the corresponding category in the preset cumulative threshold, no cumulative trigger marking is performed on the read data;
[0095] According to the cumulative trigger mark, the preset script corresponding to the read data in the data association is cumulatively triggered, and the preset script executes the script according to the cumulative monitoring data of the read data to obtain a cumulative linkage control interface, and then obtain an update interface.
[0096] The working principle of the above technical solution is: collect the cumulative monitoring data of each type of read data. These cumulative data include the sum of data within a certain period of time. The system compares the cumulative monitoring data with the cumulative thresholds of multiple cumulative stages of the corresponding types in the preset cumulative threshold. The preset cumulative threshold may include multiple stages, each stage corresponding to a specific cumulative threshold. If the cumulative monitoring data of the read data exceeds the cumulative threshold of a certain cumulative stage of the corresponding type in the preset cumulative threshold, the system will perform a cumulative trigger mark on the cumulative monitoring data. This mark will serve as a condition for triggering the preset script. If the cumulative monitoring data of the read data does not exceed the cumulative threshold of any cumulative stage of the corresponding type in the preset cumulative threshold, the system will not perform a cumulative trigger mark on the read data. According to the cumulative trigger mark, the system will trigger the preset scripts corresponding to these marks. These scripts will be executed based on the cumulative monitoring data of the read data, and may include operations such as data analysis, control instruction sending, and alarm notification.
[0097] The technical effect of the above technical solution is: by processing and analyzing the cumulative monitoring data of the read data, the system can capture the long-term trends and changes of the data. When the cumulative monitoring data exceeds the preset cumulative threshold, the system can immediately trigger the corresponding preset script for early warning or preventive maintenance. This helps to avoid potential equipment failures and improve the reliability and service life of the equipment. By analyzing the cumulative data, the system can predict the maintenance needs of the equipment, energy consumption and other resource consumption conditions, thereby optimizing resource allocation and planning. This helps to reduce maintenance costs and improve resource utilization efficiency. Through cumulative triggering and script execution, the system can automatically handle abnormal situations and take corresponding measures, thereby improving the reliability and stability of the system. This reduces the need for human intervention and the risk of misoperation. By analyzing these data, management can understand the overall operation status of the system, performance bottlenecks, and improvement directions, so as to make more informed decisions.
[0098] In one embodiment of the present invention, the cumulative triggering of the preset script corresponding to the read data in the data association is performed according to the cumulative triggering annotation, the preset script executes the script according to the cumulative monitoring data of the read data, obtains the cumulative linkage control interface, and then obtains the update interface, including:
[0099] When the PLC controller recognizes the cumulative trigger mark, the preset script corresponding to the cumulative trigger mark is triggered;
[0100] The preset script executes the control of the corresponding element in the element association to obtain the control interface of the cumulative trigger annotation of each type;
[0101] The control interface of multiple types of cumulative trigger annotations forms a cumulative linkage control interface;
[0102] The initial linkage control interface is updated through the cumulative linkage control interface to obtain an updated interface.
[0103] The working principle of the above technical solution is as follows: the PLC controller collects the cumulative monitoring data of each type of read data periodically or in real time, and compares it with the preset cumulative threshold. When the cumulative monitoring data exceeds the preset cumulative threshold, the PLC generates a cumulative trigger annotation. Once the PLC recognizes the cumulative trigger annotation, it will search and trigger the preset script associated with it according to the information in the annotation. These scripts usually contain control logic for specific cumulative trigger conditions. The preset script contains information associated with the corresponding element, that is, which control elements (such as valves, motors, indicator lights, etc.) the script is associated with. After the script is triggered, the PLC will perform control operations on the associated elements according to the instructions in the script. For each type of cumulative trigger annotation, the PLC will generate a corresponding control interface. These interfaces display information such as the status, operation options, and cumulative data of the control elements related to the annotation. When multiple types of cumulative trigger annotations are identified and triggered, the PLC will generate multiple control interfaces. These interfaces are interconnected through a linkage mechanism to form a cumulative linkage control interface. This interface provides a comprehensive display and control of the cumulative status of the entire system. Through the cumulative linkage control interface, the PLC can update the initial linkage control interface. This includes updating the status of control elements, adding new control options, or modifying existing control logic based on accumulated data and script execution results. Ultimately, the PLC will generate an updated linkage control interface to reflect the latest status and control requirements of the system.
[0104] The technical effect of the above technical solution is: through the cumulative triggering mark and the cumulative linkage control interface, the system can continuously monitor the cumulative data of various types and automatically trigger the corresponding control logic when the preset threshold is reached. This helps to timely discover potential problems or changes in long-term trends and take corresponding control measures. The cumulative linkage control interface integrates multiple control interfaces so that operators can centrally view and control the cumulative status of the entire system on one interface. This improves work efficiency and convenience of operation. The system can dynamically update the linkage control interface based on the cumulative data and script execution results to reflect the latest status and control requirements of the system. This dynamic adaptability makes the system more flexible and scalable and can cope with complex and changing control environments. Through the triggering of preset scripts and the updating of the linkage control interface, the system can automatically take corresponding measures in abnormal situations, reducing the need for human intervention and the risk of misoperation, thereby improving the reliability and stability of the system. The cumulative data and script execution results can provide valuable decision support information for management. By analyzing and interpreting this information, management can make more informed decisions, such as optimizing maintenance plans, adjusting resource allocation, etc.
[0105] In one embodiment of the present invention, S3 includes:
[0106] Calculating an update quality value of the update interface, and comparing the update quality value with a preset quality threshold;
[0107] When the update quality value is greater than a preset quality threshold, stopping updating the update interface;
[0108] When the update quality value is less than or equal to the preset quality threshold, the update interface is re-updated until the update quality value is greater than the preset quality threshold.
[0109] The calculation formula of the update quality value is:
[0110]
[0111] Among them, f gz is the updated quality value, L is the type of read data, Δe dhi is the cumulative monitoring data of the i-th reading data after update, Δe yi is the cumulative threshold of the i-th type of read data, Δe dQi is the cumulative monitoring data of the i-th reading data before updating, c dhi For the i-th read data after update, c yi is the running threshold of the i-th type of read data, c dQi Read data for the i-th time before updating.
[0112] The working principle of the above technical solution is as follows: In an automation system, the quality of the update interface is crucial to the operator because it directly affects the operator's understanding of the current state of the system and the control operations that can be performed. In order to ensure the update strength and effectiveness of the update interface, the system needs to calculate the update quality value of the update interface and compare it with the preset quality threshold. The system obtains the cumulative monitoring data of various types of read data by reading the data of the HMI to the PLC controller. Then, according to the preset script, the system processes these data and generates an update interface. After the update interface is generated, the system starts to calculate the update quality value. The calculation formula takes into account the type of read data (L), the cumulative monitoring data of various types of data after and before the update (sum), the cumulative threshold of various types of data (), and the real-time reading value of various types of data after and before the update (sum). The calculated update quality value is then compared with the preset quality threshold. If the update quality value is greater than the preset quality threshold, it means that the quality of the update interface is high and can accurately reflect the current state of the system, so the system stops further updating the update interface. If the update quality value is less than or equal to the preset quality threshold, it means that the quality of the update interface is low and may not accurately reflect the current state of the system or there are other problems. In this case, the system will re-update the update interface. The re-update process may include re-reading data, re-executing preset scripts, recalculating the update quality value, etc. This process will be repeated until the update quality value is greater than the preset quality threshold.
[0113] The technical effect of the above technical solution is: by calculating the update quality value and comparing it with the preset threshold, the system can accurately determine whether the quality of the update interface meets the requirements. If the quality does not meet the requirements, the system will re-update until it meets the requirements, thereby ensuring that the interface seen by the operator is always accurate and reliable. When the quality of the update interface is high, the system stops updating the interface, avoiding unnecessary update operations and reducing the consumption of system resources. Since the system monitors and evaluates the quality of the update interface in real time, it can repair and adjust problems in time when they are found, thereby improving the stability and reliability of the system. By providing an accurate and reliable update interface, the system can help operators better understand and control the system, improving user experience and work efficiency.
[0114] In one embodiment of the present invention, the system comprises:
[0115] The initial trigger linkage module is used to obtain the data read by the HMI from the PLC controller, associate the preset scripts with the read data and the elements of the HMI respectively, perform a first-level trigger mark on the read data according to the preset operation threshold, trigger the preset script, and obtain the initial linkage control interface;
[0116] The cumulative trigger linkage module is used to monitor the changes of the read data, associate the acquired cumulative monitoring data with the preset script, perform cumulative trigger marking on the read data according to the preset cumulative threshold, cumulatively trigger the preset script, obtain the cumulative linkage control interface, and then obtain the update interface;
[0117] The calculation update judgment module is used to calculate the update quality value of the update interface and judge whether to re-update the update interface.
[0118] The working principle of the above technical solution is as follows: the PLC controller collects data from field devices or sensors in real time and sends these data to the HMI. The preset script (programming logic, function or algorithm) is associated with the read data and the elements of the HMI (such as buttons, indicator lights, etc.). The elements on the HMI interface will display or operate accordingly according to the data sent by the PLC. According to the preset operating threshold, the system judges the read data. If the data exceeds or falls below these thresholds, the system will trigger the preset script to perform a certain operation or change the display of the HMI interface. After the above processing, the HMI interface will be updated according to the read data and the triggered script to form an initial linkage control interface corresponding to the current system state. The system continuously monitors the data sent by the PLC and records the change amount or cumulative value of the data. In addition to the real-time operating threshold, the system also has a preset cumulative threshold. When the cumulative amount of data change reaches or exceeds these thresholds, the system will trigger the preset script again. Similar to the first-level trigger, but this time the trigger is based on the cumulative change of the data rather than the instantaneous value. This triggering method can be used to handle situations that require cumulative effects to judge, such as the total operating time and total output of the equipment. According to the cumulative trigger, the HMI interface will be updated again to form a cumulative linkage control interface that reflects the long-term status or cumulative effect of the system. Finally, through the processing of the initial trigger linkage module and the cumulative trigger linkage module, the system obtains an update interface that combines the real-time status and cumulative effect. The system calculates the update quality value of the update interface according to certain algorithms or standards (such as data accuracy, interface response speed, user feedback, etc.). If the update quality value is lower than the preset standard, the system may think that the current interface needs further optimization or correction. At this time, the system will trigger the re-update process, which may be re-reading data, recalculation, or re-triggering scripts. If the system decides to re-update, it will return to the steps of S1 or S2 and regenerate the linkage control interface according to the new data or conditions. This process forms a closed-loop control system that can reflect the status of the system in real time and automatically adjust as needed.
[0119] The technical effect of the above technical solution is: the initial trigger linkage module reads the data of the device or sensor in real time through the PLC controller, and triggers the preset script based on these data. The system can reflect the status of the on-site equipment in real time and accurately perform the corresponding control operation. This ensures that the system responds quickly and accurately to changes on the site. Through the association of the preset script with the read data, the system realizes the automated data processing and control functions. At the same time, the system can trigger and judge according to the preset threshold, and can perform the corresponding operation without manual intervention, which improves the intelligence level of the system. The HMI provides a visual linkage control interface to intuitively display the operating status and control status of the system. Through the display and operation of elements on the interface, the operator can easily monitor and control the system, improving work efficiency and convenience. The cumulative trigger linkage module pays attention to the changes in real-time data, and also processes the cumulative effect of the data through cumulative monitoring. This enables the system to more comprehensively reflect the long-term operation and cumulative effect of the equipment, providing a more accurate basis for the maintenance and management of the equipment. The calculation update judgment module calculates the update quality value of the update interface and triggers the re-update process as needed to ensure that the interface display and control logic are always in the best state. This dynamic update capability enables the system to adapt to different working environments and demand changes, and improves the flexibility and adaptability of the system. By triggering and executing preset scripts, the system can automatically handle abnormal situations and take corresponding measures, thereby improving the stability and reliability of the system. At the same time, the system can also make intelligent decisions and controls based on real-time data and cumulative effects, reducing the risk of human intervention and misoperation.
[0120] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for linking numerical values and scripts based on HMI, characterized in that: The method comprises: S1. Obtain the data read by the HMI from the PLC controller, associate the preset scripts with the read data and the elements of the HMI respectively, perform a first-level trigger mark on the read data according to the preset operation threshold, trigger the preset script, and obtain the initial linkage control interface; S2. Perform cumulative monitoring of changes in the read data, associate the acquired cumulative monitoring data with a preset script, perform cumulative trigger marking on the read data according to a preset cumulative threshold, cumulatively trigger the preset script, obtain a cumulative linkage control interface, and then obtain an update interface; S3. Calculate the update quality value of the update interface and determine whether to re-update the update interface.
2. The method for linking numerical values and scripts based on HMI according to claim 1, characterized in that: The S1 includes: Connect the HMI to the PLC controller to obtain the linkage device group; Reading the real-time data of the PLC controller through the linkage device group to obtain the read data; Preprocessing the read data to obtain preprocessed read data; Classifying the preprocessed read data according to data types to obtain multiple types of read data; Associating the plurality of types of read data with preset scripts respectively to obtain data association; Associate the preset scripts with the elements of the HMI respectively to obtain multiple element associations; The plurality of types of read data are marked as first-level triggers by using preset operation thresholds, and the preset scripts are triggered.
3. The method for linking numerical values and scripts based on HMI according to claim 2, characterized in that: The step of performing a first-level trigger mark on the plurality of types of read data by using a preset operation threshold and triggering a preset script includes: Comparing the read data of each category with the operating threshold of its corresponding category in the preset operating threshold; When the read data exceeds the operation threshold of the corresponding type in the preset operation threshold, a first-level trigger mark is performed on the read data; When the read data does not exceed the operation threshold of the corresponding type in the preset operation threshold, the read data is not marked as a first-level trigger; The preset script corresponding to the read data in the data association is triggered according to the first-level trigger mark, and the preset script executes the script according to the read data to form an initial linkage control interface.
4. The method for linking numerical values and scripts based on HMI according to claim 3, characterized in that: The triggering of the preset script corresponding to the read data in the data association according to the first-level trigger mark, the preset script executing the script according to the read data to form an initial linkage control interface, includes: When the PLC controller recognizes a first-level trigger mark, the preset script corresponding to the first-level trigger mark is triggered; The preset script executes the control of the corresponding element in the element association to obtain the control interface of the first-level trigger annotation of each type; The control interfaces of multiple types of first-level trigger annotations form an initial linkage control interface.
5. The method for linking numerical values and scripts based on HMI according to claim 1, characterized in that: The S2 includes: Perform cumulative monitoring of changes in each type of read data to obtain cumulative monitoring data; Preprocessing the accumulated monitoring data to obtain accumulated monitoring data of multiple types of preprocessed reading data; Associating the accumulated monitoring data of the plurality of types of read data with preset scripts respectively to obtain accumulated data associations; Accumulative triggering is performed on the accumulated monitoring data of the plurality of types of read data through a preset cumulative threshold to obtain a cumulative triggering mark.
6. The method for linking numerical values and scripts based on HMI according to claim 5, characterized in that: The cumulative monitoring data of the plurality of types of read data are cumulatively triggered by a preset cumulative threshold to obtain a cumulative trigger mark, including: Compare the accumulated monitoring data of each type of read data with the accumulated threshold value of the corresponding type in the preset accumulated threshold value; When the accumulated monitoring data of the read data exceeds the accumulated threshold of the corresponding category in the preset accumulated threshold, the accumulated monitoring data of the read data is cumulatively triggered and marked; When the read data does not exceed the cumulative threshold of the corresponding category in the preset cumulative threshold, no cumulative trigger marking is performed on the read data; According to the cumulative trigger mark, the preset script corresponding to the read data in the data association is cumulatively triggered, and the preset script executes the script according to the cumulative monitoring data of the read data to obtain a cumulative linkage control interface, and then obtain an update interface.
7. The method for linking numerical values and scripts based on HMI according to claim 6, characterized in that: The cumulative triggering of the preset script corresponding to the read data in the data association according to the cumulative triggering annotation, the preset script executing the script according to the cumulative monitoring data of the read data, obtaining the cumulative linkage control interface, and then obtaining the update interface, includes: When the PLC controller recognizes the cumulative trigger mark, the preset script corresponding to the cumulative trigger mark is triggered; The preset script executes the control of the corresponding element in the element association to obtain the control interface of the cumulative trigger annotation of each type; The control interface of multiple types of cumulative trigger annotations forms a cumulative linkage control interface; The initial linkage control interface is updated through the cumulative linkage control interface to obtain an updated interface.
8. The method for linking numerical values and scripts based on HMI according to claim 1, characterized in that: The S3 includes: Calculating an update quality value of the update interface, and comparing the update quality value with a preset quality threshold; When the update quality value is greater than a preset quality threshold, stopping updating the update interface; When the update quality value is less than or equal to the preset quality threshold, the update interface is re-updated until the update quality value is greater than the preset quality threshold.
9. The method for linking numerical values and scripts based on HMI according to claim 8, characterized in that: The update quality value includes: The calculation formula of the update quality value is: Among them, f gz is the updated quality value, L is the type of read data, Δe dhi is the cumulative monitoring data of the i-th reading data after update, Δe yi is the cumulative threshold of the i-th type of read data, Δe dQi is the cumulative monitoring data of the i-th reading data before updating, c dhi For the i-th read data after update, c yi is the running threshold of the i-th type of read data, c dQi Read data for the i-th time before updating.
10. A numerical value and script linkage system based on HMI, characterized in that: The system comprises: The initial trigger linkage module is used to obtain the data read by the HMI from the PLC controller, associate the preset scripts with the read data and the elements of the HMI respectively, perform a first-level trigger mark on the read data according to the preset operation threshold, trigger the preset script, and obtain the initial linkage control interface; The cumulative trigger linkage module is used to monitor the changes of the read data, associate the acquired cumulative monitoring data with the preset script, perform cumulative trigger marking on the read data according to the preset cumulative threshold, cumulatively trigger the preset script, obtain the cumulative linkage control interface, and then obtain the update interface; The calculation update judgment module is used to calculate the update quality value of the update interface and judge whether to re-update the update interface.
Citation Information
Patent Citations
Scriptable full-configuration HMI (Human Machine Interface) system driven by real-time data
CN102360288A
Interactive interface dynamic update method based on movable middleware
CN103473107A
Script interface display method and device
CN110750264A
Plan control system based on configuration software
CN110879566A
System and method for automatically generating industrial equipment HMI (Human Machine Interface) based on PLC (Programmable Logic Controller) program
CN117742693A
