Industrial equipment plug and play method and system based on OPC UA
Through the OPC UA information model and PNP service middleware, the automated configuration and integration of industrial equipment are realized, and the data exchange difficulties and manual integration debugging problems between equipment and systems in industrial automation are solved, thereby improving system flexibility and efficiency.
Patent Information
- Application Number
- CN202410966691.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-26
AI Technical Summary
In industrial automation, distributed control systems are difficult to exchange data information due to differences in data models and communication protocol standards between equipment and systems, and the integrated debugging process requires a lot of labor and time, which is susceptible to human errors.
Using OPC UA-based plug-and-play methods and systems for industrial equipment, the OPC UA information model is built for industrial controllers and field devices, and automatic discovery, automatic parameter configuration, automatic integration and replacement of old devices is realized, and PNP service middleware is used. and OPC UA local discovery servers enable automated configuration and interoperability of devices.
Significantly reduces the time engineers have to integrate debug large-scale heterogeneous industrial equipment and systems, eliminates human errors that may be introduced by manual operations, enables automated and efficient device configuration and integration, and reduces deployment and maintenance costs.
Smart Images

Figure CN119030868A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of industrial communication and relates to an OPC UA-based industrial equipment plug-and-play method and system. Background Art
[0002] Distributed control systems in industrial automation provide deep insights for manufacturing companies by collecting and analyzing large amounts of data in real time. This enables companies to make smarter decisions, optimize production processes, and achieve higher levels of automation. This real-time decision-making and response capability enables manufacturing companies to adjust production plans more flexibly to meet the rapid changes in market demand. However, as production needs change rapidly, when industrial control systems are adjusted according to new production needs, they often involve equipment and systems from different manufacturers, which may use different data models and communication protocol standards, resulting in difficulties in data information exchange. At the same time, in the process of integrating and debugging large-scale equipment and systems, in order to connect all devices and work together, engineers need a lot of manual work to install, configure, and integrate. Manual integration and debugging not only requires a lot of manpower and time costs, but is also susceptible to human errors. Therefore, there is an urgent need for a hardware-independent industrial equipment "Plug and Produce" (PnP) solution that makes device configuration and integration debugging more automated and efficient. Summary of the invention
[0003] In view of this, the present invention provides an industrial equipment plug-and-play method and system based on OPC UA, which completes automatic discovery, automatic parameter configuration, automatic integration and replacement of old equipment by building an OPC UA information model for industrial controllers and field devices and using OPC UA as a unified and reliable data exchange communication interface.
[0004] In order to achieve the above object, the present invention provides the following technical solutions:
[0005] In a first aspect of the present invention, the present invention provides an industrial device plug-and-play method based on OPC UA, the method comprising the following steps:
[0006] S1: Function blocks are embedded in the OPC UA information model of all industrial controllers and field devices, and parameter blocks are embedded in the OPC UA information model of all field devices;
[0007] S2: All industrial controllers and field devices register with the OPC UA Local Discovery Server through their embedded OPC UA servers;
[0008] S3: The PNP service middleware implements dynamic parameter configuration of field devices according to the device parameter configuration method and by using the parameter blocks in the OPC UA information model of the field devices; it implements automatic integration of industrial controllers and field devices according to the device integration method and by using the function blocks in the OPC UA information model of the industrial controllers and field devices;
[0009] S4: The PNP service middleware transfers the real-time configuration parameters of the old field device to be replaced to the new field device according to the device replacement method and by using the parameter block in the OPC UA information model of the field device.
[0010] In a second aspect of the present invention, the present invention provides an industrial equipment plug-and-play system based on OPC UA, the system comprising a PNP service middleware, an OPC UA local discovery server, an industrial controller and field devices embedded with an OPC UA server; the PNP service middleware is used to aggregate and save the OPC UA information models of the industrial controller and the field devices, and realize automatic configuration, automatic integration of the industrial controller and the field devices, and parameter transfer when the old equipment is replaced; the OPC UA local discovery server is used to register the URL information of the registered OPC UA server; the industrial controller and field devices embedded with the OPC UA server are used for real-time monitoring, instruction execution and data exchange in an industrial environment.
[0011] Furthermore, the system also includes an upper-layer monitoring application, which serves as a human-machine interface for implementing human-machine control.
[0012] Beneficial effects of the present invention:
[0013] The present invention aims to solve the problem that a large amount of manpower and time costs are required when integrating and debugging large-scale field devices in distributed control systems, and provides an automated, efficient, hardware-independent plug-and-play solution for industrial equipment based on OPC UA. Device plug-and-play at the network level is achieved by designing an automatic discovery mechanism based on OPC UA; by designing OPC UA information modeling for all industrial controllers and field devices and using OPC UA as the standard interface for communication between devices, and by designing device parameter configuration and integration methods, device parameter configuration and automatic integration between industrial controllers and field devices are completed, thereby achieving device plug-and-play at the semantic level; by designing a device replacement method, the real-time configuration parameters of old devices that have failed or need to be upgraded can be automatically transferred to new devices, thereby reducing the time required for manual replacement of devices. The present invention significantly reduces the time required for engineers to integrate and debug large-scale heterogeneous industrial equipment and systems, while eliminating human errors that may be introduced by manual operations.
[0014] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a structural diagram of an industrial equipment plug-and-play system based on OPC UA in an embodiment of the present invention;
[0016] Figure 2 This is a specific flow chart of an industrial equipment plug-and-play method based on OPC UA in an embodiment of the present invention;
[0017] Figure 3 A diagram of the registration architecture of the industrial controller and the field device OPC UA server in an embodiment of the invention;
[0018] Figure 4 A schematic diagram of a method for configuring dynamic parameters of industrial equipment in a preferred embodiment of the present invention;
[0019] Figure 5 A flowchart of a method for automatically integrating an industrial controller and a field device in a preferred embodiment of the present invention;
[0020] Figure 6 It is a schematic diagram of an industrial equipment replacement method in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0021] The technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0022] The plug-and-play solution for industrial control systems is designed to improve system flexibility, reduce deployment and maintenance costs, and accelerate the system integration process. As an open, standard, cross-platform communication protocol, the Open Platform Communications Unified Architecture (OPC UA) has a unified information model and standardized communication interface, enabling seamless data exchange and communication between industrial devices. At the same time, it adopts an object-oriented architecture system to achieve interoperability of industrial equipment independent of suppliers, and can provide a feasible solution for the installation, configuration and integration of industrial control systems.
[0023] Figure 1 FIG. 1 is a structural diagram of an industrial equipment plug-and-play system based on OPC UA in an embodiment of the invention. Figure 1 As shown, PNP service middleware, OPC UA local discovery server, industrial controllers and field devices embedded with OPC UA server; the PNP service middleware is used to aggregate and save OPC UA information models of industrial controllers and field devices, and realize automatic configuration, automatic integration of industrial controllers and field devices, and parameter transfer when old devices are replaced; the OPC UA local discovery server is used to register URL information of registered OPC UA servers; the industrial controllers and field devices embedded with OPC UA server are used for real-time monitoring, instruction execution and data exchange in industrial environments.
[0024] In some embodiments, the OPC UA local discovery server is responsible for registering the URL information of the registered OPC UA server. It can be specifically divided into two types of local discovery servers: Device LDS-ME and Controller LDS-ME. The main difference between the two is the difference in recording the registration objects. The former mainly processes the network registration request of the field device OPC UA server, while the latter processes the network registration request of the industrial controller OPC UA server.
[0025] In some embodiments, the industrial controller is responsible for executing a pre-set control algorithm, monitoring and controlling various parameters and variables in the industrial process, and the field device is a sensor responsible for data collection or an actuator for executing control commands.
[0026] In a preferred embodiment of the present invention, the system also includes an upper-layer monitoring application, which serves as a human-machine interface for realizing human-machine control; the operator operates the corresponding upper-layer monitoring application as an OPC UA client to realize human-machine operation of the industrial automation system, such as completing the entry of configuration parameter information of field equipment, updating information of field equipment, and other operations.
[0027] In some embodiments, in the overall architecture of the embodiments of the present invention, industrial controllers #1 to #n all integrate the OPC UA server program and the industrial controller control program, and field devices #1 to #m all integrate the OPC UA server program and the field device program; the n and m here are just general terms, and the specific number of industrial controllers and the number of industrial devices are determined by technical personnel in this field based on actual conditions.
[0028] Among them, in the overall architecture of the embodiment of the present invention, all components use OPC UA as a unified communication protocol. For field devices with limited resources or fieldbus and analog connections, the present invention uses a border gateway agent with relatively abundant resources to run the OPC UA server of these devices, so that they all become intelligent Internet of Things devices with IP connections, and can communicate data through OPC UA.
[0029] Figure 2 It is a specific flow chart of the plug-and-play method for industrial equipment based on OPC UA, such as Figure 2 As shown, the method includes:
[0030] S1: Function blocks are embedded in the OPC UA information model of all industrial controllers and field devices, and parameter blocks are embedded in the OPC UA information model of all field devices;
[0031] In the embodiment of the present invention, during the construction of the OPC UA information model of the industrial controller and field equipment, since different devices have different functions and requirements, there will be certain differences in the parameter blocks and function blocks in the construction of the OPC UA information model, and the parameter blocks and function blocks must be defined and classified in detail; the parameter blocks contain the required parameters of the field equipment (parameters that are critical to the normal operation of the equipment) and optional parameters (parameters configured according to the actual needs of the user), and the function blocks contain the input variables, output variables and communication cycles of the industrial controller and field equipment. Those skilled in the art may decide to add other information models for the industrial controller and field equipment according to the actual situation.
[0032] S2: All industrial controllers and field devices register with the OPC UA Local Discovery Server through their embedded OPC UA servers;
[0033] In the embodiment of the present invention, the OPC UA local discovery server is used to register the URL information of the registered OPC UA server, and can be specifically divided into two types of local discovery servers: Device LDS-ME and Controller LDS-ME. The main difference between the two is the difference in recording the registration object. The former mainly processes the network registration request of the field device OPC UA server, while the latter processes the network registration request of the industrial controller OPC UA server. The two types of local discovery servers can effectively distinguish between industrial controllers and field devices during the process of automatic integration of industrial controllers and field devices by the PNP service middleware.
[0034] S3: The PNP service middleware implements dynamic parameter configuration of field devices according to the device parameter configuration method and by using the parameter blocks in the OPC UA information model of the field devices; it implements automatic integration of industrial controllers and field devices according to the device integration method and by using the function blocks in the OPC UA information model of the industrial controllers and field devices;
[0035] In the embodiment of the present invention, the PNP service middleware establishes communication connections with the registered industrial controller and field device OPC UA server respectively, browses the information model in the address space of the OPC UA server, and then aggregates and saves the function block information model in the industrial controller OPC UA server and the function block and parameter block information model in the field device OPC UA server; the PNP service middleware ensures that the node data in the aggregated and saved parameter block information model of all devices is always consistent with the node data in the parameter block information model of all devices' own OPC UA server through a callback function; the PNP service middleware provides a unified OPC UA interface can be used to dynamically configure parameters of all field devices. This device parameter configuration method can shield the differences between the underlying network structure and devices, and provide a unified device control management interface for the upper network management system to solve the problem of unified configuration of heterogeneous network devices in industrial fields; PNP service middleware matches the input and output variable sets of the aggregated and saved industrial controller function blocks with the input and output variable sets of the field device function blocks according to matching rules such as the same input and output signal name or node NodeId, and enables the subscription of the industrial controller input signal to the field device output signal and the subscription of the field device input signal to the industrial controller output signal according to the matching results. This subscription can use OPC UA client / server connection, or can use OPC UA publish / subscribe connection with or without agent. This automatic integration method of industrial controllers and field devices can automatically complete the communication establishment of input and output signals of industrial controllers and field devices according to the information model of the device, thereby significantly reducing the integration and debugging time of factory equipment and eliminating human errors in manual operation.
[0036] S4: The PNP service middleware transfers the real-time configuration parameters of the old field device to be replaced to the new field device according to the device replacement method and by using the parameter block in the OPC UA information model of the field device.
[0037] In an embodiment of the present invention, the operator specifies to the PNP service middleware that the identification information of the old device is to be replaced, and then broadcasts a pause command to all devices, so that the OPC UA servers of all devices enter a hold state, and at the same time sends a command to the old device to close the communication connection with other devices and its own server; the operator manually disconnects the physical connection of the old device, connects and starts the new device. After the new device is running, it registers with the OPC UA local discovery server. The PNP service middleware connects to the new device through the registration information, and updates the configuration parameters of the old device to the new device server; the PNP service middleware re-matches the input and output of all devices and controllers according to the rules, and re-establishes the communication connection between the device and the controller according to the matching results, and then broadcasts a normal operation command to all devices; this device replacement method can automatically transfer the real-time configuration parameters of the old device to the new device, and automatically reintegrate the new device with other devices, so that the new device can quickly communicate with other devices normally, thereby reducing the time required for manual replacement of devices.
[0038] Figure 3 : is a registration architecture diagram of an industrial controller and a field device OPC UA server in a preferred embodiment of the present invention, such as Figure 3 As shown, including:
[0039] 101. The OPC UA server of the industrial controller or field device creates a corresponding OPC UA client and establishes a communication connection with the local discovery server. If the local discovery server is not online or unavailable, the OPC UA client of the industrial controller or field device will periodically attempt to connect to the local discovery server until the two successfully establish a communication connection; wherein, the time for the periodic connection attempt is determined by those skilled in the art according to actual conditions, for example, 10 minutes can be used.
[0040] 102. The OPC UA client created by the OPC UA server of the industrial controller or field device sends a registration request message carrying its own URL and other information to the local discovery server.
[0041] The registration request message includes a general request header, the OPC UA server host name, and the IP address and port number of the OPC UA server.
[0042] 103. After receiving the registration request, the local discovery server saves the URL and other information of the OPC UA server in the registration request message in its internal registered OPC UA server list;
[0043] 104. All OPC UA local discovery servers related to field devices, namely Device LDS-ME, share their internally stored lists of registered field device OPC UA servers through the mDNS service. All OPC UA local discovery servers related to industrial controllers, namely Controller LDS-ME, share their internally stored lists of registered controller OPC UA servers through the mDNS service; among them, the registered OPC UA servers will register with the local discovery server regularly. If the local discovery server does not receive a re-registration request from a registered OPC UA server within a period of time, the information of the server will be deleted from the list of registered OPC UA servers; when the OPC UA server stops running normally, it will send a deregistration request to the local discovery server, and the local discovery server will respond to the request and delete the information of the server from the list of registered OPC UA servers.
[0044] like Figure 3 As shown, Device LDS-ME is responsible for processing the registration of field devices and forming a list of registered field device OPC UA servers in the PNP service middleware; Controller LDS-ME is responsible for processing the registration of industrial controllers and forming a list of registered controller OPC UA servers in the PNP service middleware. These server lists include the device names of the registered devices and the corresponding address information.
[0045] Figure 4 Schematic diagram of a method for configuring dynamic parameters of industrial equipment in a preferred embodiment of the present invention. Figure 4 As shown, the specific interactive process of the dynamic parameter configuration of industrial equipment of the present invention is described; the operator, the upper-layer monitoring application that can be used as the OPC UA client, the PNP service middleware, the OPC UA local discovery server and the industrial field device OPC UA server are the main participants in the dynamic parameter configuration of the equipment. The OPC UA local discovery server is actually Device LDS-ME, which is mainly responsible for processing the registration request of the field device OPC UA server; after the registration is completed, the corresponding dynamic parameter configuration can be performed, and the industrial equipment dynamic parameter configuration method includes:
[0046] 201. The PNP service middleware creates a corresponding OPC UA client and connects to the OPC UA local discovery server, obtains the URL information of the registered field device OPC UA server from the OPC UA local discovery server, and then creates multiple OPC UA clients to connect to the registered field device OPC UA servers in sequence.
[0047] 202. The PNP service middleware obtains a parameter block information model from a registered field device OPC UA server; aggregates and saves the parameter block information models of all registered field device OPC UA servers, and aggregates and saves the configuration parameter nodes to its server address space.
[0048] Among them, when the PNP service middleware aggregates the information model nodes in each OPC UA server, it uses the source server IP address and the source server Port number to form a string as the namespace for the NodeId of the aggregated saved node, and the NodeId identifier of each node after aggregation is consistent with the identifier of the node in the source server, thereby ensuring the uniqueness of the node NodeId.
[0049] 203. When the PNP service middleware saves the parameter block information model node in each OPC UA server, it binds a callback function to it for monitoring the change of the attribute value of the parameter block information model node.
[0050] When the attribute value of any node saved in the aggregation changes, the callback function will synchronize the updated attribute value of the node to the attribute value of the corresponding node in the address space of the field device OPC UA server where the node was originally located through the write function, thereby realizing dynamic parameter configuration of the field device.
[0051] In a preferred embodiment of the present invention, Figure 4 As shown, it may also include:
[0052] 204. The operator connects to the PNP service middleware through the OPC UA client of the upper-layer monitoring application, first modifies the configuration parameters in the upper-layer monitoring application, and then modifies the attribute value of the node in the parameter block information model of the specified field device saved in its address space through the PNP server middleware. After the attribute value of the node is modified, the PNP service middleware will automatically call and execute the callback function bound to the node when saving, thereby completing the parameter configuration of the field device.
[0053] Figure 5 FIG. 1 is a flow chart of a method for automatically integrating an industrial controller and a field device in a preferred embodiment of the present invention. Figure 5 As shown in the figure, after the industrial controller and field device are started and configured, the automatic integration of the industrial controller and field device includes:
[0054] 301. The PNP service middleware creates an OPC UA server and completes parameter configuration of its own server;
[0055] 302. The PNP service middleware creates an OPC UA client and connects to the Device LDS-ME and the Controller LDS-ME respectively;
[0056] 303. Periodically query the Device LDS-ME and the Controller LDS-ME respectively whether there is a new field device OPC UA server or industrial controller OPC UA server connected to the network;
[0057] The time for periodically attempting to connect is determined by those skilled in the art according to actual conditions, and is generally 1 second. It is recommended that the time be as small as possible, but the hardware conditions must be considered.
[0058] 304. If a new field device OPC UA server is connected to the network, the PNP service middleware connects to the OPC UA server of the new field device and aggregates and saves its function block information model. If a new industrial controller OPC UA server is connected to the network, the PNP service middleware connects to the OPC UA server of the new industrial controller and aggregates and saves its function block information model;
[0059] When the PNP service middleware aggregates the information model nodes in each OPC UA server, it uses the source server IP address + source server Port number to form a string as the namespace for the NodeId of the aggregated node, and the NodeId identifier of each node after aggregation is consistent with the node identifier in the source server, thereby ensuring the uniqueness of the node NodeId.
[0060] 305. If it is a newly added field device OPC UA server, the PNP service middleware matches the input and output signals of the newly added field device with the input and output signals of all industrial controllers aggregated and stored in the address space of the PNP service middleware in turn according to the registration order of the newly added field device OPC UA server;
[0061] If the PNP service middleware does not match a suitable industrial controller for a newly connected field device, it means that the industrial controller required by the field device has not yet been online. Therefore, when the OPC UA server of the newly connected industrial controller is online, the PNP service middleware will try to match the input and output signals for the field device again. If the match still fails, you need to wait for the next time when the OPC UA server of the newly connected industrial controller is online to try matching again until the field device is successfully matched with the correct industrial controller.
[0062] 306. If it is a newly added industrial controller OPC UA server, the PNP service middleware matches the input and output signals of the newly added industrial controller with the input and output signals of all field devices aggregated and stored in the address space of the PNP service middleware in turn according to the registration order of the newly added industrial controller OPC UA server;
[0063] If the PNP service middleware does not match a suitable field device for a newly connected industrial controller, it means that the industrial controller required by the industrial controller has not yet been online. Therefore, when the OPC UA server of a newly connected field device is online, the PNP service middleware will try to match the input and output signals for the industrial controller again. If the match still fails, it is necessary to wait for the next OPC UA server of a newly connected field device to be online and try again until the correct field device is successfully matched for the industrial controller.
[0064] 307. When the input and output signals of the field device are successfully matched with the input and output signals of the industrial controller, the PNP service middleware enables the subscription of the industrial controller input signal to the field device output signal, and the subscription of the field device input signal to the industrial controller output signal. This subscription can use OPC UA client / server connection, or can use OPC UA publish / subscribe connection with or without agent. After the subscription is completed, the industrial controller and the field device can communicate data normally.
[0065] Figure 6 Schematic diagram of the industrial equipment replacement method in a preferred embodiment of the present invention. Figure 6 As shown, the process mainly includes the operator specifying the old device to be replaced and changing the status of all devices, transferring the configuration parameters of the old device to the new device, and the new device automatically integrating and restoring the operation of all devices; wherein, the operator here also refers to the upper-layer monitoring application that can be used as an OPC UA client, and for the convenience of brief description, the upper-layer monitoring application is omitted;
[0066] The operator specifies the old device to be replaced and changes the status of all devices. First, the operator inputs the IP address and port number of the device to be replaced through the method function interface provided by the PNP service middleware, that is, specifies the old device to be replaced to the PNP service middleware; after receiving the instruction, the PNP service middleware broadcasts a UDP-based hold command message in the network to notify all devices to enter the hold operation state, that is, all devices stop interacting with production data; then, the PNP service middleware causes the old device to close the established data communication channel with other devices;
[0067] The PNP service middleware transfers the configuration parameters of the old device stored in its address space to the OPC UA server of the new device. The operator manually disconnects the physical connection of the old device, connects and starts the new device; once the new device is powered on and the OPC UA server is started, it automatically registers with the Device LDS-ME; the PNP service middleware then obtains the URL information of the new device from the Device LDS-ME; then, based on this URL information, the PNP service middleware connects to the OPC UA server of the new device, and synchronizes the parameter values in the old device configuration parameter information model stored in the PNP service middleware to the OPC UA server of the new device;
[0068] The new device automatically integrates and restores the operation of all devices. First, the PNP service middleware rematches the input and output signals of the new device with the input and output signals of all industrial controllers according to the matching rules. After the match is successful, a data communication channel is established between the new device and these industrial controllers. Subsequently, the PNP service middleware broadcasts commands through UDP to restore all devices to normal operation;
[0069] The matching rule is that the matching is successful if the node names are the same. If the industrial controller and the device use different input and output signal names, the matching may also depend on other information, such as the NodeId of the OPC UA node.
[0070] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An industrial equipment plug-and-play system based on OPC UA, characterized in that: The system includes PNP service middleware, OPC UA local discovery server, industrial controllers and field devices embedded with OPC UA server; the PNP service middleware is used to aggregate and save OPC UA information models of industrial controllers and field devices, and realize automatic configuration, automatic integration of industrial controllers and field devices, and parameter transfer when old devices are replaced; the OPC UA local discovery server is used to register URL information of registered OPC UA servers; the industrial controllers and field devices embedded with OPC UA server are used for real-time monitoring, instruction execution and data exchange in industrial environments.
2. The OPC UA-based industrial equipment plug-and-play system according to claim 1, characterized in that: The system also includes an upper-layer monitoring application program; the upper-layer monitoring application program serves as a human-machine interface for realizing human-machine control.
3. A plug-and-play method for industrial equipment based on OPC UA, characterized in that: The method comprises the following steps: S1: Function blocks are embedded in the OPC UA information model of all industrial controllers and field devices, and parameter blocks are embedded in the OPC UA information model of all field devices; S2: All industrial controllers and field devices register with the OPC UA Local Discovery Server through their embedded OPC UA servers; S3: The PNP service middleware implements dynamic parameter configuration of field devices according to the device parameter configuration method and by using the parameter blocks in the OPC UA information model of the field devices; it implements automatic integration of industrial controllers and field devices according to the device integration method and by using the function blocks in the OPC UA information model of the industrial controllers and field devices; S4: The PNP service middleware transfers the real-time configuration parameters of the old field device to be replaced to the new field device according to the device replacement method and by using the parameter block in the OPC UA information model of the field device.
4. The OPC UA-based industrial equipment plug-and-play method according to claim 3, characterized in that: The parameter block includes required parameters and optional parameters of the field device, and the function block includes input variables, output variables and communication cycles of the industrial controller and the field device.
5. The OPC UA-based industrial equipment plug-and-play method according to claim 3, characterized in that: The step S2 specifically includes: The OPC UA server of the industrial controller or field device creates a corresponding OPC UA client and establishes a communication connection with the OPC UA local discovery server. If the OPC UA local discovery server is not online, the OPC UA client will periodically try to connect to the OPC UA local discovery server until the two successfully establish a communication connection. The OPC UA client created by the OPC UA server of the industrial controller or field device sends a registration request message with its own URL information to the OPC UA local discovery server. After receiving the registration request, the OPC UA local discovery server saves the URL information in the registration request message in its internal list of registered OPC UA servers. All OPC UA local discovery servers related to field devices share their internally stored lists of registered field device OPC UA servers through the mDNS service; all OPC UA local discovery servers related to industrial controllers share their internally stored lists of registered controller OPC UA servers through the mDNS service; Among them, the registered OPC UA server will register with the OPC UA local discovery server regularly; if the OPC UA local discovery server does not receive a re-registration request from the registered OPC UA server within a period of time, the OPC UA local discovery server will delete the information of the OPC UA server; when the OPC UA server stops running normally, it will send a deregistration request to the OPC UA local discovery server.
6. The OPC UA-based industrial equipment plug-and-play method according to claim 3, characterized in that: The device parameter configuration method comprises: The PNP service middleware creates the corresponding OPC UA client and connects to the OPC UA local discovery server to obtain the URL information of the registered field device OPC UA server, and then creates multiple OPC UA clients to connect to the registered field device OPC UA servers in turn; the PNP service middleware aggregates and saves the parameter block information model of all registered field device OPC UA servers; When the PNP service middleware aggregates the parameter block information model nodes in each OPC UA server, it uses the source server IP address and the source server Port number to form a string as the namespace for the NodeId of the aggregated storage node, and the NodeId identifier of each node after aggregation is consistent with the identifier of the node in the source server; When the PNP service middleware saves the parameter block information model node in each OPC UA server, it will bind a callback function to it to monitor the changes in the attribute values of the parameter block information model node; once the attribute value of the parameter block information model node changes, the callback function will synchronize the updated attribute value to the attribute value of the corresponding node in the address space of the field device OPC UA server where the parameter block information model node was originally located, thereby realizing dynamic parameter configuration of the field device.
7. The OPC UA-based industrial equipment plug-and-play method according to claim 6, characterized in that: The device parameter configuration method also includes: The operator connects to the PNP service middleware through the OPC UA client of the upper-level monitoring application and modifies the attribute value of the node in the parameter block information model of the specified field device saved in its address space; once the modification is completed, the PNP service middleware will automatically call and execute the callback function bound to the node when saving, thereby completing the parameter configuration of the field device.
8. The OPC UA-based industrial equipment plug-and-play method according to claim 3, characterized in that: The device integration method comprises: The PNP service middleware accordingly requests the OPC UA local discovery server through the OPC UA client to obtain the OPC UA server list information of the registered industrial controllers and field devices; The PNP service middleware uses the OPC UA server list information of registered industrial controllers and field devices to establish communication connections with each registered OPC UA server; The PNP service middleware aggregates and saves the function block information model nodes in all registered industrial controller OPC UA servers, including the input and output signals of the control logic program of the industrial controller and the input and output signals of the field devices; The PNP service middleware matches the corresponding industrial controllers for the field devices one by one according to the registration order of all registered field device OPC UA servers; when the PNP service middleware finds the same input and output signal names in the field device function block information module from the input and output variable set of all industrial controller function block information modules saved in the aggregate, the match is considered successful; or the PNP service middleware matches the appropriate field devices for them according to the registration order of all registered industrial controllers; when the PNP service middleware finds the same input and output signal names in the field device function block information module from the input and output variable set of all field device function block information modules saved in the aggregate, the match is considered successful; if the industrial controller and the field device use different input and output signal names, they are matched according to NodeId; After successful matching, the PNP service middleware enables the subscription of industrial controller input signals and field device output signals, as well as the subscription of field device input signals and industrial controller output signals, thereby achieving automatic integration.
9. The OPC UA-based industrial equipment plug-and-play method according to claim 7, characterized in that: The subscription uses an OPC UA client / server connection or an OPC UA publish / subscribe connection with or without a proxy.
10. The OPC UA-based industrial equipment plug-and-play method according to claim 3, characterized in that: The device replacement method comprises: The PNP service middleware receives instruction information from an operator, wherein the instruction information specifies that device identification information is to be replaced; The PNP service middleware broadcasts a hold command to all field devices in the network, causing the OPC UA servers of all field devices to enter a hold state, that is, no data interaction is performed. At the same time, a command is sent to the old field devices to close the communication connection with other field devices and to close their own OPC UA servers; Disconnect the physical connection of the old field device, connect and start the physical connection of the new field device; The OPC UA server of the new field device starts running and registers with the OPC UA local discovery server; The PNP service middleware requests the OPC UA local discovery server to obtain the OPC UA server list information of the new field device; connects to the new field device, and updates the parameter values in the old field device parameter block information model stored in the PNP service middleware OPC UA server address space to the OPC UA server of the new field device; The PNP service middleware re-executes step S3 for all field devices and industrial controllers, and broadcasts normal operation commands to all field devices, so that they resume normal operation and continue production.
Citation Information
Cited By
PLC (Programmable Logic Controller) control method and system for direct communication of field IO (Input / Output) equipment
CN121143175A
Method and system for dynamically expanding IO equipment control through PLC
CN121209409A
OPC UA-based industrial equipment plug-and-produce method and system
WO2026016908A1
