PLC data processing method and system based on industrial Ethernet ring network

By introducing industrial Ethernet ring network data processing methods into PLC systems, address allocation and data flow paths are optimized, solving the memory fragmentation and scalability problems of traditional PLC systems, and improving system performance and maintainability.

CN121995838APending Publication Date: 2026-05-08STATE NUCLEAR POWER AUTOMATION SYST ENGCO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610123026.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-29
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Traditional PLC systems suffer from numerous memory fragmentation issues, low scalability, poor maintainability, and difficulties in user operation due to their address allocation methods.

Method used

The PLC data processing method based on industrial Ethernet ring network is adopted. By dividing the master station and slave station memory into fixed address area, dynamic address area and data summary area, the data flow path is optimized, and the summary data in the data summary area is processed by the logic control unit to generate output data.

Benefits of technology

It achieves the ultimate optimization of memory resources, improves system transmission efficiency and response speed, and enhances system scalability and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121995838A_ABST
    Figure CN121995838A_ABST
Patent Text Reader

Abstract

The invention provides a PLC data processing method and system based on an industrial Ethernet ring network. The industrial Ethernet ring network comprises at least one master station and at least one slave station, a master station memory of the master station is divided into a master station fixed address area, a master station dynamic address area and a data summarization area, and a slave station memory of the slave station is divided into a slave station fixed address area and a slave station dynamic address area; to-be-processed data of each information point in an industrial Ethernet ring network is sent to a data summarization area of a master station through a slave station dynamic address area of a slave station corresponding to each information point; the logic control unit processes the summarized data in the data summarizing area and generates output data; and sending the output data from the data summarization area to a slave station dynamic address area of the corresponding slave station. According to the method and the device, memory resources are optimally utilized, and memory fragments are eliminated; meanwhile, the transmission efficiency and the response speed of the system are remarkably improved; and an efficient, stable, economical and efficient solution is provided for industrial control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of industrial automation control, and in particular to a PLC data processing method and system based on an industrial Ethernet ring network. Background Technology

[0002] In the field of industrial automation control, programmable logic controller (PLC) systems, as core control units, are widely used in key industries such as manufacturing. Traditional PLC systems typically employ fixed addresses or vendor-automated address allocation strategies for address management. Fixed address allocation requires reserving the maximum possible data space for each input / output (I / O) module, resulting in a large amount of memory being idle or fragmented. Automatic address allocation, on the other hand, heavily relies on the hardware and software architecture of specific vendors, requiring deep involvement of specialized technical personnel during system integration and expansion, leading to extended project cycles and increased maintenance costs. Furthermore, when users configure addresses themselves, the scattered and disordered distribution of signal points often makes the process cumbersome, error-prone, and difficult to optimize data link efficiency. Summary of the Invention

[0003] The technical problem to be solved by this disclosure is to overcome the shortcomings of existing PLC address allocation methods, such as excessive memory fragmentation, low scalability, poor maintainability, and difficulty in user operation, and to provide a PLC data processing method and system based on an industrial Ethernet ring network.

[0004] This disclosure solves the above-mentioned technical problems through the following technical solution:

[0005] This disclosure provides a PLC data processing method based on an industrial Ethernet ring network. The industrial Ethernet ring network includes at least one master station and at least one slave station. The master station's master station memory is divided into a master station fixed address area, a master station dynamic address area, and a data summary area. The slave station's slave station memory is divided into a slave station fixed address area and a slave station dynamic address area. The PLC data processing method includes:

[0006] The data to be processed from each information point in the industrial Ethernet ring network is sent to the data aggregation area of ​​the master station via the slave dynamic address area of ​​the corresponding slave station of each information point.

[0007] The logic control unit processes the summarized data in the data summary area and generates output data;

[0008] The output data is sent from the data aggregation area to the corresponding slave station's dynamic address area.

[0009] Optionally, the step of sending the data to be processed from each information point in the industrial Ethernet ring network to the data aggregation area of ​​the master station via the slave dynamic address area of ​​the corresponding slave station of each information point includes:

[0010] When the information point is an I / O device, the first data to be processed of the I / O device is stored in the fixed address area of ​​the corresponding first target slave in the slave station, and the first data to be processed of the first target slave is sent from the fixed address area of ​​the slave to the first continuous address space of the dynamic address area of ​​the slave according to the preset I / O remapping table.

[0011] When the information point is a communication device, the second data to be processed by the communication device is stored in the second continuous address space preset in the dynamic address area of ​​the corresponding second target slave station in the slave station;

[0012] The data to be processed in the dynamic address area of ​​each slave station is sent to the data aggregation area according to the ring network routing table.

[0013] Optionally, sending the first data to be processed from the first target slave station from the slave station's fixed address area to the first contiguous address space of the slave station's dynamic address area includes:

[0014] In response to the first data to be processed being a digital signal, a preset number of digital signals are compressed bit by bit and stored in an address unit; the preset number of compressions is matched with the bit width of the address unit.

[0015] Optionally, the step of processing the summarized data in the data summary area by the logic control unit and generating output data includes:

[0016] The logic control unit accesses the data aggregation area;

[0017] Read the summary data from the data summary area; the summary data is arranged according to slave station number and data type.

[0018] Based on the aggregated data, a preset control logic program is executed to perform calculations and generate corresponding output data.

[0019] The output data is written into the pre-allocated output data block in the data summary area.

[0020] Optionally, sending the output data from the data aggregation area to the corresponding slave station's dynamic address area includes:

[0021] Determine the third target slave station corresponding to the output data;

[0022] The routing path between the data aggregation area and the slave dynamic address area of ​​the third target slave station is determined based on the ring network routing table;

[0023] Based on the routing path, the output data is sent from the data aggregation area to the slave dynamic address area of ​​the third target slave station.

[0024] Optionally, the PLC data processing method further includes a system configuration process, which is triggered by at least one of the following events: the initial construction of the industrial Ethernet ring network, a hardware device change event in the industrial Ethernet ring network, and a user configuration command;

[0025] The system configuration process includes:

[0026] The hardware devices in the industrial Ethernet ring network are statistically analyzed to identify each information point;

[0027] Based on the statistical results, an address configuration table, an I / O remapping table, and a ring network routing table are generated; wherein, the address configuration table defines the address mapping of the information point in memory, the I / O remapping table defines data remapping and compression operations, and the ring network routing table defines the routing path of data between the master station and the slave station;

[0028] The address configuration table, the IO remapping table, and the routing table are downloaded to the master station and the slave station to configure the master station fixed address area, the master station dynamic address area, the data aggregation area, the slave station fixed address area, and the slave station dynamic address area.

[0029] This disclosure provides a PLC data processing system based on an industrial Ethernet ring network. The industrial Ethernet ring network includes at least one master station and at least one slave station. The master station's memory is divided into a master station fixed address area, a master station dynamic address area, and a data aggregation area. The slave station's memory is divided into a slave station fixed address area and a slave station dynamic address area. The PLC data processing system includes:

[0030] The aggregation module is used to send the data to be processed from each information point in the industrial Ethernet ring network to the data aggregation area of ​​the master station via the slave dynamic address area of ​​the corresponding slave station of each information point.

[0031] The processing module is used to process the summarized data in the data summary area by the logic control unit and generate output data;

[0032] The distribution module is used to send the output data from the data aggregation area to the corresponding slave station's dynamic address area.

[0033] Optionally, the aggregation module is specifically used for:

[0034] When the information point is an I / O device, the first data to be processed of the I / O device is stored in the fixed address area of ​​the corresponding first target slave in the slave station, and the first data to be processed of the first target slave is sent from the fixed address area of ​​the slave to the first continuous address space of the dynamic address area of ​​the slave according to the preset I / O remapping table.

[0035] When the information point is a communication device, the second data to be processed by the communication device is stored in the second continuous address space preset in the dynamic address area of ​​the corresponding second target slave station in the slave station;

[0036] The data to be processed in the dynamic address area of ​​each slave station is sent to the data aggregation area according to the ring network routing table.

[0037] Optionally, the aggregation module is specifically used for:

[0038] In response to the first data to be processed being a digital signal, a preset number of digital signals are compressed bit by bit and stored in an address unit; the preset number of compressions is matched with the bit width of the address unit.

[0039] Optionally, the processing module is specifically used for:

[0040] The logic control unit accesses the data aggregation area;

[0041] Read the summary data from the data summary area; the summary data is arranged according to slave station number and data type.

[0042] Based on the aggregated data, a preset control logic program is executed to perform calculations and generate corresponding output data.

[0043] The output data is written into the pre-allocated output data block in the data summary area.

[0044] Optionally, the distribution module is specifically used for:

[0045] Determine the third target slave station corresponding to the output data;

[0046] The routing path between the data aggregation area and the slave dynamic address area of ​​the third target slave station is determined based on the ring network routing table;

[0047] Based on the routing path, the output data is sent from the data aggregation area to the slave dynamic address area of ​​the third target slave station.

[0048] Optionally, the PLC data processing system further includes a system configuration module, which is used to respond to at least one of the following events: the initial construction of the industrial Ethernet ring network, hardware device change events in the industrial Ethernet ring network, and user configuration commands;

[0049] The system configuration module is specifically used for:

[0050] The hardware devices in the industrial Ethernet ring network are statistically analyzed to identify each information point;

[0051] Based on the statistical results, an address configuration table, an I / O remapping table, and a ring network routing table are generated; wherein, the address configuration table defines the address mapping of the information point in memory, the I / O remapping table defines data remapping and compression operations, and the ring network routing table defines the routing path of data between the master station and the slave station;

[0052] The address configuration table, the IO remapping table, and the routing table are downloaded to the master station and the slave station to configure the master station fixed address area, the master station dynamic address area, the data aggregation area, the slave station fixed address area, and the slave station dynamic address area.

[0053] This disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and used to run on the processor, wherein the processor executes the computer program to implement the PLC data processing method based on an industrial Ethernet ring network as described above.

[0054] This disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the PLC data processing method based on an industrial Ethernet ring network as described above.

[0055] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the PLC data processing method based on an industrial Ethernet ring network as described above.

[0056] Based on common knowledge in the field, the above-mentioned preferred conditions can be combined arbitrarily to obtain various preferred embodiments of this disclosure.

[0057] The positive advancements of this disclosure are as follows: through the collaborative architecture of fixed address area, dynamic address area and data aggregation area, the ultimate optimization of memory resources is achieved, eliminating memory fragmentation; at the same time, the standardized data flow path and centralized data processing significantly improve system transmission efficiency and response speed; in addition, the flexible design of the dynamic address area enables the system to seamlessly adapt to hardware changes, greatly enhancing scalability and maintainability, thereby providing an efficient, stable and cost-effective solution for industrial control. Attached Figure Description

[0058] Figure 1 A flowchart illustrating a PLC data processing method based on an industrial Ethernet ring network, provided as an exemplary embodiment of this disclosure;

[0059] Figure 2 A flowchart of step 101 provided for an exemplary embodiment of this disclosure;

[0060] Figure 3 A flowchart of step 102 provided for an exemplary embodiment of this disclosure;

[0061] Figure 4 A flowchart of step 103 provided for an exemplary embodiment of this disclosure;

[0062] Figure 5 A flowchart of a system configuration process provided as an exemplary embodiment of this disclosure;

[0063] Figure 6 A schematic diagram of an industrial Ethernet ring network topology based on Ethernet technology is provided as an exemplary embodiment of this disclosure;

[0064] Figure 7 A schematic diagram of an I / O remapping provided for an exemplary embodiment of this disclosure;

[0065] Figure 8 This is a schematic diagram illustrating an MPU initialization address allocation process as provided in an exemplary embodiment of the present disclosure.

[0066] Figure 9 A routing diagram between a master station and a slave station is provided as an exemplary embodiment of this disclosure;

[0067] Figure 10 A schematic diagram of an MPU memory address configuration partition provided as an exemplary embodiment of this disclosure;

[0068] Figure 11 A schematic diagram of a fixed address area configuration provided for an exemplary embodiment of this disclosure;

[0069] Figure 12 A schematic diagram of an address configuration based on a compression scheme provided for an exemplary embodiment of this disclosure;

[0070] Figure 13 A schematic diagram of a PLC data processing system based on an industrial Ethernet ring network, provided as an exemplary embodiment of this disclosure;

[0071] Figure 14 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present disclosure. Detailed Implementation

[0072] The present disclosure is further illustrated below by way of embodiments, but the present disclosure is not limited to the scope of the embodiments described herein.

[0073] The prefixes such as "master station" and "slave station" used in this disclosure are merely for distinguishing different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes used to distinguish descriptive objects in this disclosure does not constitute a limitation on the described objects. The description of the described objects is given in the context of the embodiments, and the use of such prefixes should not constitute unnecessary restrictions. Furthermore, in the description of this embodiment, unless otherwise stated, "multiple" means two or more.

[0074] Example 1

[0075] Figure 1 A flowchart illustrating an exemplary embodiment of this disclosure provides a PLC data processing method based on an industrial Ethernet ring network. The industrial Ethernet ring network includes at least one master station and at least one slave station. The master station's memory is divided into a master station fixed address area, a master station dynamic address area, and a data aggregation area. The slave station's memory is divided into a slave station fixed address area and a slave station dynamic address area. The PLC data processing method includes:

[0076] Step 101: Send the data to be processed from each information point in the industrial Ethernet ring network to the data aggregation area of ​​the master station via the slave dynamic address area of ​​the corresponding slave station of each information point.

[0077] Step 101 is the data uplink stage in the PLC data processing method based on an industrial Ethernet ring network of this invention. Its core purpose is to efficiently and orderly collect the data to be processed generated by various information points (such as sensors, actuators, and communication devices) in the industrial field to the data aggregation area of ​​the main station for unified processing by the subsequent logic control unit (ARM). This step is a key link in realizing dynamic address allocation and link optimization of the entire method. It solves the problems of scattered data acquisition, fragmented memory, and low communication efficiency in traditional PLC systems through standardized data paths and memory area collaboration. Step 101 is not an isolated operation, but is closely connected with subsequent steps 102 (ARM processing) and 103 (data downlink) to form a complete data processing closed loop.

[0078] Industrial Ethernet Ring Network: This is an industrial Ethernet ring network topology based on Ethernet technology, in which devices (master and slave stations) are connected in a ring to achieve highly reliable communication. See also Figure 6As can be seen, the core of an industrial Ethernet ring network lies in a ring network consisting of a master station and multiple slave stations connected via industrial Ethernet (illustrated by bidirectional arrows connecting modules). The entire system works collaboratively under the centralized management and scheduling of the logic control unit (ARM).

[0079] Logic Control Unit (ARM): As the "brain" of the system, it is located at the top of the architecture. Its core function is to execute user-preset control logic programs. It interacts with the master station (MPU0) at high speed through a bidirectional data path: on the one hand, it receives input data from the entire network aggregated by the master station and performs calculations; on the other hand, it sends the output instructions generated by the calculations back to the master station.

[0080] Master Station (MPU0): As the control core and data hub of the ring network, it is directly connected to the ARM unit. The master station undertakes the central responsibility of global data aggregation and distribution. Its internal memory is divided into a fixed address area, a dynamic address area, and a data aggregation area (not explicitly shown in the diagram, but implied by its role), used for efficient management of network-wide data.

[0081] Slave stations (MPU1, MPU2, ..., MPUn): Multiple slave stations form the execution layer of the ring network. Each slave station is interconnected with the master station and other slave stations through the ring network. The slave station is responsible for managing locally connected field devices and is the direct node for data acquisition and instruction execution. Each slave station's memory is divided into a fixed address area and a dynamic address area.

[0082] I / O devices and communication devices: Each slave station connects to two types of external devices:

[0083] I / O devices: responsible for interacting with physical processes, acquiring input signals (such as sensor data) and performing output actions (such as driving valves).

[0084] Communication equipment: responsible for data communication with other systems or networks (such as Modbus TCP, Profinet network).

[0085] Further, see Figure 9 It can be seen that a system consisting of one master station (MPU0) and multiple slave stations (MPU1...MPUn) is connected through an industrial Ethernet ring network, and the memory address allocation within the master station and slave stations is shown.

[0086] Each slave station (taking MPUn as an example) has its memory divided into two main areas: a fixed address area and a dynamic address area. The fixed address area stores the device's raw configuration information, diagnostic data, and raw input / output data from the I / O modules. Its addresses are pre-allocated. The dynamic address area is an optimized data region. Internally, it is arranged contiguously in the order of diagnostic information, input data, and output data. Data is moved from the fixed address area through remapping operations (such as I / O remapping table guidance) and stored in this area, ensuring data continuity and no fragmentation. This is precisely the embodiment of "dynamic address allocation."

[0087] The master station (MPU0) memory contains three areas:

[0088] Fixed address area and dynamic address area: Similar in function to slave stations, these areas manage local device data on the master station. Data aggregation area: This is the system's "data hub." It gathers diagnostic and input data from all slave station dynamic address areas, as well as output data ready to be sent to all slave stations. Data in this area is also arranged in contiguous blocks according to slave station number and data type (diagnostics, input, output), providing an efficient and unified access interface for the ARM unit.

[0089] Clear data flow direction (data link):

[0090] Data uplink (collection): Data enters from the slave station's IO communication device, passes through the slave station's dynamic address area, and then through the ring network routing, finally merging into the master station's data aggregation area.

[0091] Central Processing: The Logic Control Unit (ARM) accesses and processes global data in the data summary area.

[0092] Downlink (distribution): The output data generated by the ARM processor starts from the data aggregation area, is distributed to the dynamic address area of ​​the target slave station through the ring network routing, and is finally delivered to the execution device.

[0093] Information point: The smallest logical unit for data generation or consumption in an industrial control system, including input / output (I / O) device signal points (such as sensors and actuators) and communication device signal points (such as network protocol converters and external system interfaces). Optionally, information points are divided into two categories: one is I / O device information points, such as digital input (DI) sensors and analog output (AO) valves. Their data usually needs to be stored in the slave station's fixed address area for raw storage, and then transferred to the dynamic address area after remapping optimization. The other is communication device information points, such as Modbus TCP communication cards and Profinet interfaces. Their data is often directly stored in the slave station's dynamic address area because communication data is inherently structured and continuous. For example, a temperature sensor (I / O device information point) may generate an analog signal, while a Modbus gateway (communication device information point) may receive a control command from an external system. The data of the information point is collected and prepared for uplink in step 101.

[0094] Data to be processed: Data values ​​generated in real time by information points that need to be processed, such as sensor readings, communication messages, and device status. This data may be raw values ​​(such as voltage and current) or formatted data blocks. The data may be scattered and disordered, requiring organization and optimization using the methods of this invention.

[0095] The dynamic address area of ​​each information point corresponds to a specific slave station: each information point is mapped to a specific slave station (e.g., sensor A is connected to slave station MPU1). The slave station dynamic address area is a contiguous address space partitioned from the slave station's memory, used to store optimized (e.g., remapping, compression) data. The dynamic address area acts as a "local distribution center" for data uplink, ensuring that data is organized into a contiguous block structure before transmission, reducing transmission overhead. For I / O device information points, data is first moved from the fixed address area to the dynamic address area through remapping (e.g., using an I / O remapping table); for communication device information points, data is directly written to the dynamic address area. This process eliminates memory fragmentation and improves local data processing efficiency. For example: suppose slave station MPU1 is connected to a 32-channel digital input card (I / O device). Its data is stored scattered in the fixed address area, but through remapping and compression (e.g., compressing 32 digital signals into one address unit), it is organized into a contiguous space in the dynamic address area, ready for transmission.

[0096] Data aggregation area sent to the master station: The data aggregation area is a specific region in the master station's memory used to collect dynamic address area data from all slave stations within the ring network. It is typically arranged in blocks according to slave station number and data type (diagnostic, input, output) to ensure data order and easy access. As the "central hub" for all system data, the data aggregation area provides a unified and continuous data interface for ARM units, avoiding the need for ARM units to access data across multiple scattered addresses, thus significantly improving processing efficiency. When data is sent from the slave station's dynamic address area to the master station's data aggregation area, it is routed according to the ring network routing table. The routing table defines the optimal transmission path, ensuring efficient and reliable data delivery.

[0097] To understand step 101 more concretely, some open-ended examples are provided below:

[0098] Example 1 (IO Device Information Point): Assume an industrial site with multiple temperature sensors (analog inputs) connected to slave MPU2. Sensor data is first stored in the slave fixed address area (raw value) of MPU2. Then, according to the IO remapping table, valid signals (such as filtering unused channels) are remapped and compressed (if digital) into a contiguous space in the slave dynamic address area of ​​MPU2. Finally, based on the ring network routing table, this data is sent to the "input data block" allocated to MPU2 in the data aggregation area of ​​master MPU0.

[0099] Example 2 (Communication Equipment Information Point): A Profibus communication card is connected to the slave MPU3 and receives control messages from the external system. The message data is directly stored in the preset contiguous address space in the slave dynamic address area of ​​the MPU3 (due to the regularity of communication data), and then sent to the "communication input block" in the master station's data summary area through the routing table.

[0100] This differentiated processing (IO devices need to be remapped, while communication devices are stored directly) optimizes the data flow: IO data eliminates fragmentation through remapping, while communication data utilizes its inherent structure to avoid additional processing, thereby improving the overall system response speed and resource utilization.

[0101] "via the corresponding slave station of each information point": This means that each information point is physically or logically bound to a specific slave station (e.g., via hardware wiring or software configuration). If the information point changes (e.g., the device is moved), the system configuration process needs to be rerun to update the mapping, but this is not within the scope of step 101, which assumes that the mapping has been established.

[0102] "Data Summary Area Sent to Master Station": The sending action relies on the ring network routing table, which is generated during system initialization and defines the specific path of data from the source slave station to the target master station. If the network topology changes, the routing table needs to be updated, but this is also handled in the configuration process.

[0103] Step 101 is the core of the data uplink phase in this method. Through local optimization of the dynamic address area and global guidance of the routing table, it achieves efficient aggregation of data from scattered information points to the centralized data aggregation area. This not only eliminates memory fragmentation but also provides a continuous and ordered data foundation for subsequent processing, thereby improving the overall performance, maintainability, and scalability of the PLC system.

[0104] Optionally, step 101 specifically includes:

[0105] Step 1011: In response to the information point being an I / O device, the first data to be processed from the I / O device is stored in the fixed address area of ​​the corresponding first target slave station in the slave station, and according to the preset I / O remapping table, the first data to be processed from the first target slave station is sent from the fixed address area of ​​the slave station to the first contiguous address space of the dynamic address area of ​​the slave station. Optionally, in step 1011, sending the first data to be processed from the fixed address area of ​​the first target slave station to the first contiguous address space of the dynamic address area of ​​the slave station includes: in response to the first data to be processed being a digital signal, storing a preset number of compressed digital signals bit by bit in an address unit; the preset number of compressed signals matches the bit width of the address unit.

[0106] Step 1011 specifically handles data from I / O devices (such as digital / analog input / output modules). It first stores the raw data temporarily in a fixed address area, then optimizes it according to the I / O remapping table and moves it to a dynamic address area, thus transforming the data from "scattered and disordered" to "continuous and orderly." Its core function is to eliminate memory fragmentation of I / O data and lay the foundation for efficient subsequent transmission.

[0107] When the information point is an I / O device: the system detects that the data source is an I / O device (such as a temperature sensor or relay) and triggers this process.

[0108] The first data to be processed from the I / O device is stored in the slave station's fixed address area: raw data (such as sensor readings) is first written to the fixed address area. This area is used to store device diagnostic information, raw configuration, and unprocessed data, ensuring data traceability and offline diagnostic capabilities.

[0109] According to the preset I / O remapping table, data is sent to the first contiguous address space of the dynamic address area. The I / O remapping table is generated by the system configuration process and defines how to filter, organize, and move valid signals from the fixed address area to the contiguous address blocks of the dynamic address area. The remapping process filters out unused signal points (such as channels not enabled by the project) and only moves valid data to avoid resource waste.

[0110] Digital signal compression operation (optional refinement): If the first data to be processed is a digital signal (such as a switch state), bit-by-bit compression is performed: multiple digital signals (e.g., 32 switch signals) are compressed and stored in one address unit. "Preset compression quantity matches the bit width of the address unit" means the compression ratio is optimized based on hardware characteristics; for example, a 32-bit address unit can compress a maximum of 32 digital signals (one signal per bit), maximizing memory utilization. Compression reduces data volume and lowers storage and transmission overhead.

[0111] This step transforms IO data from the "raw warehouse" of the fixed address area into a "standardized package" of the dynamic address area through remapping and compression, ensuring data continuity and compactness and preparing it for high-speed routing.

[0112] For details on the I / O remapping process, please refer to [link / reference]. Figure 7 The process of remapping I / O device signal data from "raw, scattered storage" to "optimized, contiguous storage" and further compression is crucial. This process is the core link in achieving dynamic address allocation, eliminating memory fragmentation, and improving data processing efficiency. The process consists of: Source Data Area (Fixed Address Area): Stores the raw, scattered data from the I / O devices. Data Remapping Area (Dynamic Address Area): After remapping, the effective data is filtered and stored contiguously. Data Optimization Area (Digital Compression): Performs bit-level compression on the remapping digital signals to further improve storage efficiency. The entire process is controlled by the I / O remapping table (…). Figure 7 The logic relationship implied by the arrows in the diagram drives the efficient management of hardware resources through intelligent software configuration.

[0113] 1. Fixed address area

[0114] This area serves as the raw storage repository for I / O signals after they enter the system. It faithfully records all data in the physical order of the hardware channels, including diagnostic information and the raw values ​​of all channels (regardless of whether they are used in the project). This area contains entries such as "IO Diagnostics 1," "IO Channel 1" through "IO Channel 8." "IO Diagnostics 2," "IO Channel 3," and "IO Channel 7" are filled in dark gray, indicating that these channels are configured as "active signals" in the current project; while unfilled white entries represent "invalid or unused signals." The fixed address area provides the most complete data view, facilitating system diagnostics and offline analysis, but its dispersed nature is not conducive to efficient processing.

[0115] 2. Dynamic address area

[0116] This area is an optimized data cache after remapping. It only stores valid signals actually needed by the project and arranges these signals contiguously in memory. The system filters valid signals (gray entries) from the fixed address area according to the I / O remapping table. Then, these valid signals are "moved" to the contiguous address space of the dynamic address area. For example, "IO Diagnostics 2" in the fixed area is remapped to "IO Channel 1" in the dynamic area; "IO Channel 3" in the fixed area is remapped to "IO Channel 2" in the dynamic area. By retaining only valid data and storing it contiguously, the memory fragmentation problem is completely solved. This provides compact, contiguous data blocks for subsequent operations (such as network routing and ARM processing), greatly improving data access and transmission speed. The "IO Channels 1~32" and the ellipsis in the diagram indicate that this area can be dynamically expanded as needed, demonstrating its flexibility.

[0117] 3. Digital compression area

[0118] This area represents further optimization processing of the digital signals in the dynamic address area—bit-by-bit compression. The arrow pointing from the dynamic address area to this area indicates that the source data for the compression operation is remapped, continuous data. The structure of this area is similar to the dynamic area, indicating that the compressed data is also stored continuously. The compression principle is that a 32-bit address unit can store 32 digital signals (each bit stores a switch state). For example, compressing 32 independent digital signals into one address unit reduces memory usage to 1 / 32 of the original. This significantly reduces the storage space occupied by digital signals, further optimizing memory utilization and reducing the amount of data transmitted over the network.

[0119] Step 1012: In response to the information point being a communication device, the second data to be processed by the communication device is stored in the second consecutive address space preset in the dynamic address area of ​​the corresponding second target slave station in the slave station.

[0120] Step 1012 processes data from communication devices (such as network protocol conversion cards and external system interfaces). Communication data is typically inherently structured and continuous, therefore it does not need to be temporarily stored in a fixed address area and can be directly stored in a dynamic address area. Its purpose is to simplify the data processing path, reduce latency, and improve real-time performance.

[0121] When the information point is a communication device: the system identifies the data source as a communication device (such as a Modbus TCP communication card) and triggers this process.

[0122] The second data to be processed by the communication device is stored in the preset second contiguous address space in the dynamic address area of ​​the slave station: communication data (such as network packets) is directly written into the pre-allocated contiguous address block in the dynamic address area without remapping. The "preset second contiguous address space" is automatically allocated according to the communication protocol and data volume during system initialization to ensure that the data is stored in an orderly manner.

[0123] The difference between I / O and IO device processing: I / O data needs to be "coarsely processed" (remapped) through a fixed address area, while communication data, because it is inherently regular, directly enters the "fine processing" stage (dynamic address area), reflecting a differentiated optimization strategy.

[0124] It avoids unnecessary handling steps and reduces processing overhead, making it particularly suitable for communication applications with high real-time requirements.

[0125] Step 1013: Send the data to be processed in the dynamic address area of ​​each slave station to the data aggregation area according to the ring network routing table.

[0126] Step 1013 sends the optimized data from the dynamic address areas of each slave station to the data aggregation area of ​​the master station via the ring network routing table. Its purpose is to achieve global data aggregation, providing a centralized and continuous data interface for the ARM unit and eliminating the complexity of cross-device access.

[0127] The data to be processed in the dynamic address area of ​​each slave station is arranged continuously in the order of diagnosis, input, and output, forming a standardized data block.

[0128] Data is sent to the data aggregation area based on the ring network routing table: The ring network routing table is generated during system configuration and defines the optimal data transmission path from each slave station to the master station. The routing table ensures efficient data transmission in packets (e.g., 128 data packets per packet), reducing network congestion.

[0129] Guided by the routing table, data is efficiently aggregated from scattered slave stations to the master station, avoiding the waste of resources in broadcast communication and improving system response speed.

[0130] To enhance understanding, the following open-ended examples illustrate the application scenarios of step 101:

[0131] Example 1 (IO device processing in step 1011): Assume a water monitoring system has 32 water level sensors (digital inputs) connected to slave station MPU1. The raw sensor data is first stored in the fixed address area of ​​MPU1 (distributed). The system uses the IO remapping table to filter valid signals (e.g., using only 20 sensors), compresses these 20 digital signals into a 32-bit address unit (matching bit width), and then moves them to a contiguous space in the dynamic address area. In this way, the originally dispersed 20 signals are optimized into a compact data block.

[0132] Example 2 (Communication device processing in step 1012): In the same system, there is a Profibus communication card that receives external control commands. The command data is directly stored in the preset continuous address block of the MPU1 dynamic address area (without needing to pass through the fixed address area) because the communication message itself has a regular structure.

[0133] Example 3 (Data routing in step 1013): The dynamic address area data of the MPU1 (including compressed sensor data and communication data) is divided into several data packets (e.g., 128 data packets per packet) through the ring network routing table and sent along the optimal path to the block reserved for MPU1 in the main station data aggregation area.

[0134] These examples demonstrate that step 101 can adapt to different device types and optimize resource usage through differentiated processing.

[0135] "Preset compression quantity matches the address unit's bit width": This statement means that the compression algorithm dynamically adjusts based on the number of bits in the hardware address unit. For example, a 32-bit address unit can compress a maximum of 32 digital signals (one signal per bit), while a 16-bit unit can compress 16. This ensures compression efficiency and hardware compatibility, but does not limit a specific value, maintaining flexibility.

[0136] When is the "ring network routing table" generated? The routing table is automatically generated by the configuration software during system initialization or hardware changes. Step 1013 directly uses the established routing table without real-time calculation, thus avoiding runtime overhead.

[0137] The triggering conditions for steps 1011 and 1012 are: "Responding to information point being IO device / communication device". This is based on system scan results (such as device type identifier) ​​to ensure automated processing without manual intervention.

[0138] Data continuity guarantee: The "contiguous address space" of the dynamic address region is pre-allocated through initial configuration to ensure that data blocks are free of fragmentation. Remapping and compression operations further enhance continuity.

[0139] Step 102: The logic control unit processes the summary data in the data summary area and generates output data.

[0140] Step 102 is the core processing stage in the "PLC Data Processing Method Based on Industrial Ethernet Ring Network" of this invention, immediately following the data uplink stage (step 101). Its core purpose is for the Logic Control Unit (ARM) to process the global data collected in the master station's data aggregation area, execute the user-preset control logic program, and generate output data. This step acts as the "decision center" in the data flow, converting the collected input data into control instructions, providing the foundation for the subsequent data downlink stage (step 103). Step 102 is not an isolated operation but forms a tight closed loop with steps 101 and 103: step 101 ensures efficient data aggregation to the data aggregation area, step 102 performs intelligent processing, and step 103 distributes instructions. By optimizing data access and processing efficiency, this step directly contributes to eliminating response latency and improving overall system performance, and is a key link in realizing dynamic address allocation and link optimization.

[0141] Optionally, step 102 includes:

[0142] Step 1021: The logic control unit accesses the data summary area;

[0143] Step 1021 marks the starting point of the process. The Logic Control Unit (ARM) connects to the physical address space of the master station's data aggregation area via memory mapping or direct address access. The data aggregation area is a specially designated region in the master station's memory used to store aggregated data routed from all slave stations. The access operation ensures that the ARM can obtain a global data view, laying the foundation for subsequent reading and processing. The access process is based on the address mapping table configured during system initialization, allowing the ARM to locate the starting address of the data aggregation area without complex calculations. This reduces access latency and improves real-time performance. This step directly relies on the output of step 101—the data aggregation area has already been filled with optimized data (e.g., arranged in contiguous blocks) by step 101 through the routing table, ensuring efficient access.

[0144] Step 1022: Read the summary data in the data summary area; the summary data is arranged by slave station number and data type;

[0145] In step 1022, the ARM reads data from the data summary area. The arrangement of the summary data is carefully optimized: first, it is grouped by slave station number (e.g., data blocks of MPU0, MPU1...MPUn), and then within each slave station block, it is sorted by data type (e.g., diagnostic information, input data, output data). This structure ensures data continuity and no fragmentation, enabling the ARM to quickly obtain data through sequential reading and reducing random access overhead. The read operation is performed in batches; for example, the ARM may first read all the diagnostic data blocks of all slave stations, and then read the input data blocks. This sequential access utilizes the principle of locality of memory, improving cache efficiency. The optimization of data arrangement stems from the remapping and routing mechanism in step 101, reflecting the synergy of the overall method. The data read in this step is the result of routing and remapping in step 101, ensuring data quality (e.g., reducing volume through digital compression), providing clean and well-organized input for the processing in step 1023.

[0146] Step 1023: Based on the summarized data, execute the preset control logic program to perform calculations and generate the corresponding output data;

[0147] In step 1023, the ARM executes the user-written control logic program (such as PID control, sequential logic, mathematical operations, or communication protocol processing) based on the read summary data. The calculation result is converted into output data, such as control signals (valve opening, motor speed) or communication responses (Modbus reply messages). This step is the core of "intelligent processing," converting input data into instructions. The control logic program is preset by the user during the engineering configuration phase (e.g., written using dedicated software), and loaded and executed by the ARM at runtime. The calculation process utilizes the continuous characteristics of the data summary area, avoiding multiple accesses to scattered data, thereby improving computational efficiency. For example, for analog data processing, the ARM may perform floating-point operations; for digital data, it may perform logical bit operations. This step relies on the optimized data provided in step 1022 to ensure high-speed completion of the calculation. The generation of output data directly prepares for step 1024, forming a processing pipeline.

[0148] Step 1024: Write the output data into the pre-allocated output data block in the data summary area.

[0149] In step 1024, the ARM writes the generated output data into a pre-allocated specific area within the data aggregation area—the output data block. This area is reserved during system initialization based on the hardware scan results, ensuring contiguous storage of the output data and avoiding fragmentation. The write operation completes the processing phase, enabling the downstream distribution of the output data. The size and location of the output data block are defined by the address configuration table, typically grouped by slave station and data type (e.g., MPU0 output block, MPU1 output block). The ARM directly uses the pre-allocated address during writing, eliminating the need for dynamic memory management and reducing overhead. The output data maintains a contiguous block structure, facilitating routing in step 103. The output data in this step serves as the input for step 103, which distributes this data back to the corresponding slave station based on the routing table. This ensures the integrity of the entire data flow loop.

[0150] To enhance understanding, the following open-ended application examples are provided:

[0151] Example 1: Temperature Control System

[0152] In the constant temperature control scenario, the data aggregation area collects data from multiple temperature sensors (from step 101). In step 1022, the ARM reads this data (e.g., sensor values ​​are stored consecutively according to slave station number), in step 1023 executes the PID control algorithm to calculate the heater output value (e.g., generating an analog signal), and in step 1024 writes the output data into the output data block of the data aggregation area (e.g., into the output block of MPU0). The output data is then distributed to the heater actuator by step 103.

[0153] Example 2: Multi-device coordination system

[0154] In a manufacturing production line, the data aggregation area contains sensor status, encoder readings, and communication commands. In step 1023, the ARM executes a sequential logic program to generate motor start / stop commands and robot control signals, and writes these to the output data block in step 1024. The output data may include digital signals (such as relay control) and communication messages (such as Profinet instructions), which are routed to the appropriate devices in step 103.

[0155] Example 3: Communication-intensive applications

[0156] For hybrid protocol systems (such as Modbus and Ethernet / IP), the data summary area stores standardized data blocks. In step 1023, the ARM processes the communication request (e.g., parsing Modbus function codes), generates response data (e.g., register values), and writes it to the output data block in step 1024. The output data is then sent back to the communication device in step 103.

[0157] These examples demonstrate that step 102 can be adapted to various industrial scenarios, optimizing response time and resource utilization through centralized processing.

[0158] "Preset control logic program": The program content is user-defined (e.g., written using IEC 61131-3 language). This invention does not limit the specific logic, but ensures efficient program operation through the optimized structure of the data aggregation area. The program may include error handling, diagnostic routines, etc., but its core focus is on data transformation.

[0159] Memory management of the data aggregation area: Output data blocks are part of the data aggregation area, and their pre-allocation is completed during system initialization (based on hardware scanning), avoiding the overhead and fragmentation of dynamic allocation at runtime. This ensures accurate and efficient write operations.

[0160] Real-time guarantee: The execution of step 102 is usually triggered by the system scan cycle (e.g., every 1-10ms). ARM processing utilizes data continuity to reduce latency and meet the real-time requirements of industrial control.

[0161] Step 102, which centrally processes the optimized data in the data aggregation area through the logic control unit (ARM) to generate output data, is the core link in achieving efficient control in this invention. Its sub-steps (access, read, operation, and write) form an efficient pipeline, utilizing data continuity and pre-allocated memory to improve processing efficiency. Step 102 is seamlessly connected with the preceding and following steps, jointly solving the response delay and resource waste problems of traditional PLC systems, and demonstrating the integrity of dynamic address allocation and link optimization.

[0162] Step 103: Send the output data from the data aggregation area to the corresponding slave station's dynamic address area.

[0163] Step 103 is the downlink data stage in the "PLC Data Processing Method Based on Industrial Ethernet Ring Network" of this invention, following the uplink data stage (step 101) and logic processing stage (step 102). Its core purpose is to efficiently and accurately send the output data generated by the Logic Control Unit (ARM) in step 102 from the master station's data aggregation area back to the corresponding slave station's dynamic address area, thereby completing the final distribution and execution of control commands. This step achieves a closed-loop data flow: after data is collected from field devices, it is uplinked, processed, and finally downlinked back to the execution end, ensuring real-time system response and control reliability. Step 103 is not an isolated operation but is closely integrated with steps 101 and 102: step 101 optimizes the uplink data path, step 102 generates intelligent output, and step 103 completes command distribution through a routing mechanism. This step, by optimizing the data transmission link, solves the problems of high command distribution latency and path redundancy in traditional PLC systems, directly contributing to improved overall system performance and maintainability.

[0164] Optionally, step 103 includes:

[0165] Step 1031: Determine the third target slave station corresponding to the output data;

[0166] Step 1031 marks the beginning of the downlink data transmission and aims to identify the target recipient of the output data—the "third target slave station." The output data, generated in step 102, may include control commands (such as valve opening or motor speed) or communication responses (such as protocol messages). Each output data is associated with a specific slave station; for example, a command to control valve A should be sent to the slave station connected to valve A (such as MPU1). Identifying the target slave station ensures accurate delivery of commands and avoids resource waste caused by mistransmissions or broadcasts.

[0167] The system parses target information from the output data, such as slave station number, device address, or signal point mapping. This information is defined through an address configuration table during system initialization to ensure consistency. For example, the output data block may contain metadata (such as header information) indicating its target slave station. Accurate target identification provides a foundation for subsequent routing, improving system reliability.

[0168] Step 1032: Determine the routing path from the data aggregation area to the slave dynamic address area of ​​the third target slave station based on the ring network routing table;

[0169] Step 1032, after determining the target slave station, uses the ring network routing table to plan the optimal transmission path for data from the master station's data aggregation area to the target slave station's dynamic address area. The routing table is a critical resource generated during system configuration, defining the communication paths between all devices within the ring network to ensure efficient and reliable data transmission.

[0170] Querying the routing table: The system queries the routing table based on the target slave station number (e.g., MPU1) to obtain path information from the master station (MPU0) to the target slave station. The routing table may contain parameters such as hop count, bandwidth priority, or failover paths.

[0171] The introduction of routing tables optimizes data transmission efficiency, reduces latency and network load, and improves system scalability and fault tolerance. The generation and update mechanism of the routing table is defined in the system initialization process to ensure synchronization with hardware changes.

[0172] Step 1033: Based on the routing path, send the output data from the data aggregation area to the slave dynamic address area of ​​the third target slave station.

[0173] Step 1033 is the data downlink execution phase. Based on the routing path determined in step 1032, the output data is actually transmitted from the master station's data aggregation area to the target slave station's dynamic address area. The dynamic address area is a contiguous memory area on the slave station's local machine used to store data to be executed, ensuring fast instruction access and execution.

[0174] Data Packaging: Output data is extracted from the output data blocks in the data aggregation area and packaged according to network protocols (such as industrial Ethernet frames), with the target address and verification information added.

[0175] Transmission: Data packets are sent through the ring network physical link and reach the target slave station along the routing path. After receiving the data, the slave station stores it in a designated location in the dynamic address area (such as an output data block).

[0176] Local execution: The target slave station drives the local device (such as an I / O module or communication interface) based on the data in the dynamic address area to complete the instruction execution.

[0177] Guided by the routing path, precise point-to-point transmission was achieved, broadcast overhead was reduced, and real-time command and data integrity were ensured.

[0178] To enhance understanding, the following open-ended application examples are provided:

[0179] Example 1: Industrial temperature control system

[0180] In the constant temperature control scenario, step 102 generates heater control data (such as analog output values). Step 1031 determines the target slave station as MPU2 (connected to the heater); step 1032 determines the path based on the routing table (such as a direct link); step 1033 sends the data to the dynamic address area of ​​MPU2 to drive the heater to adjust its power.

[0181] Example 2: Multi-axis motion control

[0182] In the industrial robot system, step 102 calculates the joint motor commands. Step 1031 identifies the target slave station (e.g., MPU3 corresponds to the arm command, and MPU4 corresponds to the wrist command); step 1032 queries the routing table to obtain the optimal path (e.g., avoiding congested links); step 1033 issues commands to the dynamic address area to control the motor movement.

[0183] Example 3: Hybrid Communication Network

[0184] For multi-protocol systems (such as Modbus and Profinet), step 102 generates a protocol response. Step 1031 determines the target slave (e.g., a Modbus response is sent to MPU5); step 1032 plans a path using a routing table; step 1033 sends data to the dynamic address area of ​​MPU5, and the output is executed by the communication card.

[0185] These examples demonstrate that step 103 can adapt to diverse working conditions, ensuring that instructions are executed efficiently and accurately.

[0186] The meaning of "third target slave": "third" may refer to an exemplary identifier (such as first, second, and third slaves). In the actual system, the target slave is determined by the output data content (such as through an address mapping table).

[0187] Dynamic nature of the routing table: The routing table is generated during system initialization, but it can be updated through a configuration process in response to hardware changes (such as the addition of devices) to ensure that the path is always optimal. Step 103 does not require real-time path calculation; it directly queries the established routing table, reducing overhead.

[0188] Step 103 completes the downlink data phase by determining the target slave station, querying the routing table, and sending data according to the path, achieving efficient and accurate distribution of control commands. Its reliance on the routing table and optimized memory architecture ensures fast system response and strong scalability. Step 103 seamlessly connects with steps 101 and 102, collectively demonstrating the overall value of this invention's dynamic address allocation and link optimization.

[0189] Optionally, the PLC data processing method also includes a system configuration process, which is triggered by at least one of the following events: the initial construction of the industrial Ethernet ring network, hardware device change events in the industrial Ethernet ring network, and user configuration instructions;

[0190] The system configuration process is the preliminary foundational stage in the "PLC Data Processing Method Based on Industrial Ethernet Ring Network" of this invention. It provides crucial configuration support for the entire data processing flow (including data uplink, ARM processing, and data downlink). This process aims to initialize and optimize the system memory area by using automated tools to scan hardware devices, generate configuration tables, and download them to the devices, ensuring the efficiency, reliability, and scalability of data processing. Triggered by specific events (such as initial setup, hardware changes, or user commands), the system configuration process demonstrates the dynamic adaptability of the method, responding to system changes without manual intervention. This directly solves the problems of cumbersome configuration and poor maintainability in traditional PLC systems. This process is closely integrated with subsequent steps 101, 102, and 103: configuration tables (such as IO remapping tables and ring network routing tables) directly guide data uplink, processing, and downlink operations, forming a complete closed-loop system.

[0191] The system configuration process includes:

[0192] Step 1041: Analyze the hardware devices in the industrial Ethernet ring network to identify each information point;

[0193] Step 1041 marks the starting point of the configuration process. Dedicated software (such as a configuration tool) scans all hardware devices (e.g., master, slave, I / O modules, communication cards) within the industrial Ethernet ring network, identifying each information point (e.g., sensor, actuator, protocol interface) and its type (digital, analog, communication signal). The identified information includes device address, number of signal channels, and data type, providing the foundation for subsequent configuration. The software sends a scan command (e.g., a broadcast request), and the devices respond, returning their own configuration information (e.g., device ID, number of supported channels). The software then aggregates this information to create a device list and information point mapping. Automated scanning avoids the errors and inefficiencies of manual configuration, ensuring the system identifies all hardware resources and laying the foundation for dynamic address allocation.

[0194] The identified information points are used for configuration table generation in step 1042, directly affecting data remapping in step 101 and routing operations in step 103. For example, the scan results determine the contents of the IO remapping table.

[0195] Step 1042: Based on the statistical results, generate an address configuration table, an IO remapping table, and a ring network routing table; wherein, the address configuration table defines the address mapping of information points in memory, the IO remapping table defines data remapping and compression operations, and the ring network routing table defines the routing path of data between the master station and the slave station.

[0196] Step 1042: Based on the scan results from step 1041, the software automatically calculates and generates three types of key configuration tables:

[0197] Address configuration table: Defines the specific address mapping of each information point in memory. For example, it specifies which location in the fixed address area or which contiguous block in the dynamic address area a certain sensor's data is stored in. This ensures that memory allocation is ordered and fragment-free.

[0198] I / O remapping table: Guides data remapping and compression operations. For example, it defines how to move raw data from I / O devices from the fixed address area to the dynamic address area and includes digital compression rules (such as compressing 32 digital signals into one address unit). This optimizes memory utilization and data processing efficiency.

[0199] Ring network routing table: Defines the routing path of data between the master and slave stations. For example, it specifies how input data from slave station MPU1 is routed to the master station's data aggregation area. This ensures efficient and reliable data transmission.

[0200] The software uses algorithms (such as optimization algorithms to calculate the minimum resource overhead) to calculate a configuration table based on the scan results. For example, it allocates contiguous address space and generates routing paths based on the number and type of devices.

[0201] Automatically generated configuration tables eliminate the complexity of manual configuration, improving accuracy and efficiency. These tables are the core basis for subsequent data processing steps, directly supporting dynamic address allocation and link optimization.

[0202] The generated I / O remapping table is used for data remapping in step 101 (such as I / O device processing), and the ring network routing table is used for data routing in steps 101 and 103. The address configuration table defines the memory layout and affects the execution of all steps.

[0203] For details, please refer to Figure 8 This process demonstrates how an MPU starts from an initial fixed address space and, through a series of sequential steps, intelligently and continuously allocates address space for various functional points (diagnostic points, input / output signal points) in the system, thereby achieving efficient memory utilization and fragmentation-free management. Its core logic lies in: after allocating the address for each functional module, the global address parameter pointer is immediately updated (refreshed) to provide an accurate starting position for the allocation of the next module. This "allocation-refresh-reallocation" mechanism ensures the continuity and compactness of the entire address space.

[0204] 1. Initialization Phase

[0205] Steps: The process begins with allocating a fixed address area (address range: 0x0000-0x0300). This area is used to store the system's most basic and fixed configuration information.

[0206] Next, address parameters are initialized, setting the starting address for diagnostics, input, and output to 0x0300. This indicates that dynamic allocation will begin after the fixed address range.

[0207] 2. Diagnostic information address allocation

[0208] Steps: First, allocate diagnostic points for the MPU controller (address range: 0x0300-0x0309), which occupy 10 address units.

[0209] Address Parameter Refresh: Upon completion, the address parameters are refreshed immediately. The diagnostic start address remains unchanged (0x0300), while the input and output start addresses are updated to the next available address, 0x030A. This ensures that subsequent input / output data does not overlap with the diagnostic information addresses.

[0210] Steps: Next, allocate diagnostic points for the communication network ports (taking ports 2-5 as an example). Starting from the input address 0x030A, allocate continuous space for each network port (e.g., port 2: 0x030A-0x0329), for a total of 4 network ports.

[0211] Address Parameter Refresh: After allocation, refresh the parameters again. The input starting address is updated to 0x038A, which will serve as the starting point for the next function point allocation.

[0212] 3. Input signal address allocation

[0213] Steps: Allocate I / O device input signal points. Starting from the current input start address 0x038A, allocate continuous space up to 0x0479, covering the diagnostic and input data of the I / O card.

[0214] Address parameter refresh: At this point, the output start address is updated to 0x047A, preparing for the allocation of output signals. It is worth noting that the input start address is reset to 0x0300, which may mean that the allocation of input addresses has a separate plan, or that there is a branch process here (such as allocating another type of input signal).

[0215] Steps: Allocate input points for the communication network ports. Starting from the output start address 0x047A (which temporarily replaces the continuation of the input block), allocate continuous input data space for ports 2-5, up to 0x0879.

[0216] 4. Output signal address allocation

[0217] Steps: Allocate I / O device output signal points. After refreshing the parameters, start allocating from the new output starting address 0x087A to 0x08F1.

[0218] Step 1: Finally, allocate communication network port output points. Starting from the updated output start address 0x08F2, allocate space for network ports 2-5 until the process ends at address 0x0AF1.

[0219] Address allocation is not pre-defined and statically assigned, but dynamically calculated based on the actual configuration (such as the number of network ports and signal points). The "address parameter refresh" step in the diagram is crucial, enabling scalable address allocation. By continuously updating the starting address, it ensures that the data of each functional module is stored contiguously in memory, fundamentally eliminating memory fragmentation. The entire process can be automated by software, eliminating the need for manual address calculation and allocation, significantly reducing the complexity and error rate of project configuration, and achieving "one-click generation" of address mappings. The allocation order follows the logic of "diagnosis -> input -> output," resulting in a clear structure that facilitates system management and data addressing.

[0220] Further references can be made. Figure 10 The MPU memory address configuration partition definition allocates memory, and the memory is divided into three logical regions:

[0221] One of the logical regions, the Fixed Address region (Fixed Addr): Address range 0x00000000-0x000002FF. This region is used to store the most basic and fixed information of the system, such as hardware flags, raw diagnostics and data from I / O cards, and the overall status of the ring network. Its characteristic is that the address is pre-fixed, facilitating offline diagnostics and external system monitoring. Further details can be found in [reference needed]. Figure 10 The memory mapping specifications for the fixed address area during system initialization are defined. This configuration table is a storage blueprint for basic system parameters and global control flags, providing stable underlying support for the entire PLC data processing method.

[0222] Configuration Item Classification and Function: The configuration items in the table can be divided into three main categories:

[0223] 1. System global status flags:

[0224] ARM configuration complete: Address 0x00000000, length 1 unit. Used as a flag to indicate system configuration status upon completion of online configuration.

[0225] IDE commands (addresses 0x00000001 to 0x00000002): These are system-level commands used to set the MPU's IP address, switch between debug and run modes, and so on. These are key switches for controlling system behavior.

[0226] 2. Communication Port Parameter Area:

[0227] The configuration parameters for network ports 2 to 5 (addresses 0x00000003 to 0x0000000E) predefine the storage locations for the starting address and quantity of diagnostic information, the starting address and quantity of input data, and the starting address and quantity of output data for each network port (2, 3, 4, 5). This is essentially a pointer table; the system can determine the specific location of the data block corresponding to each network port in the dynamic address space by querying this table. This design decouples hardware ports from data addresses. When hardware changes, only the pointers in this table need to be updated, without altering the layout of the entire data area, greatly enhancing the system's configurability and scalability.

[0228] 3. Reserved space (starting from address 0x0000000F, length 241 units): Memory space reserved for future system function expansion, reflecting the forward-looking design.

[0229] Logical Region Two: Dynamic Address Area (Dynamic Addr): Address range 0x00000300-0x00000AF1. This is the core area of ​​the optimized design of this invention. It stores all valid signal points that need to participate in real-time data processing in a strict order, including: diagnostic points of the MPU controller itself; diagnostic points of each communication card network port (e.g., network ports 2 to 5); input / output data points of IO devices; and input / output data points of communication network ports. All data is arranged continuously and without fragmentation within this area, laying a solid foundation for subsequent efficient data remapping, compression, and routing.

[0230] Logical Area Three: Data Summary Area: Starting at address 0x00000AF2. This area is dynamically allocated according to the routing policy and is used to aggregate data from all devices within the ring network (in the master station) or receive data from the master station (in the slave stations). Its size is dynamic, reflecting the system's flexibility.

[0231] The table provides the start address, end address, and length for each function point. The length, in 64-bit units, indicates the amount of memory space occupied by that function point, providing a precise quantitative basis for system configuration.

[0232] Step 1043: Download the address configuration table, IO remapping table, and routing table to the master station and slave station to configure the master station's fixed address area, master station's dynamic address area, data aggregation area, slave station's fixed address area, and slave station's dynamic address area.

[0233] Step 1043: Download the generated configuration table to the storage of the master station and slave station, thereby initializing or reconfiguring the memory areas, including the master station fixed address area, master station dynamic address area, data aggregation area, slave station fixed address area, and slave station dynamic address area. The download operation ensures that all devices use a unified configuration, enabling system collaboration.

[0234] The software transmits the configuration table to each device via network communication (such as the Industrial Ethernet protocol). Upon receiving the configuration table, the devices set the starting address, size, and layout of their memory regions. For example, the master station's data aggregation area is divided into block structures based on the routing table.

[0235] The download configuration enables "one-click configuration" or online updates, simplifying user operations and improving system maintainability. Optimized memory region configuration (such as contiguous address allocation) directly eliminates fragmentation and improves subsequent data processing speed.

[0236] After configuration, steps 101, 102, and 103 can be executed efficiently. For example, the remapping in step 101 depends on the IO remapping table, and the routing in step 103 depends on the ring network routing table.

[0237] The system configuration process is triggered by at least one of the following events to ensure dynamic adaptability:

[0238] Initial setup of an industrial Ethernet ring network: When the system is first built, a configuration process is triggered to initialize all settings. For example, when deploying a PLC system in a new factory, the hardware is automatically scanned and a configuration is generated.

[0239] Hardware change events in industrial Ethernet ring networks: When devices are added, deleted, or replaced (such as adding an I / O module), reconfiguration is triggered to adapt to the changes. For example, after expanding the number of slave stations, the system automatically updates the routing table and address allocation.

[0240] User configuration commands: Users can manually trigger configurations through the software interface, for example, during debugging or when forcing updates. This provides flexibility.

[0241] These triggering mechanisms enable the system to respond to changes and avoid interruptions, which is highly consistent with the overall approach goals (scalability and maintainability). The configuration process and data processing steps (101-103) are seamlessly integrated: the configuration table provides rules for data processing, and data processing depends on the configuration table for execution, forming a closed loop.

[0242] To enhance understanding, the following open-ended application examples are provided:

[0243] Example 1: Initial Scene Construction

[0244] In a newly installed industrial control system, the configuration process is automatically triggered after the user starts the system. Step 1041 scans all connected devices (e.g., three slave MPUs (MPU1-MPU3), each with an I / O module and communication card) and identifies information points (e.g., temperature sensors, Modbus gateways). Step 1042 generates configuration tables: the address configuration table defines that sensor data is stored in a fixed address range of 0x1000-0x10FF, the I / O remapping table specifies digital compression rules (compressing 32 signals to 1 unit), and the ring network routing table sets the data routing path for MPU1. Step 1043 downloads the configuration tables and initializes the memory area. Afterwards, step 101 utilizes these tables to efficiently process data.

[0245] Example 2: Hardware Change Scenario

[0246] During system operation, a user adds a slave MPU4 (with analog input module). The hardware change event triggers the configuration process as follows: Step 1041: Rescan to identify the new device; Step 1042: Update the configuration table (e.g., extended address allocation and routing path); Step 1043: Download the new configuration. The system seamlessly integrates the new device without downtime.

[0247] Example 3: Triggered by user command

[0248] During maintenance, users can trigger the configuration process by clicking "Reassign Address" in the software. Steps 1041-1043 regenerate and download the configuration table, optimize memory layout (such as compressing unused space), and improve system performance.

[0249] These examples demonstrate that the system configuration process can adapt to various operating conditions, ensuring that the system always runs efficiently.

[0250] Identification of "information points": Information points include I / O device signal points (such as sensors and actuators) and communication device signal points (such as protocol interfaces). Identification is based on hardware scan results (such as device model and number of channels), not manual input.

[0251] Algorithm for generating the configuration table: The algorithm aims to minimize resource overhead (such as memory usage and routing hop count), but this invention does not limit the specific algorithm and retains flexibility. For example, a greedy algorithm can be used to allocate contiguous addresses.

[0252] Reliability of the download process: The download process may include verification mechanisms (such as CRC check) to ensure data integrity, but this invention focuses on configuration logic, and the underlying transmission is guaranteed by the industrial Ethernet ring network protocol.

[0253] The system configuration process (step 104) provides an optimized memory and routing foundation for PLC data processing through automated scanning, configuration table generation, and configuration download, ensuring the system's efficiency, scalability, and maintainability. Its dynamic triggering mechanism enables the system to adapt to changes and seamlessly connect with subsequent steps, jointly realizing the core value of this invention: dynamic address allocation and link optimization.

[0254] The following content supplements Example 1, providing a detailed implementation example of the PLC data processing method. The implementation process is based on a PLC system built on an industrial Ethernet ring network. Through the synergy of address region design, memory optimization algorithms, and data routing mechanisms, dynamic address allocation and link optimization are achieved. Specifically, it includes the design scheme, implementation steps, and example analysis.

[0255] a. Design scheme

[0256] The implementation of this example is based on the following design scheme to ensure efficient and orderly data flow:

[0257] System Engineering Setup: The system is constructed using a tree structure. Users create the master station (MPU0) and slave stations (MPU1...MPUn) using dedicated software, add I / O devices and communication devices, and configure the signal points for each device. After compilation, the system automatically generates I / O configuration tables, communication configuration tables, I / O remapping tables, network port address information tables, device routing tables, and a master data table, and downloads them to the logic control unit (ARM) to complete project initialization.

[0258] Ring network data flow: Clearly define the data path within the ring network. I / O device data is first stored in the slave station's fixed address area, then optimized by the I / O remapping table and transferred to the slave station's dynamic address area. Finally, it is sent to the master station's data aggregation area via the ring network routing table. Communication device data is directly stored in the slave station's dynamic address area and routed to the data aggregation area. After processing the data, the ARM output data is routed in reverse order to the corresponding slave station.

[0259] Fixed address area composition: The fixed address area of ​​the master station and slave station (such as the address range 0x00000000-0x000002FF) stores device diagnostic information, IO card data and ring network status, and serves as the source area for data remapping, supporting offline diagnostics.

[0260] IO remapping table generation: Based on the signal points configured by the user, the software automatically generates a remapping table to guide the data to be moved from the fixed address area to the continuous space of the dynamic address area. During the process, digital signals are compressed bit by bit (e.g., 32 digital signals are compressed into one address unit).

[0261] Dynamic address area structure: The dynamic address area of ​​each slave station is independently divided, and the data is arranged continuously in the order of diagnostics, input, and output. For example, MPU diagnostic points occupy 10 address units, communication port diagnostics occupy 32 units, IO input points occupy 100 units, communication input points occupy 256 units, and output points are similar.

[0262] Routing table generation: The routing table defines the path of data between the master station and the slave station, ensuring that data blocks in the dynamic address area are routed to the data aggregation area continuously and without fragmentation.

[0263] Data aggregation area structure: The main station data aggregation area is arranged in blocks according to slave station number and data type, aggregating data from the entire ring network and supporting efficient ARM access.

[0264] b. Implementation steps

[0265] The implementation steps of this method are performed sequentially, including:

[0266] Step 1: System Initialization

[0267] Step 101: Initialize the fixed address area (default size 6KB) of each MPU to store controller configuration, diagnostic information and I / O device data.

[0268] Step 102: Add an IO device and name the channel.

[0269] Step 103: Add communication devices and configure protocol signal points.

[0270] Step 104: Save the project and complete the build.

[0271] Step 2: Address allocation for a single device

[0272] Step 201: Manually or automatically trigger address allocation to generate the first offset address of the signal point.

[0273] Step 202: Count the number of diagnostics, inputs, and outputs, update address parameters, generate an I / O remapping table, and construct a dynamic address area.

[0274] Step 3: System Diagnosis and Address Check

[0275] Step 301: Connect the device and verify hardware resources.

[0276] Step 302: Check address continuity and signal name uniqueness; reinitialize if abnormal.

[0277] Step 4: System Compilation and Route Generation

[0278] Step 401: Count the amount of ring network data and divide the data aggregation area.

[0279] Step 402: Generate the ring network routing table.

[0280] Step 403: Calculate the second offset address of the signal point and generate a signal point table for use by the ARM.

[0281] Step 5: Configure Download and Verification

[0282] Step 501: Download the routing table and remapping table to the MPU, and build the dynamic address area and data aggregation area.

[0283] Step 502: Import the signal point table into the ARM and establish data interaction.

[0284] Step 503: Confirm whether the IO task time and resource utilization meet expectations.

[0285] c. Specific examples

[0286] To further illustrate the advantages of the PLC data processing method based on an industrial Ethernet ring network, the performance of different address allocation schemes is compared through three specific examples. The examples are based on an industrial Ethernet ring network system consisting of 10 slave stations (MPU1 to MPU10), and are verified using uniform data parameters: each slave station has 10 diagnostic points, each communication device has 32 diagnostic points on its network ports, 100 I / O input points (50% of which are digital signals), 256 communication input points, 40 I / O output points (50% of which are digital signals), and 128 communication output points. The data volume of a single slave station example is the sum of diagnostic, input, and output data, calculated as: 10 (diagnostic) + 32 × 3 (communication diagnostic) + 100 (I / O input) + 256 × 3 (communication input) + 40 (I / O output) + 128 × 3 (communication output) = 1398 address units.

[0287] Example 1 (Fixed Address Scheme):

[0288] This example uses a traditional fixed address allocation scheme. The system uses 4GB of memory, with the fixed address area occupying 4608 bytes (approximately 36KB). The data storage starting address of the master station MPU0 is 0x00100000, and subsequent slave stations offset the address accordingly. Each slave station occupies 1,048,576 DDR addresses, of which a large number of addresses are reserved (approximately 829,824), resulting in low memory utilization. Each network port diagnostic point of the communication device is allocated 512 resources, and input and output data points are each allocated 8192 addresses, with a single communication device occupying 16,896 DDR spaces. Due to the discontinuous and fragmented data addresses, routing efficiency is low: each slave station needs to send its own diagnostic and input data to the master station, including 1 packet of MPU diagnostic data, 3 packets of communication diagnostic data, 1 packet of IO input data, and 6 packets of communication input data, totaling 11 packets; the 9 slave stations send a total of 99 packets. The master station MPU0 needs to send output data to each slave station, including 1 packet of IO output data and 3 packets of communication output data. Each slave station sends 4 packets, for a total of 36 packets across 9 slave stations. When the Logic Control Unit (ARM) interacts with the MPU, 135 data read / write operations are required due to address dispersion. This instance exhibits a memory utilization rate of only 0.639% and a system response time as high as 64.7ms, resulting in significant address resource waste and data link burden.

[0289] Example 2 (Compression Scheme):

[0290] Building upon Example 1, this example re-plans the addresses, referencing the fixed address partitioning model, and deletes a large amount of reserved space. See details below. Figure 12It can be seen that grouping addresses into sets of 128 ensures the continuity of diagnostic, input, and output data as much as possible. Simultaneously, based on engineering application experience, the amount of communication data is limited, and digital compression is introduced: digital signals are compressed bit-by-bit for storage. For example, 50 digital input signals are compressed into 2 address units, and 20 digital output signals are compressed into 1 address unit, saving a total of 67 address spaces; communication diagnostic points are compressed from 32 bit-by-bit to 14. The example parameters are adjusted as follows: 10 diagnostic points per slave station, 14 diagnostic points per communication port, 100 IO input points (50% digital), 256 IO output points per communication port, 40 IO output points (50% digital), and 128 IO output points per communication port. The data volume for a single slave station example is calculated as: 10 + 14×3 + 100 + 256×3 + 40 + 128×3 - 67 = 1277 address units. The number of routing packets has been reduced: each slave station sends 8 data packets (including 1 packet of diagnostic data, 1 packet of input data, and 6 packets of communication extension input data), for a total of 72 packets across 9 slave stations; the master station sends 4 output data packets per slave station (including IO and communication outputs), for a total of 36 packets across 9 slave stations. Memory utilization has been improved to 83.138%, and system response time has been reduced to 37.8ms, but the amount of communication data is still limited (e.g., the data volume of each network port must be less than or equal to 28 address spaces to be combined with IO devices for packet transmission), making it suitable for small PLC applications.

[0291] Example 3 (Dynamic Address Allocation Scheme):

[0292] The dynamic address allocation and link optimization method of this invention is adopted. The main station's MPU0 memory space is 128KB, and one DDR address corresponds to 8 bytes. Data is divided into approximately 16384 address spaces using individual addresses. The fixed address area is reduced to 768 addresses as needed (corresponding to...). Figure 8 This example inherits the compression scheme from Example 2, but removes the limitations on the number of communication diagnostics and data, supporting expansion to 4 communication devices. Parameters are the same as Example 2, with a single slave instance maintaining 1277 address units of data. Data addresses are completely contiguous, fragment-free, and routing is highly efficient: each slave instance's diagnostic and input data volume is 872 address spaces, requiring 7 packets of routing, totaling 63 packets for 9 slave instances; the master station's output data volume is 405 address spaces, requiring 4 packets of routing, totaling 36 packets for 9 slave instances. Memory utilization reaches 100%, completely eliminating memory fragmentation, optimizing data links, and significantly improving system response time, achieving less than 2ms in small PLC projects. This example demonstrates the significant advantages of this invention in resource utilization, response speed, and scalability.

[0293] Through the comparison of the above examples, the dynamic address allocation scheme (Example 3) of the present invention is superior to the fixed address scheme (Example 1) and the compression scheme (Example 2) in terms of memory utilization, system response time and resource requirements, which verifies the efficiency and practicality of the present invention in industrial Ethernet ring network PLC data processing.

[0294] The software tools, hardware configurations, and algorithm flows (such as system configuration software, I / O remapping table generation tools, routing algorithms, etc.) described in the embodiments are merely one feasible way to implement the present invention. In practical applications, other functionally equivalent tools or methods can be used instead, as long as they can achieve similar dynamic address allocation, memory optimization, and data routing functions. For example, the specific interface, programming language, or operation steps of the configuration software may vary depending on the manufacturer or platform.

[0295] All numerical parameters in this embodiment (such as memory address range, compression quantity, routing packet size, response time threshold, etc.) are example values, calculated based on a specific hypothetical scenario (such as a system with 10 slave stations). In actual implementation, the parameters should be dynamically adjusted according to specific hardware performance, network topology, data volume, or real-time requirements. For example, the address unit width can be 32 bits, 64 bits, or other values; the compression quantity can match the actual bit width; the system response time can vary with the scan cycle. Any mathematical expressions, calculation formulas, or logical rules (such as digital compression algorithms, etc.) are for illustrative purposes only. Those skilled in the art can use mathematically equivalent formulas or algorithms to achieve the same function without affecting the effectiveness of the invention. For example, the compression algorithm can be based on bitmasks, encoding tables, or other optimization techniques; routing calculation can employ strategies such as shortest path and load balancing.

[0296] Example 2

[0297] Corresponding to the aforementioned embodiments of the PLC data processing method based on industrial Ethernet ring network, this disclosure also provides embodiments of the PLC data processing system based on industrial Ethernet ring network.

[0298] Figure 13 A schematic diagram of a PLC data processing system based on an industrial Ethernet ring network, provided as an exemplary embodiment of this disclosure, is shown. The system includes:

[0299] This disclosure provides a PLC data processing system based on an industrial Ethernet ring network. The industrial Ethernet ring network includes at least one master station and at least one slave station. The master station's master station memory is divided into a master station fixed address area, a master station dynamic address area, and a data summary area. The slave station's slave station memory is divided into a slave station fixed address area and a slave station dynamic address area. The PLC data processing system includes:

[0300] The aggregation module 21 is used to send the data to be processed from each information point in the industrial Ethernet ring network to the data aggregation area of ​​the master station via the slave dynamic address area of ​​the corresponding slave station of each information point.

[0301] Processing module 22 is used to process the summary data in the data summary area by the logic control unit and generate output data;

[0302] The distribution module 23 is used to send output data from the data aggregation area to the corresponding slave station's dynamic address area.

[0303] Optionally, the summary module 21 is specifically used for:

[0304] When the information point is an IO device, the first data to be processed of the IO device is stored in the fixed address area of ​​the corresponding first target IO device in the slave station, and the first data to be processed of the first target IO device is sent from the fixed address area of ​​the slave station to the first contiguous address space of the dynamic address area of ​​the slave station according to the preset IO remapping table.

[0305] When the information point is a communication device, the second data to be processed of the communication device is stored in the second continuous address space preset in the slave dynamic address area of ​​the corresponding second target slave in the slave station;

[0306] The data to be processed in the dynamic address area of ​​each slave station is sent to the data aggregation area according to the ring network routing table.

[0307] Optionally, the summary module 21 is specifically used for:

[0308] In response to the first data to be processed being a digital signal, the digital signal of a preset compression quantity is compressed bit by bit and stored in an address unit; the preset compression quantity matches the bit width of the address unit.

[0309] Optionally, the processing module 22 is specifically used for:

[0310] The logic control unit accesses the data aggregation area;

[0311] Read the summary data from the data summary area; the summary data is arranged by slave station number and data type.

[0312] Based on the aggregated data, a preset control logic program is executed to perform calculations and generate corresponding output data.

[0313] Write the output data to the pre-allocated output data block in the data summary area.

[0314] Optionally, the distribution module 23 is specifically used for:

[0315] Determine the third target slave station corresponding to the output data;

[0316] The routing path between the data aggregation area and the slave dynamic address area of ​​the third target slave station is determined based on the ring network routing table;

[0317] Based on the routing path, the output data is sent from the data aggregation area to the slave dynamic address area of ​​the third target slave station.

[0318] Optionally, the PLC data processing system also includes a system configuration module, which is used to respond to at least one of the following events: the initial construction of the industrial Ethernet ring network, hardware device change events in the industrial Ethernet ring network, and user configuration commands;

[0319] The system configuration module is specifically used for:

[0320] The hardware devices in the industrial Ethernet ring network are used to identify various information points.

[0321] Based on the statistical results, an address configuration table, an I / O remapping table, and a ring network routing table are generated. The address configuration table defines the address mapping of information points in memory, the I / O remapping table defines data remapping and compression operations, and the ring network routing table defines the routing path of data between the master station and the slave station.

[0322] Download the address configuration table, IO remapping table, and routing table to the master station and slave station to configure the master station's fixed address area, master station's dynamic address area, data aggregation area, slave station's fixed address area, and slave station's dynamic address area.

[0323] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs.

[0324] Example 3

[0325] Figure 14 This is a schematic diagram of the structure of an electronic device according to an example embodiment of the present disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the PLC data processing method based on an industrial Ethernet ring network as described in any of the above embodiments. Figure 14 The electronic device 90 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0326] like Figure 14As shown, the electronic device 90 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including memory 92 and processor 91).

[0327] Bus 93 includes a data bus, an address bus, and a control bus.

[0328] The memory 92 may include volatile memory, such as random access memory (RAM) 921 and / or cache memory 922, and may further include read-only memory (ROM) 923.

[0329] The memory 92 may also include a program tool 925 (or utility) having a set (at least one) program module 924, such program module 924 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0330] The processor 91 executes various functional applications and data processing by running computer programs stored in the memory 92, such as the PLC data processing method based on an industrial Ethernet ring network provided in any of the above embodiments.

[0331] Electronic device 90 can also communicate with one or more external devices 94 (e.g., keyboard, pointing device, etc.). This communication can be performed through input / output (I / O) interface 95. Furthermore, electronic device 90 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public network, such as the Internet) via network adapter 96. As shown, network adapter 96 communicates with other modules of electronic device 90 via bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.

[0332] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0333] Example 4

[0334] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the PLC data processing method based on an industrial Ethernet ring network provided in any of the above embodiments.

[0335] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0336] Example 5

[0337] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the PLC data processing method based on an industrial Ethernet ring network as described above.

[0338] The program code for executing the computer program product of this disclosure can be written in any combination of one or more programming languages, and the program code can be executed entirely on a user device, partially on a user device, as a stand-alone software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0339] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.

Claims

1. A PLC data processing method based on an industrial Ethernet ring network, wherein the industrial Ethernet ring network includes at least one master station and at least one slave station, characterized in that, The master station's master station memory is divided into a master station fixed address area, a master station dynamic address area, and a data aggregation area; the slave station's slave station memory is divided into a slave station fixed address area and a slave station dynamic address area. The PLC data processing method includes: The data to be processed from each information point in the industrial Ethernet ring network is sent to the data aggregation area of ​​the master station via the slave dynamic address area of ​​the corresponding slave station of each information point. The logic control unit processes the summarized data in the data summary area and generates output data; The output data is sent from the data aggregation area to the corresponding slave station's dynamic address area.

2. The PLC data processing method according to claim 1, characterized in that, The step of sending the data to be processed from each information point in the industrial Ethernet ring network to the data aggregation area of ​​the master station via the slave dynamic address area of ​​the corresponding slave station of each information point includes: When the information point is an I / O device, the first data to be processed of the I / O device is stored in the fixed address area of ​​the corresponding first target slave in the slave station, and the first data to be processed of the first target slave is sent from the fixed address area of ​​the slave to the first continuous address space of the dynamic address area of ​​the slave according to the preset I / O remapping table. When the information point is a communication device, the second data to be processed by the communication device is stored in the second continuous address space preset in the dynamic address area of ​​the corresponding second target slave station in the slave station; The data to be processed in the dynamic address area of ​​each slave station is sent to the data aggregation area according to the ring network routing table.

3. The PLC data processing method according to claim 2, characterized in that, The step of sending the first data to be processed from the first target slave station from the slave station's fixed address area to the first contiguous address space of the slave station's dynamic address area includes: In response to the first data to be processed being a digital signal, a preset number of digital signals are compressed bit by bit and stored in an address unit; the preset number of compressions is matched with the bit width of the address unit.

4. The PLC data processing method according to claim 1, characterized in that, The process of processing the summarized data in the data summary area by the logic control unit and generating output data includes: The logic control unit accesses the data aggregation area; Read the summary data from the data summary area; the summary data is arranged according to slave station number and data type. Based on the aggregated data, a preset control logic program is executed to perform calculations and generate corresponding output data. The output data is written into the pre-allocated output data block in the data summary area.

5. The PLC data processing method according to claim 1, characterized in that, The step of sending the output data from the data aggregation area to the corresponding slave station's slave station dynamic address area includes: Determine the third target slave station corresponding to the output data; The routing path between the data aggregation area and the slave dynamic address area of ​​the third target slave station is determined based on the ring network routing table; Based on the routing path, the output data is sent from the data aggregation area to the slave dynamic address area of ​​the third target slave station.

6. The PLC data processing method according to any one of claims 1 to 5, characterized in that, The PLC data processing method also includes a system configuration process, which is triggered by at least one of the following events: the initial construction of the industrial Ethernet ring network, a hardware device change event in the industrial Ethernet ring network, and a user configuration command. The system configuration process includes: The hardware devices in the industrial Ethernet ring network are statistically analyzed to identify each information point; Based on the statistical results, an address configuration table, an I / O remapping table, and a ring network routing table are generated; wherein, the address configuration table defines the address mapping of the information point in memory, the I / O remapping table defines data remapping and compression operations, and the ring network routing table defines the routing path of data between the master station and the slave station; The address configuration table, the IO remapping table, and the routing table are downloaded to the master station and the slave station to configure the master station fixed address area, the master station dynamic address area, the data aggregation area, the slave station fixed address area, and the slave station dynamic address area.

7. A PLC data processing system based on an industrial Ethernet ring network, wherein the industrial Ethernet ring network includes at least one master station and at least one slave station, characterized in that, The master station's master station memory is divided into a master station fixed address area, a master station dynamic address area, and a data aggregation area; the slave station's slave station memory is divided into a slave station fixed address area and a slave station dynamic address area. The PLC data processing system includes: The aggregation module is used to send the data to be processed from each information point in the industrial Ethernet ring network to the data aggregation area of ​​the master station via the slave dynamic address area of ​​the corresponding slave station of each information point. The processing module is used to process the summarized data in the data summary area by the logic control unit and generate output data; The distribution module is used to send the output data from the data aggregation area to the corresponding slave station's dynamic address area.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes the computer program, it implements the PLC data processing method based on an industrial Ethernet ring network as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the PLC data processing method based on an industrial Ethernet ring network as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the PLC data processing method based on an industrial Ethernet ring network as described in any one of claims 1 to 6.