Distributed PLC device discovery and control system and device
Through the distributed PLC device discovery and control system, the reliability problem of PLC device discovery and control in complex network environments is solved, flexible device discovery and control are achieved, the stability and reliability of the system are improved, and the operation process is simplified.
Patent Information
- Application Number
- CN202510871000.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-30
AI Technical Summary
Existing PLC device discovery and control methods are difficult to achieve reliable device discovery and control in complex and cross-network environments, especially in large factories or cross-regional industrial environments, where network heterogeneity leads to reduced device discovery and control reliability.
A distributed PLC device discovery and control system is adopted, including the host computer front-end module, back-end module, relay module and device response module. Through dynamic configuration and multi-relay collaboration, it realizes the flexible transmission of device discovery and control requests, supports device information filtering and retry mechanism, and ensures stability and reliability in heterogeneous network environments.
It achieves reliable device discovery and control in complex network environments, improves system flexibility and stability, and reduces operational complexity and error risks.
Smart Images

Figure CN120729922A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial control, and in particular to a distributed PLC device discovery and control system and apparatus. Background Art
[0002] With the continuous advancement of industrial automation and PLC equipment, programmable logic controllers (PLCs), as a core component of industrial automation, play a vital role in modern manufacturing. PLCs are widely used in monitoring and controlling various production processes. They receive data from sensors, execute pre-set logic programs, and control the movements of actuators. Therefore, the reliability and maintainability of PLCs are crucial to ensuring the normal operation of production lines.
[0003] Regarding the current state of PLC device discovery and control, in practical applications, PLC devices are often distributed across one or more networks, and the host computer (HMI or SCADA system) must be able to effectively discover and control these devices. Traditional PLC device discovery and control methods rely primarily on fixed network configurations and static device lists. While simple, this approach is insufficient in large-scale and complex industrial network environments, especially in cross-network environments, where device discovery and control become challenging due to factors such as network heterogeneity.
[0004] Currently, common methods for discovering and controlling PLC devices primarily involve using software tools such as the TIA Portal or CodeSys. These tools communicate with PLC devices through specific protocols to enable device discovery and control. While existing PLC device discovery and control methods meet basic requirements to a certain extent, they have obvious limitations in complex network environments, primarily manifested in the following aspects:
[0005] Cross-network compatibility: Existing discovery and control software is primarily deployed on user devices, requiring them to be on the same local area network as the PLC. This creates significant inconvenience in practical applications, especially in large factories or multi-regional industrial environments, where network environments are often complex and different devices may be located in different subnets or even different networks.
[0006] Communication reliability: In an unstable network environment or when there is network heterogeneity, the reliability of device discovery and control will be greatly reduced, or even fail to work properly.
[0007] Patent application document CN117146932A discloses a distributed temperature measurement optical cable material level monitoring system for electrostatic precipitator hoppers in thermal power plants. This invention mainly relates to a distributed temperature measurement optical cable material level monitoring system for electrostatic precipitator hoppers in thermal power plants, which belongs to the field of data acquisition and analysis and does not involve PLC device discovery and control.
[0008] Patent application document CN109067592A discloses an intelligent control device and control method for intelligent power distribution and utilization. The invention mainly relates to an intelligent control device and control method for intelligent power distribution and utilization, belongs to the field of data collection and analysis, and does not involve PLC device discovery and control.
[0009] Patent application document CN102541039A discloses a fully automatic monitoring system for a cutter suction dredger diesel engine group. This invention mainly relates to fully automatic monitoring of diesel engines and auxiliary engines, and can be widely applied to cutter suction dredgers. It belongs to the field of data collection and analysis and does not involve PLC device discovery and control.
[0010] Patent application document CN118827726A discloses a data transmission method, PLC centralized equipment, input / output driver, and system. The method comprises: receiving first business data sent by the input / output driver, the first business data comprising at least first PLC data, the first PLC data being associated with at least one PLC business; processing the data of each PLC business in the first PLC data by a cloud-based PLC module associated with each PLC business to obtain second PLC data for each PLC business; and transmitting the second PLC data to the input / output driver. However, this patent fails to fully resolve existing technical problems and fails to meet the requirements of the present invention. Summary of the Invention
[0011] In view of the defects in the prior art, the purpose of the present invention is to provide a distributed PLC device discovery and control system and apparatus.
[0012] The distributed PLC device discovery and control system provided by the present invention includes: a host computer front-end module, a back-end module, a relay module and a device response module;
[0013] The host computer front-end module is used to receive user instructions and dynamically configure the address information of the back-end module and the relay module;
[0014] The back-end module is used to parse the user instructions received by the host computer front-end module and construct a device discovery request or a control request;
[0015] The relay module is used to receive the device discovery request or control request of the back-end module, and send the device discovery broadcast or control instruction to the local area network through the designated network access terminal;
[0016] The device response module is deployed in the PLC device and is used to respond to the device discovery broadcast or control instruction sent by the relay module and return device information or control feedback.
[0017] Preferably, the host computer front-end module includes:
[0018] A network card information query unit, used to query the relay module for available network access terminals;
[0019] The filtering unit is used to filter and display the device discovery results based on network card information or PLC model;
[0020] The multi-relay coordination unit is used to select multiple relay modules to work in coordination.
[0021] Preferably, the back-end module includes:
[0022] The request encapsulation unit constructs data packets that can be identified by the relay module through RPC or RESTful interface;
[0023] Dynamic routing unit dynamically selects relay modules that meet security standards based on front-end configuration.
[0024] Preferably, the relay module includes:
[0025] Multi-NIC broadcast unit, supports sending broadcasts to all LANs of this device;
[0026] The redundant control unit includes a monitoring service and a backup relay module. When the monitoring service detects that the heartbeat disappears for a preset number of consecutive times, it performs resource cleanup and starts the backup relay module.
[0027] Preferably, the device response module supports returning operation feedback of IP address setting, LED light flashing control, factory setting restoration and device name modification through the relay module.
[0028] Preferably, one of the following deployment methods is included:
[0029] Single device deployment: All modules except the device response module are deployed on the same device;
[0030] Fully distributed deployment: each module is deployed on different devices;
[0031] Backend-relay combined deployment: the backend module and the relay module are deployed on the same device;
[0032] Front-end and back-end combined deployment: The host computer front-end module and back-end module are deployed on the same device;
[0033] Redundant deployment: configure a backup module for the relay module;
[0034] Multi-relay deployment: Configure multiple relay modules in any deployment mode.
[0035] Preferably, the distributed PLC device discovery process includes: the host computer front-end module receives the device discovery instruction and configures the back-end module, the back-end module constructs a discovery request and sends it to at least one relay module, the relay module sends a discovery broadcast to the local area network through the selected network access terminal, the PLC device returns a response to the relay module through the device response module, and the relay module performs multiple retries when no response is received, and returns the result to the host computer front-end module through the back-end module. The host computer front-end module filters and displays the device list according to the network card information or PLC model.
[0036] Preferably, in multiple local area networks, the PLC device discovery method process includes: the host computer front-end module configures multiple relay modules, the back-end module sends a discovery request to all relay modules, each relay module independently sends a broadcast to the local area network where it is located, each relay module collects the response separately and summarizes it through the back-end module, and the host computer front-end module displays a list of cross-local area network devices.
[0037] Preferably, the PLC device control process includes: the host computer front-end module receives the control instruction and selects the network access end, the back-end module constructs the control request and sends it to the relay module, the relay module sends the instruction to the target PLC device, the device response module executes the operation and returns feedback, the relay module retries according to the default configuration when no feedback is received, and the control result is returned to the host computer front-end module via the back-end module for display.
[0038] The distributed PLC device discovery and control apparatus provided by the present invention applies the distributed PLC device discovery and control system.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] (1) Flexible deployment: By distributing the discovery and control modules on different network nodes, the system is not affected by network heterogeneity and can achieve reliable device discovery and control in complex network environments.
[0041] (2) High reliability: With a distributed architecture, even if a node fails, other nodes can continue to work, improving the reliability and stability of the system;
[0042] (3) Simple operation: Users can perform unified operations through the central management system without having to install complex software tools on local management devices, reducing operational complexity and the risk of errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0044] Figure 1 Deploy system architecture for a single device;
[0045] Figure 2 Provides system architecture for distributed deployment;
[0046] Figure 3 Provides system architecture for distributed deployment;
[0047] Figure 4 Provides system architecture for distributed deployment;
[0048] Figure 5 Deploy system architecture for redundant distributed deployment;
[0049] Figure 6 Deploy system architecture for multiple relays. DETAILED DESCRIPTION
[0050] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.
[0051] Example
[0052] The present invention provides a distributed PLC device discovery and control system, comprising:
[0053] 1. System Architecture
[0054] The system consists of four main modules:
[0055] Host computer front-end module: provides user interface, receives user instructions, and manages device discovery and control processes.
[0056] Backend module: parses user instructions and constructs device discovery requests and control requests.
[0057] Relay module: forwards device discovery requests and control requests, and receives device responses.
[0058] Device response module: installed on the PLC device, receives requests and returns responses.
[0059] Among them, the data flow of sending requests is as follows: the host computer front-end module receives the user instructions and sends them to the back-end module; the back-end module receives the user instructions from the host computer front-end module, builds the request and sends it to the relay module; after receiving the request, the relay module sends it to the device response module.
[0060] The device information response data flow is as follows: the device response module responds to the data request and sends it back to the relay module, the relay module receives the data response and sends it back to the back-end module, and the back-end module processes the data response and sends it back to the host computer front-end module for rendering and display.
[0061] 2. Detailed description of module functions
[0062] All communication data is encrypted to ensure confidentiality during transmission.
[0063] (1) Host computer front-end module
[0064] Receive user's PLC device discovery and control instructions.
[0065] Provides a user interface that allows users to select the deployment location of backend modules and relay modules. Dynamically configure the address information of backend modules and relay modules.
[0066] Supports multi-module selection, users can select multiple relay modules to work together.
[0067] Record user preferences and automatically apply them in subsequent operations.
[0068] Supports a retry mechanism for PLC device discovery commands. When a device discovery request does not receive a response, the device discovery request is automatically resent.
[0069] Supports a filtering mechanism for PLC device discovery results, allowing users to filter device discovery results based on specific conditions.
[0070] In particular, users can select filtering conditions on the host computer front-end module. For example, they can filter the scan results based on the network card information used by the current host computer connection and the model information of the target PLC, and display PLC devices that meet user expectations, reducing the display of irrelevant device information.
[0071] It supports querying the relay module for available network access terminals and providing them to users for selection, making it convenient for users to query and control PLC devices in the local area network where the specified network card is located.
[0072] Supports collecting information passed back by the backend module and displaying it on the UI.
[0073] (2) Backend module
[0074] Parses PLC device discovery and control commands transmitted from the front-end module. Specifically, the request command sent by the front-end module is encapsulated into a specific data request message, which is then transmitted to the back-end via an RPC or RESTful interface. Upon receiving the request message from the front-end module, the back-end module deconstructs the corresponding data request information according to the RPC or RESTful protocol and performs further processing based on the actual request data type.
[0075] Construct device discovery and control requests that the relay module can recognize. The relay module and backend module can be located on different devices. Data communication between them can be accomplished via RPC or other message-based middleware, requiring data encapsulation and compression for transmission. Therefore, the process of constructing requests that the relay module can recognize can be summarized as follows: constructing a transmission data packet, writing the request or control command, writing auxiliary parameters, serializing the data packet, and sending the data packet.
[0076] If the front-end module is configured with a relay module, use the relay module configured on the front end; otherwise, dynamically select an appropriate relay module and ensure that the selected relay module meets security standards.
[0077] Supports multi-module collaborative work, that is, multiple relay modules can send device discovery broadcasts and control instructions at the same time.
[0078] Supports collecting information fed back by the relay module and passing it back to the host computer front-end module.
[0079] (3) Relay module
[0080] Receive device discovery requests and control requests sent by the back-end module.
[0081] Supports sending device discovery broadcasts and control instructions to the local area network through the network card based on the network access terminal selected by the user.
[0082] Supports sending device discovery broadcasts and control commands to all local area networks where the device where this module is located is located.
[0083] The system supports a backup and restart function in the event of an abnormality. If a relay module fails, the system automatically switches to a backup relay module, ensuring data transmission security. Specifically, the relay module is configured with a monitoring service that runs in the background, monitoring the relay module's operating status and regularly collecting its heartbeat information. If the monitoring module detects three consecutive heartbeats missing, it will be considered an abnormal relay module and unresponsive. At this point, it will clean up the relay module resources and bring up a backup relay module, thus ensuring continuous system operation.
[0084] Supports collecting information fed back by the device response module and returning it to the back-end module.
[0085] (4) Device response module
[0086] Installed on PLC equipment.
[0087] Receive device discovery broadcasts and control commands sent by the relay module.
[0088] Supports returning device information and control feedback to the relay module.
[0089] 3. Operation process
[0090] (1) PLC device discovery process
[0091] The user triggers the PLC device discovery command on the host computer front-end module.
[0092] The host computer front-end module determines the position of the back-end module and relay module according to the user's selection (optional).
[0093] The host computer front-end module queries the relay module for available network access terminals and provides them to the user for selection (optional).
[0094] The backend module parses the PLC device discovery instructions and constructs a device discovery request.
[0095] The relay module sends a device discovery request to the local area network according to the selected network access terminal.
[0096] The PLC device in the LAN responds to the device discovery request.
[0097] The relay module receives the response from the PLC device. If no discovery response is received, it will retry. After multiple retries, it will pass the final result to the back-end module.
[0098] The back-end module processes the response information of the PLC device, updates the device list, and sends it to the host computer front-end module.
[0099] The host computer front-end module displays the updated device list for users to view.
[0100] The host computer front-end module provides filtering functions to support users to filter and display data.
[0101] (2) Multi-LAN PLC device discovery process
[0102] The user triggers the PLC device discovery command on the host computer front-end module.
[0103] The host computer front-end module determines the positions of the back-end module and relay module 1 to relay module n (n>1) according to the user's selection (optional).
[0104] The host computer front-end module queries multiple relay modules for available network access terminals and provides them to the user for selection (optional).
[0105] The backend module parses the PLC device discovery instructions and constructs a device discovery request.
[0106] Multiple relay modules send device discovery requests to the local area network according to the selected network access terminal.
[0107] The PLC device in the LAN responds to the device discovery request.
[0108] Multiple relay modules receive responses from PLC devices within their respective local area networks. If no discovery response is received, a retry is performed. After multiple retries, the final result is passed to the backend module. In particular, the multiple relay modules are independent of each other and are not interconnected. Deployed on different devices, they interact with the PLC response devices in the local area network where the devices are located. At the same time, they share the same backend module. The backend module sends control and request instructions to all relay modules, which forward them to the PLC response devices in their own local area network. The PLC response devices determine whether a response is required and feed back the response results to their corresponding relay modules. After receiving the information, the relay modules feed it back to the backend module.
[0109] The back-end module processes the response information of the PLC device, updates the device list, and sends it to the host computer front-end module.
[0110] The host computer front-end module displays the updated device list for users to view.
[0111] The host computer front-end module provides filtering functions to support users to filter and display data.
[0112] (3)PLC equipment control process
[0113] The user triggers PLC device control instructions on the host computer front-end module (such as setting IP address, flashing LED light, restoring factory settings, changing device name, etc.).
[0114] The host computer front-end module determines the position of the back-end module and relay module according to the user's selection (optional).
[0115] The host computer front-end module queries the relay module for available network access terminals and provides them to the user for selection (optional).
[0116] The back-end module parses the PLC device control instructions and constructs the device control request.
[0117] The relay module sends the control request to the target PLC device according to the selected network access terminal.
[0118] The target PLC device receives the control instructions through the device response module and performs corresponding operations.
[0119] The target PLC device returns control feedback to the relay module.
[0120] The relay module returns control feedback to the backend module. If no feedback message is received, it decides whether to retry based on the default configuration and feeds back the retry result to the backend module.
[0121] The back-end module returns control feedback to the host computer front-end module.
[0122] The host computer front-end module displays the control results.
[0123] (4) Multi-LAN PLC device control process
[0124] The user triggers PLC device control instructions on the host computer front-end module (such as setting IP address, flashing LED light, restoring factory settings, changing device name, etc.).
[0125] The host computer front-end module determines the positions of the back-end module and relay module 1 to relay module n (n>1) according to the user's selection (optional).
[0126] The host computer front-end module queries multiple relay modules for available network access terminals and provides them to the user for selection (optional).
[0127] The back-end module parses the PLC device control instructions and constructs the device control request.
[0128] Multiple relay modules send control requests to target PLC devices in the local area network according to the selected network access terminals.
[0129] The target PLC device receives the control instructions through the device response module and performs corresponding operations.
[0130] The target PLC device returns control feedback to the relay module.
[0131] The relay module returns control feedback to the backend module. If no feedback message is received, it decides whether to retry based on the default configuration and feeds back the retry result to the backend module.
[0132] The back-end module returns control feedback to the host computer front-end module.
[0133] The host computer front-end module displays the control results.
[0134] 4. Deployment Instructions
[0135] Depending on the module deployment location, it can be divided into the following deployment methods:
[0136] (1) Single device deployment, such as Figure 1 ,Except the device response module, all modules are deployed on the same ,device.
[0137] (2) The first type of distributed device deployment, such as Figure 2 ,All modules are deployed on different devices.
[0138] (3) The second type of distributed device deployment, such as Figure 3 , the backend module and relay module are deployed on the same device.
[0139] (4) The third type of distributed device deployment, such as Figure 4 , the host computer front-end module and back-end module are deployed on the same device.
[0140] (5) Redundant equipment deployment, such as Figure 5 , the relay module has redundant backup. In particular, (1)(2)(3)(4) equipment deployment also supports relay module redundant backup.
[0141] (6) Multi-relay device deployment, such as Figure 6 , there are multiple relay modules. In particular, (1)(2)(3)(4) equipment deployment also supports multiple relay modules.
[0142] The present invention proposes a distributed PLC device discovery and control solution, the key steps of which are:
[0143] 1. Flexible deployment: By distributing the discovery and control modules on different network nodes, it is not affected by network heterogeneity factors and can achieve reliable device discovery and control in complex network environments.
[0144] 2. Back-end module and relay module: adopting a distributed architecture, even if a node fails, other nodes can continue to work, improving the reliability and stability of the system.
[0145] 3. Host computer front-end module: Users can perform unified operations through the central management system without having to install complex software tools on local management devices, reducing operational complexity and error risks.
[0146] The present invention also provides a distributed PLC device discovery and control device, which applies the distributed PLC device discovery and control system.
[0147] Those skilled in the art will appreciate that, in addition to implementing the system, device, and various modules provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, and the like by logically programming the method steps. Therefore, the system, device, and various modules provided by the present invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; the modules for implementing various functions can also be considered both software programs for implementing the method and structures within the hardware component.
[0148] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.
Claims
1. A distributed PLC device discovery and control system, characterized in that: Includes: host computer front-end module, back-end module, relay module and device response module; The host computer front-end module is used to receive user instructions and dynamically configure the address information of the back-end module and the relay module; The back-end module is used to parse the user instructions received by the host computer front-end module and construct a device discovery request or a control request; The relay module is used to receive the device discovery request or control request of the back-end module, and send the device discovery broadcast or control instruction to the local area network through the designated network access terminal; The device response module is deployed in the PLC device and is used to respond to the device discovery broadcast or control instruction sent by the relay module and return device information or control feedback.
2. The distributed PLC device discovery and control system according to claim 1, characterized in that: The host computer front-end module includes: A network card information query unit, used to query the relay module for available network access terminals; The filtering unit is used to filter and display the device discovery results based on network card information or PLC model; The multi-relay coordination unit is used to select multiple relay modules to work in coordination.
3. The distributed PLC device discovery and control system according to claim 1, characterized in that: The back-end module includes: The request encapsulation unit constructs data packets that can be identified by the relay module through RPC or RESTful interface; Dynamic routing unit dynamically selects relay modules that meet security standards based on front-end configuration.
4. The distributed PLC device discovery and control system according to claim 1, characterized in that: The relay module includes: Multi-NIC broadcast unit, supports sending broadcasts to all LANs of this device; The redundant control unit includes a monitoring service and a backup relay module. When the monitoring service detects that the heartbeat disappears for a preset number of consecutive times, it performs resource cleanup and starts the backup relay module.
5. The distributed PLC device discovery and control system according to claim 1, characterized in that: The device response module supports returning operation feedback of IP address setting, LED light flashing control, factory setting restoration and device name modification through the relay module.
6. The distributed PLC device discovery and control system according to claim 1, characterized in that: This includes one of the following deployment methods: Single device deployment: All modules except the device response module are deployed on the same device; Fully distributed deployment: each module is deployed on different devices; Backend-relay combined deployment: the backend module and the relay module are deployed on the same device; Front-end and back-end combined deployment: The host computer front-end module and back-end module are deployed on the same device; Redundant deployment: configure a backup module for the relay module; Multi-relay deployment: Configure multiple relay modules in any deployment mode.
7. The distributed PLC device discovery and control system according to claim 1, characterized in that: The distributed PLC device discovery process includes: the host computer front-end module receives the device discovery instruction and configures the back-end module, the back-end module constructs a discovery request and sends it to at least one relay module, the relay module sends a discovery broadcast to the local area network through the selected network access terminal, the PLC device returns a response to the relay module through the device response module, the relay module performs multiple retries when no response is received, and returns the result to the host computer front-end module through the back-end module, and the host computer front-end module filters and displays the device list according to the network card information or PLC model.
8. The distributed PLC device discovery and control system according to claim 1, characterized in that: In multiple LANs, the PLC device discovery method process includes: the host computer front-end module configures multiple relay modules, the back-end module sends a discovery request to all relay modules, each relay module independently sends a broadcast to its LAN, each relay module collects the response and summarizes it through the back-end module, and the host computer front-end module displays a list of cross-LAN devices.
9. The distributed PLC device discovery and control system according to claim 1, characterized in that: The PLC device control process includes: the host computer front-end module receives the control instruction and selects the network access end, the back-end module constructs the control request and sends it to the relay module, the relay module sends the instruction to the target PLC device, the device response module executes the operation and returns feedback, the relay module retries according to the default configuration when no feedback is received, and the control result is returned to the host computer front-end module through the back-end module for display.
10. A distributed PLC device discovery and control device, characterized in that: A distributed PLC device discovery and control system according to any one of claims 1 to 9 is applied.