Equipment data interaction method and system, automation equipment and medium

By using write buffers and data refresh threads in PLC devices, the periodic delay problem in multi-PLC collaborative interaction is solved, enabling more precise control and faster response, and improving the system's flexibility and scalability.

CN121956772APending Publication Date: 2026-05-01CLP INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511754058.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing multi-PLC collaborative interaction suffers from periodic delays, making it difficult to meet the needs of high-precision collaboration and dynamic real-time adjustment of multiple PLCs in industrial scenarios.

Method used

By using a write buffer and a data refresh thread in the data sending device, real-time writing of target data and sending at a period shorter than the minimum task period are achieved. The data receiving device directly obtains data from the read buffer within the task period.

Benefits of technology

It achieves more precise control and faster response, improves the system's flexibility and scalability, and can accurately locate logically abnormal nodes and obtain more detailed operational status information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121956772A_ABST
    Figure CN121956772A_ABST
Patent Text Reader

Abstract

The invention relates to an equipment data interaction method and system, automation equipment and a medium, and the equipment data interaction method applied to data sending end equipment comprises the steps: determining a storage address of target data needing to be interacted after a demand for providing interaction data for data receiving end equipment is generated; and reading the target data according to the storage address, writing the target data into a write-out buffer area of the target data, and sending the target data in the write-out buffer area to a reading buffer area of the data receiving end equipment by a data refreshing thread of which the execution period is smaller than the minimum task period, therefore, the data receiving end device can read the target data when the target data of the data sending end device needs to be read in the task period. According to the method, data sharing at any moment in a period is realized, logic abnormal values and real-time values can be positioned more accurately, finer running state information can be acquired to realize more accurate control and quicker response, and the flexibility and expandability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automation, and more particularly to a device data interaction method, system, automation device, and medium. Background Technology

[0002] Programmable Logic Controllers (PLCs) are a mature platform widely used in industrial automation. A control system consists of hardware, software, and interoperable components. It exchanges data and performs control operations with external devices through input and output modules, achieving automated control of industrial processes. Its characteristics include strong real-time performance and high robustness. PLCs have become increasingly feature-rich, evolving from simple logic control to complex motion control, data acquisition, and communication interconnection. The collaborative control of multiple PLC nodes is becoming increasingly important in industrial automation, especially in large or complex production environments, where collaborative control enables more efficient and flexible automation solutions.

[0003] Most existing multi-PLC collaborative interactions are based on data exchange within the "PLC scan cycle." For example, the execution of communication function blocks provided by Siemens (such as GET and MODBUS_TCP_CLIENT) depends on the PLC main program cycle, acquiring the following two types of data, but neither involves "data at any given moment within the cycle": 1) Input image area data: The PLC acquires the input signal once at the beginning of the cycle and latches it into the input I area. The communication function block reads the "input data at the beginning of the cycle". Even if the input signal changes during the cycle, it cannot be captured.

[0004] 2) Intermediate variables: Intermediate variables such as DB blocks and MW areas read by communication can only be transmitted through communication after the cycle ends, and it is impossible to locate the "real-time value of the variable at a specific moment within the cycle".

[0005] In existing multi-PLC interactive operation, most only collect input data at the beginning of the cycle and refresh output data at the end of the cycle. However, there is no standardized programming method to capture intermediate data generated during program execution in real time at a certain step or moment, obtain its logical anomaly value or real-time value and interact with it. Instead, it can only interact with the output data after the cycle ends. This will cause a periodic delay in the interaction of multi-PLCs, which makes it difficult to meet the needs of high-precision collaboration and dynamic real-time adjustment of multi-PLCs in industrial scenarios. Summary of the Invention

[0006] The purpose of this invention is to propose a device data interaction method, system, automated equipment, and medium to solve the problem that the interaction of PLCs has a periodic delay, making it difficult to meet the needs of high-precision collaboration and dynamic real-time adjustment of multiple PLCs in industrial scenarios.

[0007] The device data interaction method of the present invention, applied to a data sending device, includes: Once a need arises to provide interactive data to the data receiving device, the storage address of the target data to be interacted with is determined. The target data is read according to the storage address and written into its own write buffer. The target data in the write buffer can be sent to the read buffer of the data receiving device by the data refresh thread with an execution cycle of less than the minimum task cycle, so that the data receiving device can read the target data of the data sending device when it needs to read the target data of the data sending device within the task cycle.

[0008] Optionally, determining the storage address of the target data to be interacted with includes: Obtain a pre-formed interactive data list, which records information about data that may require interaction and its storage address; The storage address of the target data to be interacted with is determined based on the interactive data list.

[0009] Optionally, the information recorded in the interactive data list includes at least one of the following: variable name, variable type, and current device information; The storage address of the data recorded in the interactive data list includes the data partition and offset.

[0010] Optionally, the interactive data list is automatically generated during the compilation phase by the interactive data collection component in the programming software based on the program corresponding to the current device, and then downloaded to the current device.

[0011] Optionally, the process by which the data refresh thread sends the target data to the read buffer of the data receiving device includes: The data refresh thread determines whether the data in the write-out buffer has changed; Only after determining that the data in the write buffer has changed will the changed data be sent to the data receiving device.

[0012] Optionally, the write buffer is further configured with change identifiers corresponding to each piece of data. When writing the target data into its own write buffer, the method further includes: The value of the change identifier corresponding to the target data is modified to a first value, where the first value indicates that the data has changed; The data refresh thread determines whether the data in the write buffer has changed by: detecting the value of the change flag for each piece of data in the write buffer; After the data refresh thread sends the data in the write buffer to the data receiving device, it modifies the value of the change identifier corresponding to the sent target data to a second value, which indicates that the data has not changed.

[0013] On the other hand, the present invention also provides a device data interaction method, applied to a data receiving device, comprising: After receiving the target data from the write buffer of the data sending device, the data is stored in its own read buffer; When a task cycle generates a need to read the target data from the data sending device, the target data is directly retrieved from its own read buffer.

[0014] On the other hand, the present invention also provides an automated device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the steps of the device data interaction method applied to the data sending device as described above, and / or the steps of the device data interaction method applied to the data receiving device as described above.

[0015] On the other hand, the present invention also provides a device data interaction system, comprising: The data sending device is configured to, upon generating a request to provide interactive data to the data receiving device, determine the storage address of the target data to be interacted with; read the target data according to the storage address, and write the target data into its own write buffer. The target data in the write buffer can be sent to the read buffer of the data receiving device by a data refresh thread with an execution cycle shorter than the minimum task cycle, so that the data receiving device can read the target data from the data sending device when it generates a request to read the target data from the data sending device within the task cycle. Several data receiving devices are configured to store the data in a read buffer after receiving data from the write buffer of the data sending device; when the data receiving device needs to read the target data of the data sending device during a task cycle, it directly obtains the target data from its own read buffer.

[0016] On the other hand, the present invention also provides a computer-readable storage medium, characterized in that it stores computer program instructions thereon, which, when executed by a processor, implement the steps of the device data interaction method applied to a data transmitting device as described above, and / or the steps of the device data interaction method applied to a data receiving device as described above.

[0017] The device data interaction method of this invention allows the data sending device to store the data to be interacted with in a write buffer. This enables the data to be sent to the read buffer of the data receiving device via a data refresh thread with an interval less than the minimum task cycle. The data receiving device can then read the target data from the data sending device when a request arises within the task cycle. This avoids the problem of the data receiving device only being able to acquire data according to the task cycle. During implementation, it helps to accurately locate logical anomalies and the real-time values ​​of variables, and obtains more detailed operational status information for more precise control and faster response, improving the system's flexibility and scalability. Attached Figure Description

[0018] Figure 1 A basic flowchart illustrating a data interaction method applied to a data sending device, provided in this embodiment; Figure 2 A basic flowchart illustrating a data interaction method applied to a data receiving device, provided in this embodiment; Figure 3 A schematic diagram of the structure of the automated equipment provided in the embodiment; Figure 4 This is a schematic diagram showing the correspondence between the workstation and the PLC device provided in the embodiment; Figure 5 A schematic diagram of a code provided for an embodiment; Figure 6 A schematic diagram of another code provided for an embodiment; Figure 7 A schematic diagram of the PLC device operation logic provided for an embodiment; Figure 8 This is a schematic diagram illustrating the data synchronization process of the data refresh thread provided in this embodiment. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] Example 1: This embodiment provides a device data interaction method applied to a data sending device, which can send the target data to be interacted to the data receiving device at time intervals less than the minimum task cycle. Based on the same concept, this embodiment also provides a device data interaction method applied to a data receiving device, which can directly obtain the target data sent by the data sending device from its own read buffer when data is requested, avoiding the data request process according to the task cycle of the automated device, and achieving better real-time data acquisition in some implementations.

[0022] It should be understood that the data sending and receiving devices referred to in this embodiment are described based on a single data transmission and reception. In practical applications, the information interaction between two automated devices can be bidirectional; that is, a single automated device can be both a data sending end and a data receiving end. In this embodiment, the automated device can be a PLC device or other types of automated devices.

[0023] like Figure 1 As shown, the device data interaction method applied to the data sending device in this embodiment includes: S101. When a need arises to provide interactive data to the data receiving device, the storage address of the target data to be interacted with is determined. S102. Read the target data according to the storage address and write the target data into its own write-out buffer. The target data in the write-out buffer can be sent to the read buffer of the data receiving device by the data refresh thread whose execution cycle is less than the minimum task cycle. A data refresh thread can be a thread running within the data sending device, with an execution cycle (or minimum execution time interval) shorter than the minimum task cycle. It can use communication methods, including but not limited to socket communication, to send target data to the read buffer of the data receiving device. The target data in the read buffer can be read by the data receiving device when it needs to read the target data from the data sending device during the task cycle. In other words, when the target data is in the read buffer of the data receiving device, the data receiving device can read it directly without waiting for the task cycle to refresh the data.

[0024] like Figure 2 As shown, corresponding to the method steps executed by the data sending device, the device data interaction method applied to the data receiving device in this embodiment includes: S201. After receiving the target data from the write buffer of the data sending device, store the data in its own read buffer. In this embodiment, the data refresh thread can transfer data between the two devices at a frequency shorter than the task cycle. It is understood that the data interaction performed by the data refresh thread mainly involves transferring data from the write buffer of the data sending device to the data receiving device, while the data receiving device, upon receiving the data, only temporarily places the data into its own read buffer. This allows the target data to be transferred between the two devices at a frequency higher than the task cycle.

[0025] S202. When a requirement to read target data from the data sending device arises during the task cycle, the target data is directly obtained from its own read buffer. It is understood that the device data interaction method in this embodiment does not need to wait for the task cycle to complete before obtaining data; it can directly read from the read buffer to obtain the latest data status. In some implementations, the data refresh thread may also run within the data receiving device, requesting data from the data sending device at regular intervals. In practical applications, both the data receiving device and the data sending device may run data refresh threads, or their information interaction may be managed through other control devices; this embodiment does not limit the specific implementation.

[0026] In some implementations, the storage address of the target data to be interacted with is determined, including: Obtain a pre-formed list of interactive data, which records information about data that may require interaction and its storage address. Determine the storage address of the target data to be interacted with based on the list of interactive data.

[0027] In some implementations, the information recorded in the interactive data list includes at least one of the following: variable name, variable type, and current device information. The storage address of the data recorded in the interactive data list may include data partitions and offsets, etc.

[0028] In some implementations, the interaction data list is automatically generated during the compilation phase by an interaction data collection component in the programming software based on the program corresponding to the current device, and then downloaded to the current device. For example, the interaction data collection component generates an interaction data list based on the interaction data configured by the user when writing the code.

[0029] In some implementations, to avoid invalid data interaction and improve operational efficiency, the process by which the data refresh thread sends the target data to the read buffer of the data receiving device includes: The data refresh thread checks whether the data in the write buffer has changed. Only after detecting that the data in the write buffer has changed will the changed data be sent to the data receiving device.

[0030] In some implementations, the write buffer is further configured with change flags corresponding to each piece of data, and when writing target data into its own write buffer, it also includes: Modify the value of the change identifier corresponding to the target data to the first value, which indicates that the data has changed; The data refresh thread determines whether the data in the write buffer has changed by: checking the value of the change flag for each piece of data in the write buffer; After the data refresh thread sends the data in the write buffer to the data receiving device, it modifies the value of the change flag corresponding to the sent target data to the second value, which indicates that the data has not changed.

[0031] By configuring a change flag for the target data in the write buffer, it's possible to reflect whether the target data has changed compared to the previous data interaction. Data is only synchronized to the data receiving device after it has changed; unchanged data is not transmitted. This method reduces the amount of data exchanged during synchronization, significantly improving the synchronization efficiency of the data refresh thread.

[0032] This embodiment also provides an automated device, such as... Figure 3 As shown, it includes a processor 31; Memory 32 is used to store executable instructions of processor 31; The processor 31 is configured to invoke instructions stored in the memory 32 to execute the steps of the device data interaction method described in this embodiment. The device data interaction method executed by the processor 31 can be either the device data interaction method applied to the data sending device or the device data interaction method applied to the data receiving device, or a single processor 31 can run both of the above-described device data interaction methods.

[0033] This embodiment also provides a device data interaction system, including: a data sending device and several data receiving devices. The data sending device is configured to, upon generating a request to provide interactive data to the data receiving devices, determine the storage address of the target data to be interacted with; read the target data according to the storage address and write the target data into its own write buffer. The target data in the write buffer can be sent to the read buffer of the data receiving device by a data refresh thread with an execution cycle shorter than the minimum task cycle, so that the data receiving device can read the target data from the data sending device when it generates a request to read the target data from the data sending device within the task cycle. The data receiving devices are configured to, after receiving data from the write buffer of the data sending device, store the data in the read buffer; when the data receiving device generates a request to read the target data from the data sending device within the task cycle, it directly retrieves the target data from its own read buffer.

[0034] Data receiving devices can be single or multiple. When there is more than one data receiving device, the data refresh thread can send data to each data receiving device simultaneously, thereby enabling data interaction between multiple devices. In other words, in a device data interaction system, data from a single device can be sent to multiple devices simultaneously, allowing these devices to acquire the required data based on a shorter time cycle.

[0035] This embodiment also provides a computer-readable storage medium storing computer program instructions thereon. When executed by a processor, the computer program instructions implement the steps of the device data interaction method described above in this embodiment. The device data interaction method implemented when the computer program instructions are executed by the processor can be either the device data interaction method applied to a data sending device or the device data interaction method applied to a data receiving device, or the computer program instructions can implement both of the above device data interaction methods.

[0036] To better understand the method of this embodiment, the solution of this embodiment will be further explained below in conjunction with the overall development and implementation process. As an example of implementation, the overall process of implementing the above method of this embodiment is as follows: Existing multi-PLC collaborative interaction lacks the ability to capture "time-in-time data" during collaborative operation. Data interaction relies on the PLC scan cycle, resulting in the transmission of variable values ​​only after the cycle ends, making it impossible to obtain the real-time state of variables at specific moments or steps. This leads to periodic delays in the interaction between PLC devices in complex multi-PLC collaborative systems, making it difficult to meet the requirements of high-precision collaboration and dynamic real-time adjustment of multiple PLCs in industrial scenarios, thus limiting the performance and reliability of automation systems.

[0037] This example demonstrates a device data interaction method designed to overcome the limitations of traditional PLC interaction methods, which cannot capture real-time data within a PLC cycle. In this example, both the data sending and receiving devices can be PLC devices (also referred to as PLC nodes in this example). This allows for more accurate location of logical anomaly nodes and real-time values, and the acquisition of more detailed operational status information for more precise control and faster response, thus improving system flexibility and scalability.

[0038] Multi-PLC projects can be created on PLC programming software. Users need to create multiple PLC workstations in the PLC programming software and write corresponding functional logic within them. To achieve data collaboration between different PLC workstations, this example designs an interactive data request algorithm block and an interactive data output algorithm block. When a PLC node needs to use data from other nodes for collaboration at a certain time, it can call the corresponding request algorithm block to obtain the data.

[0039] In this example, the interactive data output algorithm block implements the following steps: when a need arises to provide interactive data to the data receiving device, the storage address of the target data to be interacted with is determined; the target data is read according to the storage address and written into its own write buffer; the target data in the write buffer can be sent to the read buffer of the data receiving device by the data refresh thread with an execution cycle shorter than the minimum task cycle, so that the data receiving device can read the target data from the data sending device when a need arises within the task cycle.

[0040] In this example, the interactive data request algorithm block implements the following steps: after receiving the target data from the write buffer of the data sending device, it stores the data in its own read buffer; when a demand to read the target data from the data sending device arises during the task cycle, it directly retrieves the target data from its own read buffer.

[0041] The PLC programming software compiles a multi-PLC project. For multiple PLC workstations, after the user clicks "compile," the programming software generates control logic for each node's operation, as well as interactive data lists, interactive data request algorithm blocks, and interactive data output algorithm blocks for each node's control program content, enabling the execution of the steps of the method described in this embodiment of the invention. To this end, the programming software can be designed with the following components: 1) Interactive data collection component The interactive data collection component generates an interactive data list for each node (PLC node) to facilitate node data interaction. The compiler processes the program for each node sequentially and forms an interactive data list containing the station name, variable name, variable type, data partition, offset, etc., of the data to be interacted with.

[0042] 2) Interactive code generation component The interactive code generation component generates interactive data request algorithm block and interactive data output algorithm block code based on the parameters and content of the interaction.

[0043] During the operation of multiple PLC nodes, when a PLC node executes the interactive data output algorithm block logic at a certain time, the PLC node reads the data value to be output using the information stored in the interactive data list and stores it in the write buffer of that PLC node. Then, the data refresh thread synchronizes the contents of the write buffer of that PLC node to the read buffers of other PLC nodes every time interval N (N is less than the minimum configurable task cycle). When a PLC node executes the interactive data request algorithm block logic at a certain time, the PLC node reads the corresponding requested data value from its own read buffer.

[0044] Meanwhile, to ensure the synchronization efficiency of the data refresh thread, when writing a variable to the write buffer, the corresponding flag variable `Flag` is set to `true` in the write buffer, indicating that the variable needs to be synchronized by the refresh thread. The data refresh thread only synchronizes the value of the variable from the write buffer to the read buffer of other PLC nodes when it detects that the corresponding flag variable `Flag` is `true`, and then sets the corresponding flag variable `Flag` to `false` in the write buffer. This method reduces the amount of data exchanged during synchronization, significantly improving the synchronization efficiency of the refresh thread.

[0045] To better understand the method of this embodiment, a relatively specific development example is provided below to further illustrate the solution of this embodiment. As an implementation example, the following process is included: S1: Create a multi-PLC project on the PLC programming software, and use the interactive data request algorithm block and interactive data output algorithm block in the PLC programming software to program the multiple PLC nodes collaboratively. For example, assume that the user has three PLC nodes, namely PLC_A, PLC_B and PLC_C.

[0046] 1) Users first need to create PLC workstations on the PLC programming software. Users need to create three stations on the programming software: Station1, Station2, and Station3, corresponding to PLC_A, PLC_B, and PLC_C respectively. For example... Figure 4 As shown, the programming software can establish corresponding communication connections for downloading compiled information and unified monitoring during runtime. In Station1, integer variables p1 and p3 are defined, and in Station2, integer variable p2 is defined.

[0047] 2) Collaborative programming using data interaction blocks. Assuming that during programming, Station1 needs to read data from p2 in Station2, the interactive data request algorithm block ReadStationVar can be used. Users can also obtain the value of p2 in PLC_B at the time of the call by using a function call (ReadStationVar(“Station2”,“p2”);) when writing the logic code for Station1. The function name is ReadStationVar, and the parameters are the station name “Station2” and the variable name “p2” of the data to be requested. Example code in Station1 is shown below. Figure 5 As shown. Simultaneously, to allow users to obtain the desired value of p2, the programming software can provide a corresponding interactive data output algorithm block, ShareStationVar, for Station2 to call. Users can output the value of p2 at the time of the call by calling the function (ShareStationVar(“Station2”,“p2”);) when editing the logic code of Station2. The function name is ShareStationVar, and the parameters are the station name “Station2” and the variable name “p2”. Example code in Station2 is shown below. Figure 6 As shown.

[0048] S2: Compilation of Multiple PLC Nodes. After editing the code in Station1, Station2, and Station3 in S1, the user clicks "Compile," which generates an interactive data list, the control logic for each node's operation, and the interactive data request and output algorithm blocks. The following mainly describes the process of generating the interactive data list and interactive data algorithm logic.

[0049] 1) Interactive Data List: After the user clicks "Compile," the programming software will compile the corresponding control logic in the processing stations in the order of Station1, Station2, and Station3. For the control logic of Station2 that calls the interactive data output algorithm block, after correct compilation in the lexical and syntactic stages, in the semantic analysis stage, for the syntax tree node ShareStationVar("Station2", "p2"), the programming software writes the variable name, variable type, data partition, and offset of variable p2 into the interactive data list. After the user clicks "Download," the interactive data list is downloaded to the PLC_B node along with the compiled control logic.

[0050] 2) Generating Control Logic and Interactive Data Algorithm Logic: After the user clicks "Compile," the PLC programming software will generate the corresponding execution logic for the statements `ReadStationVar("Station2", "p2");` and `ShareStationVar("Station2", "p2");` and embed it into the target code generated by the corresponding workstation. Subsequently, the user clicks the one-click download button in the programmable software, and the target code generated for Station1 and Station2 will be downloaded to PLC_A and PLC_B respectively.

[0051] S3: The operation process of multiple PLC nodes, including the operation of interactive data, and the operation logic is as follows: Figure 7 As shown, when PLC_B executes the logic code generated by ShareStationVar(“Station2”,“p2”), PLC_B will read the value of p2 from the address of p2 stored in the interactive data list and store it in the write buffer of PLC_B. At this time, the value of p2 stored is 3, and the corresponding flag variable Flag is set to true in the write buffer, indicating that the variable needs to be refreshed and synchronized to the read buffer of other PLC nodes.

[0052] The data refresh thread will synchronize the contents of the write buffer of PLC_B to the read buffer of PLC_A via socket communication every time interval N (N is less than the minimum configurable task cycle). For example... Figure 8 As shown, the value of variable p2 is synchronized to the read buffer of other PLC nodes only when the data refresh thread (i.e., the refresh thread) detects that the change flag (i.e., Flag) variable of variable p2 is true during the synchronization process. After the synchronization is completed, the change flag variable of variable p2 is set to false.

[0053] When PLC_A executes the logic code generated by ReadStationVar(“Station2”,“p2”), it reads the value 3 of p2 from its own read buffer according to the station name “Station2” and the variable name “p2”, and executes the IF logic. At this time, the value of p3 will be set to 10. Similarly, after calling the above interactive data algorithm block on variable p1, a similar operation will be performed.

[0054] Understandably, the execution of each code can be triggered based on the actual equipment workflow or user instructions. This enables data sharing between PLC nodes at any point within a cycle, allowing for more accurate location of logical anomalies and real-time values, and the acquisition of more refined operational status information for more precise control and faster response, thus improving system flexibility and scalability.

[0055] Furthermore, although exemplary embodiments have been described herein, their scope includes any and all embodiments based on this disclosure that have equivalents, modifications, omissions, combinations (e.g., schemes involving intersections of various embodiments), adaptations, or changes. They are not limited to the examples described in this specification or during the implementation of this application, and such examples are to be interpreted as non-exclusive.

[0056] The above description is intended to be illustrative and not restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. Other embodiments can be used by those skilled in the art when reading the above description.

[0057] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A device data interaction method, characterized in that, Applied to data transmitting devices, including: Once a need arises to provide interactive data to the data receiving device, the storage address of the target data to be interacted with is determined. The target data is read according to the storage address and written into its own write buffer. The target data in the write buffer can be sent to the read buffer of the data receiving device by the data refresh thread with an execution cycle of less than the minimum task cycle, so that the data receiving device can read the target data of the data sending device when it needs to read the target data of the data sending device within the task cycle.

2. The device data interaction method as described in claim 1, characterized in that, Determining the storage address of the target data that needs to be interacted with includes: Obtain a pre-formed interactive data list, which records information about data that may require interaction and its storage address; The storage address of the target data to be interacted with is determined based on the interactive data list.

3. The device data interaction method as described in claim 2, characterized in that, The information recorded in the interactive data list includes at least one of the following: variable name, variable type, and current device information; The storage address of the data recorded in the interactive data list includes the data partition and offset.

4. The device data interaction method as described in claim 2, characterized in that, The interactive data list is automatically generated during the compilation phase by the interactive data collection component in the programming software based on the program corresponding to the current device, and then downloaded to the current device.

5. The device data interaction method as described in claim 1, characterized in that, The process by which the data refresh thread sends the target data to the read buffer of the data receiving device includes: The data refresh thread determines whether the data in the write-out buffer has changed; Only after determining that the data in the write buffer has changed will the changed data be sent to the data receiving device.

6. The device data interaction method as described in claim 5, characterized in that, The write-out buffer is also configured with change identifiers corresponding to each piece of data. When writing the target data into its own write-out buffer, the following is also included: The value of the change identifier corresponding to the target data is modified to a first value, where the first value indicates that the data has changed; The data refresh thread determines whether the data in the write buffer has changed by: detecting the value of the change flag for each piece of data in the write buffer; After the data refresh thread sends the data in the write buffer to the data receiving device, it modifies the value of the change identifier corresponding to the sent target data to a second value, which indicates that the data has not changed.

7. A device data interaction method, characterized in that, Applications to data receiving devices include: After receiving the target data from the write buffer of the data sending device, the data is stored in its own read buffer; When a task cycle generates a need to read the target data from the data sending device, the target data is directly retrieved from its own read buffer.

8. An automated device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the steps of the device data interaction method according to any one of claims 1-6, and / or the steps of the device data interaction method according to claim 7.

9. A device data interaction system, characterized in that, include: The data sending device is configured to determine the storage address of the target data to be exchanged when a request is generated to provide interactive data to the data receiving device. The target data is read according to the storage address and written into its own write buffer. The target data in the write buffer can be sent to the read buffer of the data receiving device by the data refresh thread with an execution cycle of less than the minimum task cycle, so that the data receiving device can read the target data of the data sending device when it needs to read the target data of the data sending device within the task cycle. Several data receiving devices are configured to store the data in a read buffer after receiving data from the write buffer of the data sending device; when the data receiving device needs to read the target data of the data sending device during a task cycle, it directly obtains the target data from its own read buffer.

10. A computer-readable storage medium, characterized in that, It stores computer program instructions, which, when executed by a processor, implement the steps of the device data interaction method according to any one of claims 1-6, and / or the steps of the device data interaction method according to claim 7.