Two-channel polling communication OPC UA data synchronization method, HMI device and OPC UA device

By creating two independent variable nodes on the OPC UA server and designing dual-channel data synchronization rule logic, the data synchronization problem between the HMI, the OPC UA server, and the backend server was solved, improving the reliability of operation response and reducing system resource consumption.

CN120873077APending Publication Date: 2025-10-31BAOSHAN IRON & STEEL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410523978.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In smart manufacturing, data synchronization between HMI and OPC UA server and backend server suffers from inconsistencies and operational failures due to differences in polling frequency. Existing solutions increase system complexity and resource consumption, and still have latency when handling fast and short-lived operations.

Method used

A dual-channel polling communication method is adopted, which uses two independent variable nodes to represent operation data by creating two nodes on the OPC UA server. One node is used to record operation requests and the other is used to confirm the status. The dual-channel data synchronization rule logic is designed to ensure that short-lived operations are effectively captured and processed under different polling frequencies.

Benefits of technology

It improves the reliability of operation response, reduces system resource consumption, and can effectively synchronize data between HMI, OPC UA server and backend server, ensuring timely capture and processing of fast and short-lived operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873077A_ABST
    Figure CN120873077A_ABST
Patent Text Reader

Abstract

The invention discloses an OPC UA data synchronization method for dual-channel polling communication, and the method comprises the steps: employing two independent variable nodes to express one piece of HMI operation data, enabling one variable node to be used for recording an operation request, and recording the operation request as SetVar, and enabling the other variable node to be used for confirming a state, and recording the state as StatusVar; by designing two-channel data synchronization rule logic, the OPC UA server receives the HMI operation data for starting and stopping application control functions, and when it is detected that the normal state of the HMI operation data is converted into the abnormal state, a certain application control function is triggered. The invention further discloses an HMI device and an OPC UA device. According to the method, the data among the HMI server, the OPC UA server and the back-end server can be effectively synchronized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to intelligent manufacturing and data communication technologies, and more specifically, to an OPC UA data synchronization method, an HMI device, and an OPC UA device with dual-channel polling communication. In particular, it relates to a data synchronization and polling mechanism method for asynchronous data reading and writing between a human-machine interface (HMI), an OPC UA server, and a back-end data processing server. Background Technology

[0002] In the field of intelligent manufacturing, efficient data management and interaction are crucial for ensuring smooth and optimized production processes. The architecture of intelligent manufacturing mainly consists of a three-layer structure: the equipment layer, the control layer, and the application layer. In the equipment layer, sensors and motors of various devices in the workshop transmit their data as parameters to controllers such as PLCs, and execute control signals from the controllers. The controllers in the control layer need to connect to the underlying devices and perform control logic analysis and calculations, storing the collected data in a server database via routers or switches. The application layer receives real-time data and performs visualization processing to monitor the equipment status and further execute corresponding production plans by analyzing the equipment's operating status. In actual production, due to the diverse nature of the underlying devices in the factory workshop and the existence of numerous field communication protocols, these protocols are designed and promoted by different companies or organizations, resulting in incompatibility and a lack of a unified information framework, creating significant information silos and severely hindering the improvement of production efficiency.

[0003] OPC UA (Open Platform Communications Unified Architecture) abstracts the metadata and semantics of numerous industrial devices, enabling data acquisition, information modeling, and reliable and secure communication between the factory floor and the enterprise level. It plays a central role in smart manufacturing systems, serving as an intermediary communication protocol between the Human-Machine Interface (HMI) and the backend data processing server, responsible for coordinating and forwarding data. The backend server primarily collects and processes data from PLCs on the production line; this data is crucial for monitoring and controlling the production process. Figure 1 As shown.

[0004] While OPC UA communication provides a standardized and cross-platform communication method, the OPC UA server itself lacks real-time capability, and there is a certain delay during data updates. Therefore, in practical applications, the difference in polling frequency between the HMI, the OPC UA server, and the backend server often leads to data synchronization problems. For example, the HMI might poll the OPC UA server every 200 milliseconds, while the backend server might exchange data with the OPC UA server every 100 milliseconds. This different polling frequency may cause brief operations on the HMI (such as button clicks) to not be captured and processed in time on the backend server, leading to data inconsistency and operational failures.

[0005] Currently, the main issues with conventional data synchronization mechanisms and their specific problems during short-term operations are as follows:

[0006] like Figure 2 As shown, the conventional data synchronization method involves the OPC UA server defining OPC UA data nodes, and the HMI (OPC UA client) periodically reading and writing to these OPC UA data nodes to update the content displayed on the HMI screen. For example, regarding the state of screen buttons, it can be agreed that mouse click and holding is an unconventional state 0, and mouse click and holding is a normal state 1. This facilitates the interaction between the HMI and the OPC UA server.

[0007] During the nth data synchronization cycle, the HMI submits a data status of 1 (e.g., mouse not clicked) to the OPC UA server and reads the submitted and accepted status value of 1 from the server. Between the nth and n+1th data synchronization points, the screen data status changes from normal to abnormal (e.g., mouse clicked). During the n+1th data synchronization cycle, the HMI submits a data status of 0 to the OPC UA server and reads the submitted and accepted status value of 0 from the server. Between the n+1th and n+2th data synchronization points, the screen data status changes from abnormal to normal (e.g., mouse clicked and released). During the n+2th data synchronization cycle, the HMI submits a data status of 1 to the OPC UA server and reads the submitted and accepted status value of 1 from the server.

[0008] This data synchronization mechanism appears to be functioning correctly. However, due to the time difference between the HMI submitting data to the OPC UA server and the HMI retrieving data from the OPC UA server based on the OPC UA protocol, an effective synchronization mechanism is not employed. This causes the conventional data synchronization method to fail to achieve the expected functional effect in the following two situations. Furthermore, since the data synchronization cycle cannot be reduced indefinitely, the conventional data synchronization method also fails to achieve the expected functional effect when situations such as rapid mouse clicks occur. This is the third situation where the existing method fails. The specific conditions and effects of these three data synchronization failures are as follows:

[0009] Scenario 1, such as Figure 3 As shown, between the moment the HMI submits data to the OPC UA server and the moment the HMI reads data from the OPC UA server, the screen data state changes from normal to abnormal (e.g., mouse click).

[0010] During the data synchronization of the nth cycle, the HMI submits data to the OPC UA server with a status of 1 (e.g., mouse not clicked). However, between the moment the HMI submits data to the OPC UA server and the moment the HMI reads data from the OPC UA server, the screen data status changes from normal to abnormal (e.g., mouse clicked). However, subsequently, the server reads a status value of 1, indicating that the submitted data has been accepted by the OPC UA server. This means that the mouse click event on the screen did not generate valid data synchronization to the OPC UA server, meaning the expected execution of the corresponding application function will not occur.

[0011] Scenario 2, such as Figure 4 As shown, between the moment the HMI submits data to the OPC UA server and the moment the HMI reads data from the OPC UA server, the screen data state changes from an abnormal state to a normal state (e.g., mouse is pressed and released).

[0012] During the nth data synchronization cycle, the HMI submits a data status of 1 to the OPC UA server (e.g., mouse not clicked) and reads a submitted and accepted status value of 1 from the server. Between the n+th and n+1th data synchronization points, the screen data status changes from normal to abnormal (e.g., mouse clicked). During the n+1th data synchronization cycle, the HMI submits a data status of 0 to the OPC UA server. Between the time the HMI submits data to the OPC UA server and the time the HMI reads data from the OPC UA server during the n+1th cycle, the screen data status changes from abnormal to normal (e.g., mouse clicked and released), but thereafter, a submitted and accepted status value of 0 is read from the server. During the n+2th data synchronization cycle, the HMI submits a data status of 0 to the OPC UA server and reads a submitted and accepted status value of 0 from the server. This means that from the server's perspective, once the mouse button is clicked, it remains inactive. Therefore, no matter how many times the button is clicked on the screen, the expected corresponding application function will not be executed.

[0013] Scenario 3, such as Figure 5 As shown, the overall event that the image data status changed from normal to abnormal and then returned to normal was less than the data synchronization cycle time interval.

[0014] During the nth data synchronization cycle, the HMI submits a data status of 1 (e.g., mouse not clicked) to the OPC UA server and reads the submitted and accepted status value of 1 from the server. Between the nth and n+1th data synchronization points, the screen data status changes from normal to abnormal (e.g., mouse clicked), and within this cycle interval, the status changes back from abnormal to normal. During the n+1th data synchronization cycle, the HMI submits a data status of 1 to the OPC UA server and reads the submitted and accepted status value of 1 from the server. During the n+2th data synchronization cycle, the HMI submits a data status of 1 to the OPC UA server and reads the submitted and accepted status value of 1 from the server. This means that from the server's perspective, the mouse on the screen has not been clicked.

[0015] To address this issue, existing industry solutions include increasing polling frequency, i.e., minimizing data synchronization latency by increasing the frequency of data exchange. However, this approach significantly increases network load and processor burden, especially in large-scale systems, potentially leading to reduced system performance and longer response times. Another approach is to employ time synchronization mechanisms, using precise time stamps and synchronization algorithms to ensure data consistency. While theoretically providing excellent synchronization, this method is complex to implement and requires high precision and consistency from the system clock, potentially making it unsuitable for all industrial environments. A further solution involves implementing complex data caching and processing strategies, such as setting up data buffers to temporarily store data from short-lived operations and then processing it at the appropriate time. This approach can solve the data synchronization problem to some extent, but it increases system complexity and may still introduce latency when processing rapidly changing data. In summary, while existing solutions can address data synchronization issues to some extent, they often increase system complexity and resource consumption, and may still be insufficient for handling fast and short-lived operations. Especially in smart manufacturing environments, backend servers need to process critical data from PLCs accurately and in real time to ensure smooth production processes. Summary of the Invention

[0016] To address the shortcomings of existing technologies, the present invention aims to provide a dual-channel polling communication OPC UA data synchronization method and apparatus, HMI device, and OPC UA device, which can effectively synchronize data between the HMI, OPC UA server, and backend server, ensuring that even at different polling frequencies, brief and rapid operations can be captured and processed in a timely manner.

[0017] To achieve the above objectives, the present invention adopts the following technical solution:

[0018] The first aspect of this invention provides an OPC UA data synchronization method with dual-channel polling communication;

[0019] For an HMI operation data, two independent variable nodes are used to represent the operation data. One variable node is used to record the operation request and is denoted as SetVar. The other variable node is used to confirm the status and is denoted as StatusVar.

[0020] By designing dual-channel data synchronization rule logic, the OPC UA server receives the HMI operation data for starting and stopping application control functions. When the normal state of the HMI operation data is detected to change to an abnormal state, a certain application control function is triggered.

[0021] Preferably, the dual-channel data synchronization rule logic includes:

[0022] Rule 1: During periodic data synchronization, the data update execution order rule of the OPC UA server;

[0023] Rule 2: When SetVar sends a transition from normal to abnormal state, the HMI assigns a value to StatusVar using SetVar, i.e., StatusVar = SetVar.

[0024] Preferably, the OPC UA server executes rule 1 in the following steps:

[0025] S1, when the HMI submits data to the OPC UA server at the nth data synchronization time point, it also submits the data status values ​​of SetVar and StatusVar.

[0026] S2, after the OPC UA server receives the data status values ​​of SetVar and StatusVar, it receives the values ​​of SetVar and StatusVar when the data of the OPC UA server is updated;

[0027] S3, when the HMI reads data from the OPC UA server at the nth data synchronization time point, the OPC UA server sends the data status values ​​of SetVar and StatusVar to the HMI. At this time, the sent StatusVar is assigned a value using SetVar.

[0028] S4, when the HMI reads data from the OPC UA server at the nth data synchronization time point, if the StatusVar value read from the OPC UA server and the SetVar value of the HMI are inconsistent, the HMI's SetVar will not accept data updates from the OPC UA server; if they are consistent, the HMI's SetVar will accept data updates from the OPC UA server; StatusVar always accepts updates.

[0029] S5. When the HMI reads data from the OPC UA server at the nth data synchronization time point, it assigns a value to StatusVar using SetVar obtained in step S4, i.e., StatusVar = SetVar.

[0030] Preferably, in step S2, the data status of StatusVar is used by the internal application control functions of the OPC UA server.

[0031] A second aspect of the present invention provides an HMI device, the HMI device including a processor and a memory, and having implemented HMI functions:

[0032] The memory is used to store computer execution instructions. When the HMI device is running, the processor executes the computer execution instructions stored in the memory to cause the HMI device to execute the OPC UA data synchronization method of dual-channel polling communication provided in the first aspect of the present invention.

[0033] A third aspect of the present invention provides an OPC UA device, the OPC UA device including a processor and a memory, and having implemented OPC UA server functionality:

[0034] The memory is used to store computer execution instructions. When the OPC UA device is running, the processor executes the computer execution instructions stored in the memory to cause the OPC UA device to execute the OPC UA data synchronization method of dual-channel polling communication provided in the first aspect of the present invention.

[0035] This invention provides a dual-channel polling communication-based OPC UA data synchronization method and apparatus, HMI device, and OPC UA device for optimizing data synchronization and operation response in industrial automation and intelligent manufacturing systems. This mechanism uses two independent variable nodes created on the OPC UA server to represent operation data; one node records the operation request, and the other confirms the status. Through specially designed dual-channel data synchronization rule logic, data synchronization failures are effectively avoided under various conditions. This method improves the reliability of operation response while reducing system resource consumption. This invention provides a more practical solution for real-time data processing and automated control of operation event types in the field of intelligent manufacturing. This invention has wide applicability, is easy to use, requires no additional investment, and can solve the problem of event-triggered data asynchrony in polling communication scenarios. In the field of intelligent manufacturing, this invention can be widely adopted and has broad prospects for technological promotion. Attached Figure Description

[0036] Figure 1 This is a schematic diagram of existing OPC UA protocol communication applications;

[0037] Figure 2 This is a schematic diagram of existing conventional data synchronization methods;

[0038] Figure 3 This is a schematic diagram illustrating a scenario where existing conventional data synchronization methods fail.

[0039] Figure 4 This is a schematic diagram illustrating scenario two of the existing conventional data synchronization methods failing.

[0040] Figure 5 This is a schematic diagram illustrating scenario three of the existing conventional data synchronization methods that have failed.

[0041] Figure 6 This is a flowchart illustrating the execution steps of Rule 1 in the OPC UA data synchronization method of this invention;

[0042] Figure 7 This is a schematic diagram of the data synchronization method in Embodiment 1 of the OPC UA data synchronization method of the present invention;

[0043] Figure 8 This is a schematic diagram of the data synchronization method in Embodiment 2 of the OPC UA data synchronization method of the present invention;

[0044] Figure 9 This is a schematic diagram of the data synchronization method in Embodiment 3 of the OPC UA data synchronization method of the present invention;

[0045] Figure 10 This is a schematic diagram of the data synchronization method in Embodiment 4 of the OPC UA data synchronization method of the present invention. Detailed Implementation

[0046] To better understand the above-mentioned technical solutions of the present invention, the technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0047] The OPC UA data synchronization method with dual-channel polling communication provided by this invention specifically includes:

[0048] For each HMI operation data point, two independent variable nodes are used to represent it. One variable node records the operation request (SetVar), and the other node confirms the status (StatusVar). This HMI operation data has two data states: Normal (generally referring to the normal state) and Abnormal (generally referring to the abnormal state, below the abnormal state). The OPC UA server receives the HMI operation data and uses it to start and stop application control functions. For example, when a transition from Normal to Abnormal is detected, a certain application control function is triggered.

[0049] The dual-channel data synchronization rule logic designed in the OPC UA data synchronization method of this invention includes:

[0050] Rule 1: During periodic data synchronization, under the data update execution order rules of the OPC UA server, the following steps are executed:

[0051] S1, when the HMI (OPC UA client) submits data to the OPC UA server at the nth data synchronization time point, it also submits the data status values ​​of two variable nodes, SetVar and StatusVar.

[0052] S2, after the OPC UA server receives the data status values ​​of the two variable nodes SetVar and StatusVar, when the OPC UA server updates its data, it receives the values ​​of the two variable nodes SetVar and StatusVar. That is, the data status values ​​of the two variable nodes SetVar and StatusVar that the OPC UA server finally accepts and stores internally are equivalent to the values ​​of SetVar and StatusVar submitted by the HMI. The data status of StatusVar is used by the internal application control functions of the OPC UA server.

[0053] S3, when the HMI (OPC UA client) reads data from the OPC UA server at the nth data synchronization time point, the OPC UA server sends the data status values ​​of SetVar and StatusVar to the HMI. At this time, the sent StatusVar is assigned the value of SetVar, that is, the sent StatusVar = SetVar. In other words, the data status values ​​of the two variable nodes SetVar and StatusVar that the OPC UA server finally sends to the HMI are equal to the SetVar value submitted by the HMI.

[0054] S4, when the HMI (OPC UA client) reads data from the OPC UA server at the nth data synchronization time point, if the StatusVar value read from the OPC UA server and the SetVar value on the HMI side are inconsistent, the SetVar value on the HMI side will not accept data updates from the OPC UA server; if they are consistent, the SetVar value on the HMI side will accept data updates from the OPC UA server; StatusVar always accepts updates.

[0055] S5. When the HMI (OPC UA client) reads data from the OPC UA server at the nth data synchronization time point, it assigns a value to StatusVar using SetVar obtained in step S4, i.e., StatusVar = SetVar.

[0056] Rule 2: When SetVar sends a transition from normal to abnormal state, the HMI side assigns a value to StatusVar using SetVar, i.e., StatusVar = SetVar.

[0057] Example 1

[0058] Regarding the states of on-screen buttons, we can define mouse click (pressed) as an unconventional state 0, and mouse click (released) as a normal state 1. The interaction between the HMI and the OPC UA server, such as... Figure 7 As shown.

[0059] During data synchronization in the nth cycle, rule 1 is executed as follows:

[0060] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 1);

[0061] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 1) and StatusVar (value is 1), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0062] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0063] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar value read from the OPC UA server is consistent with the SetVar value on the HMI side, SetVar is updated (value is 1); StatusVar is updated (value is 1).

[0064] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0065] Between the nth and n+1th data synchronization points, the screen data status changes from normal to abnormal (e.g., mouse click). Rule 2 is executed: the HMI device assigns SetVar (value is 0) to StatusVar, that is, the value of StatusVar is 0.

[0066] During data synchronization in the (n+1)th cycle, rule 1 is executed as follows:

[0067] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value is 0) and StatusVar (value is 0);

[0068] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 0) and StatusVar (value is 0), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0069] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (value is 0), that is, the data status values ​​of SetVar and StatusVar of the two nodes that the OPC UA server finally sends to the HMI are both equal to 0.

[0070] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar value read from the OPC UA server is consistent with the SetVar value on the HMI side, SetVar is updated (value is 0); StatusVar is updated (value is 0).

[0071] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 0 to StatusVar using SetVar obtained in step S4, i.e., the value of StatusVar is 0.

[0072] Between the (n+1)th and (n+2)th data synchronization points, the screen data state changes from an abnormal state to a normal state (e.g., mouse click and release).

[0073] During data synchronization in the (n+2)th cycle, rule 1 is executed as follows:

[0074] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 0);

[0075] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value of 1) and StatusVar (value of 0), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0076] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0077] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar value read from the OPC UA server is consistent with the SetVar value on the HMI side, SetVar is updated (value is 1); StatusVar is updated (value is 1).

[0078] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0079] During data synchronization in the (n+3)th cycle, rule 1 is executed as follows:

[0080] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 1);

[0081] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 1) and StatusVar (value is 1), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0082] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0083] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar value read from the OPC UA server is consistent with the SetVar value on the HMI side, SetVar is updated (value is 1); StatusVar is updated (value is 1).

[0084] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0085] This completes the data synchronization for a single mouse button click event.

[0086] Example 2

[0087] Regarding the states of on-screen buttons, we can define mouse click (pressed) as an unconventional state 0, and mouse click (released) as a normal state 1. The interaction between the HMI and the OPC UA server, such as... Figure 8 As shown.

[0088] During data synchronization in the nth cycle, rule 1 is executed as follows:

[0089] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 1);

[0090] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 1) and StatusVar (value is 1), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0091] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0092] Between the moment the HMI submits data to the OPC UA server and the moment the HMI reads data from the OPC UA server, the screen data status changes from normal to abnormal (e.g., mouse click). At this time, rule 2 is executed: the HMI device assigns SetVar (value 0) to StatusVar, that is, the value of StatusVar is 0.

[0093] The remaining rules of Rule 1 will then continue to be executed during the data synchronization of the nth cycle:

[0094] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar (value is 1) read from the OPC UA server is inconsistent with the SetVar (value is 0) on the HMI side, SetVar will not accept the update and will continue to keep the value as 0; StatusVar will accept the update (value is 1).

[0095] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 0 to StatusVar using SetVar obtained in step S4, i.e., the value of StatusVar is 0.

[0096] During data synchronization in the (n+1)th cycle, rule 1 is executed as follows:

[0097] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value is 0) and StatusVar (value is 0);

[0098] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 0) and StatusVar (value is 0), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0099] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (value is 0), that is, the data status values ​​of SetVar and StatusVar of the two nodes that the OPC UA server finally sends to the HMI are both equal to 0.

[0100] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar value read from the OPC UA server is consistent with the SetVar value on the HMI side, SetVar is updated (value is 0); StatusVar is updated (value is 0).

[0101] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 0 to StatusVar using SetVar obtained in step S4, i.e., the value of StatusVar is 0.

[0102] Between the (n+1)th and (n+2)th data synchronization points, the screen data state changes from an abnormal state to a normal state (e.g., mouse click and release).

[0103] During data synchronization in the (n+2)th cycle, rule 1 is executed as follows:

[0104] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 0);

[0105] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value of 1) and StatusVar (value of 0), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0106] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0107] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar value read from the OPC UA server is consistent with the SetVar value on the HMI side, SetVar is updated (value is 1); StatusVar is updated (value is 1).

[0108] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0109] During data synchronization in the (n+3)th cycle, rule 1 is executed as follows:

[0110] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 1);

[0111] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 1) and StatusVar (value is 1), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0112] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0113] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar value read from the OPC UA server is consistent with the SetVar value on the HMI side, SetVar is updated (value is 1); StatusVar is updated (value is 1).

[0114] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0115] This completes the data synchronization for a single mouse button click event.

[0116] Example 3

[0117] Regarding the states of on-screen buttons, we can define mouse click (pressed) as an unconventional state 0, and mouse click (released) as a normal state 1. The interaction between the HMI and the OPC UA server, such as... Figure 9 As shown.

[0118] During data synchronization in the nth cycle, rule 1 is executed as follows:

[0119] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 1);

[0120] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 1) and StatusVar (value is 1), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0121] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0122] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar (value is 1) read from the OPC UA server is consistent with the SetVar (value is 1) on the HMI side, SetVar accepts the update (value is 1); StatusVar accepts the update (value is 1).

[0123] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0124] Between the nth and n+1th data synchronization points, the screen data status changes from normal to abnormal (e.g., mouse click). Rule 2 is executed: the HMI device assigns SetVar (value is 0) to StatusVar, that is, the value of StatusVar is 0.

[0125] During data synchronization in the (n+1)th cycle, rule 1 is executed as follows:

[0126] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value is 0) and StatusVar (value is 0);

[0127] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 0) and StatusVar (value is 0), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0128] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (value is 0), that is, the data status values ​​of SetVar and StatusVar of the two nodes that the OPC UA server finally sends to the HMI are both equal to 0.

[0129] Between the moment the HMI submits data to the OPC UA server and the moment the HMI reads data from the OPC UA server, the screen data state changes from an abnormal state to a normal state (e.g., mouse click and release).

[0130] The remaining rules of Rule 1 will then continue to be executed during the (n+1)th period of data synchronization:

[0131] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar (value is 0) read from the OPC UA server is inconsistent with the SetVar (value is 1) on the HMI side, SetVar will not accept the update and will continue to keep the value as 1; StatusVar will accept the update (value is 0).

[0132] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0133] During data synchronization in the (n+2)th cycle, rule 1 is executed as follows:

[0134] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 1);

[0135] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 1) and StatusVar (value is 1), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0136] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0137] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar value read from the OPC UA server is consistent with the SetVar value on the HMI side, SetVar is updated (value is 1); StatusVar is updated (value is 1).

[0138] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0139] This completes the data synchronization for a single mouse button click event.

[0140] Example 4

[0141] Regarding the states of on-screen buttons, we can define mouse click (pressed) as an unconventional state 0, and mouse click (released) as a normal state 1. The interaction between the HMI and the OPC UA server, such as... Figure 10 As shown.

[0142] During data synchronization in the nth cycle, rule 1 is executed as follows:

[0143] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 1);

[0144] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 1) and StatusVar (value is 1), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0145] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0146] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar (value is 1) read from the OPC UA server is consistent with the SetVar (value is 1) on the HMI side, SetVar accepts the update (value is 1); StatusVar accepts the update (value is 1).

[0147] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0148] Between the nth and n+1th data synchronization points, the screen data status changes from normal to abnormal (e.g., mouse click). Rule 2 is executed: the HMI device assigns SetVar (value is 0) to StatusVar, that is, the value of StatusVar is 0.

[0149] Subsequently, between the nth and n+1th data synchronization points, the screen data state changed from abnormal to normal (e.g., mouse click and release).

[0150] During data synchronization in the (n+1)th cycle, rule 1 is executed as follows:

[0151] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 0);

[0152] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value of 1) and StatusVar (value of 0), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0153] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0154] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar (value is 1) read from the OPC UA server is consistent with the SetVar (value is 1) on the HMI side, SetVar accepts the update (value is 1); StatusVar accepts the update (value is 1).

[0155] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0156] During data synchronization in the (n+2)th cycle, rule 1 is executed as follows:

[0157] Step S1: When the HMI (OPC UA client) submits data to the OPC UA server, it also submits two node SetVar (value of 1) and StatusVar (value of 1);

[0158] Step S2: After the OPC UA server receives the data status values ​​of the two nodes SetVar and StatusVar, during the data update on the server side, the OPC UA server finally accepts and internally stores the two nodes SetVar (value is 1) and StatusVar (value is 1), where the data status of StatusVar is used by the internal application control function of the OPC UA server.

[0159] Step S3: When the HMI (OPC UA client) reads data from the OPC UA server, the OPC UA server sends SetVar and StatusVar to the HMI. At this time, the StatusVar sent is assigned the value of SetVar (with a value of 1). That is, the data status values ​​of SetVar and StatusVar that the OPC UA server finally sends to the HMI are both equal to 1.

[0160] Step S4: When the HMI (OPC UA client) reads data from the OPC UA server, if the StatusVar value read from the OPC UA server is consistent with the SetVar value on the HMI side, SetVar is updated (value is 1); StatusVar is updated (value is 1).

[0161] Step S5: After the HMI (OPC UA client) reads data from the OPC UA server, it assigns a value of 1 to StatusVar using SetVar obtained in step S4, that is, the value of StatusVar is 1.

[0162] This completes the data synchronization for a single mouse button click event.

[0163] Those skilled in the art should recognize that the above embodiments are merely illustrative of the present invention and are not intended to limit the present invention. Any variations or modifications to the above embodiments that are within the spirit and essence of the present invention will fall within the scope of the claims of the present invention.

Claims

1. A dual-channel polling communication method for OPC UA data synchronization, characterized in that: For an HMI operation data, two independent variable nodes are used to represent the operation data. One variable node is used to record the operation request and is denoted as SetVar. The other variable node is used to confirm the status and is denoted as StatusVar. By designing dual-channel data synchronization rule logic, the OPC UA server receives the HMI operation data for starting and stopping application control functions. When the normal state of the HMI operation data is detected to change to an abnormal state, a certain application control function is triggered.

2. The OPC UA data synchronization method for dual-channel polling communication according to claim 1, characterized in that, The dual-channel data synchronization rule logic includes: Rule 1: During periodic data synchronization, the data update execution order rule of the OPC UA server; Rule 2: When SetVar sends a transition from normal to abnormal state, the HMI assigns a value to StatusVar using SetVar, i.e., StatusVar = SetVar.

3. The OPC UA data synchronization method for dual-channel polling communication according to claim 2, characterized in that, The OPC UA server executes rule 1 in the following steps: S1, when the HMI submits data to the OPC UA server at the nth data synchronization time point, it also submits the data status values ​​of SetVar and StatusVar. S2, after the OPC UA server receives the data status values ​​of SetVar and StatusVar, it receives the values ​​of SetVar and StatusVar when the data of the OPC UA server is updated; S3, when the HMI reads data from the OPC UA server at the nth data synchronization time point, the OPC UA server sends the data status values ​​of SetVar and StatusVar to the HMI. At this time, the sent StatusVar is assigned a value using SetVar. S4, when the HMI reads data from the OPC UA server at the nth data synchronization time point, if the StatusVar value read from the OPC UA server and the SetVar value of the HMI are inconsistent, the HMI's SetVar will not accept data updates from the OPC UA server; if they are consistent, the HMI's SetVar will accept data updates from the OPC UA server; StatusVar always accepts updates. S5. When the HMI reads data from the OPC UA server at the nth data synchronization time point, it assigns a value to StatusVar using SetVar obtained in step S4, i.e., StatusVar = SetVar.

4. The OPC UA data synchronization method for dual-channel polling communication according to claim 3, characterized in that, In step S2, the data status of StatusVar is used by the internal application control functions of the OPC UA server.

5. An HMI device, characterized in that, The HMI device includes a processor and memory, and has implemented HMI functionality: The memory is used to store computer execution instructions. When the HMI device is running, the processor executes the computer execution instructions stored in the memory to cause the HMI device to perform the OPC UA data synchronization method of dual-channel polling communication as described in any one of claims 1-4.

6. An OPC UA device, characterized in that, The OPC UA device includes a processor and memory, and has implemented OPC UA server functionality. The memory is used to store computer execution instructions. When the OPC UA device is running, the processor executes the computer execution instructions stored in the memory to cause the OPC UA device to perform the OPC UA data synchronization method of dual-channel polling communication as described in any one of claims 1-4.

Citation Information

Patent Citations

  • OPC UA dynamic deployment method for field device

    CN116088867A

  • Apparatus and method for unidirectional data transmission based on OPC-ua

    KR1020180137244A