A multi-servo control method and device based on XML configuration and OPC UA communication

By using XML configuration to communicate with OPC UA, a set of servo objects is generated, and batch data is read and displayed in a unified interface. This solves the problem of quickly locating abnormal equipment in a multi-servo control system in tobacco packaging equipment, and improves the efficiency of status monitoring and ease of operation.

CN122431276APending Publication Date: 2026-07-21SHANGHAI TOBACCO MACHINERY +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI TOBACCO MACHINERY
Filing Date
2026-04-20
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In tobacco packaging equipment, under a multi-servo control system, it is difficult for operators to quickly locate abnormal equipment. They need to frequently switch between multiple pages to obtain status information of different motors or controllers, resulting in low efficiency.

Method used

The method adopts XML configuration and OPC UA communication, generates a set of servo objects by association and matching through a unified identifier field, uses the OPC UA client to read the running data of the servo node address set in batches, and performs data binding and control command issuance in a unified interface template. Combined with the group identifier field, it realizes the classification display and rapid positioning of servo motors.

Benefits of technology

It improves the efficiency of status monitoring of multi-servo systems, eliminates the problems of information dispersion and multiple page switching, and allows operators to quickly locate target motors and abnormal equipment within the same interface, simplifying the operation path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431276A_ABST
    Figure CN122431276A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on XML configuration and the multi-servo control method and device of OPC UA communication.Method includes: based on the multi-source XML configuration file of pre-construction, generates servo object set by uniform identification field association matching;Through the batch read operation of servo node address set in servo object set to OPC UA client, servo motor operation data are acquired and are cached and concurrent control;Based on the servo operation interface module of pre-construction, data binding and control instruction issuing are completed according to servo object set, and multi-level servo display interface is generated using uniform interface template;Grouping mapping relationship is constructed by grouping identification field in XML configuration file, and each hierarchical servo display interface configuration screening control component is configured, to realize the classified display and quick positioning of servo motor in servo object set.The technical scheme provided in the embodiment of the application can effectively improve the state monitoring efficiency of multi-servo system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tobacco packaging equipment control technology, and in particular to a multi-servo control method and device based on XML configuration and OPC UA communication. Background Technology

[0002] With the continuous improvement of automation levels in tobacco packaging equipment, the scale of servo drive systems in these devices is constantly expanding, evolving from a small number of traditional servo units to complex control systems with multiple controllers and motors working in coordination. In some all-servo models, the number of servo motors can reach dozens or more, managed in a distributed manner by multiple servo controllers. When there are a large number of servos, operators need to frequently switch between multiple pages to obtain status information for different motors or controllers, making it difficult to quickly locate malfunctioning equipment. Summary of the Invention

[0003] This invention provides a multi-servo control method and apparatus based on XML configuration and OPC UA communication to solve the problem that existing technologies cannot quickly locate abnormal devices.

[0004] According to one aspect of the present invention, a multi-servo control method based on XML configuration and OPC UA communication is provided, applied to a multi-servo control system of tobacco packaging equipment, comprising:

[0005] Based on a pre-built multi-source XML configuration file, a set of servo objects is generated through association and matching using a unified identifier field;

[0006] The OPC UA client performs a batch read operation on the set of servo node addresses in the set of servo objects to obtain servo motor running data and perform caching and concurrent control.

[0007] Based on the pre-built servo operation interface module, data binding and control command issuance are completed according to the servo object set, and a multi-level servo display interface is generated using a unified interface template.

[0008] Grouping mapping relationships are constructed using grouping identifier fields in XML configuration files, and filtering control components are configured in the servo display interfaces at each level to achieve categorized display and rapid positioning of servo motors in the servo object set.

[0009] Optionally, based on a pre-built multi-source XML configuration file, a set of server objects can be generated through association and matching using a unified identifier field, including:

[0010] A multi-source XML configuration file is constructed to perform structural decoupling modeling of the multi-servo control system. The host computer parses the multi-source XML configuration file and generates a set of servo objects by associating and matching them through a unified identifier field.

[0011] Optionally, performing a batch read operation on the set of servo node addresses in the set of servo objects through the OPC UA client to obtain servo motor operating data and perform caching and concurrent control includes:

[0012] Based on the servo node address set obtained by parsing the multi-source XML configuration file, the OPC UA client performs a batch read operation on the servo node address set to obtain servo motor running data and perform caching and concurrent control.

[0013] Optionally, a multi-source XML configuration file is constructed to perform structural decoupling modeling of the multi-servo control system. The host computer parses the multi-source XML configuration file and uses a unified identifier field for association and matching to generate a set of servo objects, including:

[0014] Construct at least two types of XML configuration files to perform structural decoupling modeling of the multi-servo control system;

[0015] The XML configuration file is read and associated using a unified identifier field to generate a set of server objects.

[0016] Optionally, the two types of XML configuration files include a status monitoring XML class and a control function XML class; the status monitoring XML class is used to define the mapping relationship between servo motor operating status parameters and OPC UA nodes, and the control function XML class is used to define servo control function parameters and uniformly configure motor codes, grouping information, device affiliation and controller numbers.

[0017] Optionally, after constructing the grouping mapping relationship through the grouping identifier field in the XML configuration file and configuring the filtering control component in each level of the servo display interface to achieve the classification display and rapid positioning of servo motors in the servo object set, the following is also included:

[0018] When a user selects a servo motor, the system matches the corresponding device location diagram based on the servo motor's identification information, thus completing the spatial location visualization linkage.

[0019] Optionally, the device location diagram is used to characterize the installation position and part of the servo motor in the tobacco packaging equipment, and is displayed in a designated area of ​​the interface.

[0020] Optionally, the unified identifier field is a motor_code or ID field, used for the association and matching of status parameters and control function parameters.

[0021] Optionally, the servo object set supports dynamic expansion of more than 50 servo motors, adapting to large-scale multi-servo application scenarios in tobacco packaging equipment.

[0022] According to another aspect of the present invention, a multi-servo control device based on XML configuration and OPC UA communication is provided, applied to a multi-servo control system for tobacco packaging equipment, comprising:

[0023] A servo object collection generation module is used to generate a servo object collection based on a pre-built multi-source XML configuration file by associating and matching through a unified identifier field.

[0024] The acquisition module is used to perform batch read operations on the set of servo node addresses in the set of servo objects through the OPC UA client, acquire servo motor running data, and perform caching and concurrent control.

[0025] The interface generation module is used to complete data binding and control command issuance based on the pre-built servo operation interface module and the servo object set, and generate a multi-level servo display interface using a unified interface template.

[0026] The display and positioning module is used to construct grouping mapping relationships through the grouping identifier field in the XML configuration file, and configure filtering control components in the servo display interface at each level to realize the classification display and rapid positioning of servo motors in the servo object set.

[0027] The technical solution provided by this invention generates a set of servo objects based on a pre-built multi-source XML configuration file through unified identifier field association and matching, achieving integrated management of all servo information and eliminating the problems of information dispersion and multi-source fragmentation at the data level. Through an OPC UA client, batch read operations are performed on the set of servo node addresses in the set of servo objects to obtain servo motor operating data, which is then cached and concurrently controlled. Servo status data scattered across different controllers is centrally acquired and updated, eliminating the need for separate data reading for different pages and channels, and avoiding switching between multiple pages for data retrieval. Based on a pre-built servo operation interface module, data binding and control command issuance are completed according to the set of servo objects. A multi-level servo display interface is generated using a unified interface template, integrating status monitoring and control operations into the same functional module. All servos can be centrally monitored and operated within the same module, eliminating the need to switch between different independent interfaces to view different servos, and completely eliminating the operation path of frequent switching between multiple pages. Grouping mapping relationships are constructed using grouping identifier fields in XML configuration files, and filtering control components are configured in the servo display interfaces at each level to achieve categorized display and rapid location of servo motors within the servo object set. Operators can directly filter target groups to quickly locate target motors and malfunctioning devices among a large number of servos without traversing all servos or switching pages to search. The technical solution provided by this invention can effectively improve the status monitoring efficiency of multi-servo systems.

[0028] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 A flowchart illustrating a multi-servo control method based on XML configuration and OPC UA communication, provided in an embodiment of the present invention;

[0031] Figure 2 A flowchart illustrating another multi-servo control method based on XML configuration and OPC UA communication provided in this embodiment of the invention;

[0032] Figure 3 A flowchart illustrating another multi-servo control method based on XML configuration and OPC UA communication provided in an embodiment of the present invention;

[0033] Figure 4 This is a schematic diagram of the structure of a multi-servo control device based on XML configuration and OPC UA communication, provided in an embodiment of the present invention.

[0034] Figure 5 This is a schematic diagram of an electronic device based on a multi-servo control method using XML configuration and OPC UA communication, as provided in an embodiment of the present invention. Detailed Implementation

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

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

[0037] Figure 1 This is a flowchart illustrating a multi-servo control method based on XML configuration and OPC UA communication, provided as an embodiment of the present invention. This embodiment is applicable to a multi-servo human-machine interaction control system for tobacco packaging equipment. The method can be executed by a multi-servo control device based on XML configuration and OPC UA communication. This device can be implemented in hardware and / or software and can be configured in any electronic device with communication capabilities. See also... Figure 1 The method includes:

[0038] S110. Based on a pre-built multi-source XML configuration file, a set of servo objects is generated through association and matching using a unified identifier field.

[0039] The servo object set is a standardized software entity set generated in the host computer software, with a single servo motor as the smallest unit. After XML configuration parsing and unified identification association integration, each servo object fully encapsulates the communication address, operating parameters, control interface, group attributes, and device identification information of a single servo. All servo objects in the set together constitute the single core data carrier for host computer monitoring, control, interface generation, and group filtering.

[0040] Specifically, the system pre-builds at least two types of XML configuration files for servo status monitoring and servo control functions, respectively. Each type of XML configuration file contains a unified identifier field as a unique association key. Upon startup, the host computer parses all XML configuration files, using the unified identifier field as the matching basis to automatically associate and integrate the scattered configuration information such as status parameter nodes, control function addresses, grouping information, and device affiliation corresponding to the same servo motor. Ultimately, a complete software data object is generated for each servo motor, and all servo data objects together constitute a servo object set, achieving structured and scalable modeling of the multi-servo system. This step, through XML configuration file parsing and servo object mapping mechanisms, automatically integrates scattered configuration data into a unified servo object set, enabling dynamic expansion of the number of servos while avoiding manual configuration one by one, thus improving system initialization efficiency and consistency.

[0041] S120. Perform a batch read operation on the set of servo node addresses in the set of servo objects through the OPC UA client to obtain servo motor running data and perform caching and concurrent control.

[0042] The servo node address set is a collection of OPC UA communication addresses extracted from multi-source XML configuration files, associated with a unified identifier, and aggregated. It is a built-in attribute of the servo object collection. Operational data includes position, speed, current, temperature, torque, error values, and status information.

[0043] Specifically, the host computer relies on the OPC UA communication client to retrieve the OPC UA servo node addresses encapsulated within each servo object in the servo object set, and performs batch concurrent read operations on all node addresses; through this communication operation, it collects real-time operating data such as the position, speed, current, temperature, and faults of the servo motor; the system stores the collected real-time operating data into a preset cache structure, and ensures the consistency and security of data reading and writing under multi-threading through a concurrency control mechanism, providing unified data support for subsequent interface display, status monitoring, and control operations.

[0044] During data communication, based on the servo node address set parsed from the XML configuration file, multiple address index arrays categorized by data type are constructed. Batch read operations are then performed on the servo node address set via the OPC UA client interface to obtain various data types, including real-time position, speed, current, temperature, torque, error values, and status information of the servo motor. According to preset configuration conditions, selectively enabling the reading of certain servo status data (including enable status, fault status, and reference position) is implemented to adapt to different models or functional requirements. During data processing, a data caching structure is set up in conjunction with a concurrency control mechanism to uniformly store and update the batch-read data, thereby ensuring data consistency and access security in a multi-threaded environment. Through these methods, efficient data acquisition and centralized management of multiple servo systems are achieved, reducing communication overhead and improving the system's response performance and stability in large-scale servo scenarios. Among them, the preset configuration conditions refer to the data reading filtering rules that are pre-configured in the multi-source XML configuration file. Based on the differences in the model of the tobacco packaging equipment, functional requirements or debugging scenarios, the rules pre-set the data types of servo status that need to be read and the range of servo motors, so as to selectively collect specified data such as servo enable status, fault status, and reference position, and block the reading of unnecessary data.

[0045] S130: Based on the pre-built servo operation interface module, data binding and control command issuance are completed according to the servo object set, and a multi-level servo display interface is generated using a unified interface template.

[0046] The system includes a servo operation interface module, a motor monitoring module, a motion controller monitoring module, a motor brake control module, a motor positioning module, a current parameter monitoring module, and a motor manual control module. The motor monitoring module centrally displays the operating status information of each servo motor and provides grouping and filtering functions based on device location. The motion controller monitoring module displays the controller's operating status. The motor brake control module performs single-motor brake control operations. The motor positioning module sets the motor's reference position. The current parameter monitoring module monitors relevant parameters of the motor's operating current. The motor manual control module allows for manual adjustment and control of the motor and supports multi-level precision selection.

[0047] Specifically, the host computer pre-builds standardized servo operation interface modules divided by function. The system uses a set of servo objects as the core data carrier, and bidirectionally binds the servo operation interface modules with the real-time running data and control addresses within the servo object set. When operators trigger control operations through the interactive interface, the system automatically generates control commands based on the binding relationship and sends them to the underlying devices. Simultaneously, the system calls a unified interface template, combined with the configuration information of the servo object set, to automatically generate a servo monitoring display interface with multi-level classification capabilities, eliminating the need for independent interface development for each servo. Control commands are implemented by writing to the corresponding nodes via OPC UA. By dividing the servo operation interface modules by function and uniformly managing multiple servo objects in each module, the number of interface jumps is reduced, operation path efficiency is improved, and data consistency between status data and control operations is ensured. Based on the servo object set, a unified interface template is used to automatically generate multi-level servo display interfaces and control units, and the interface controls are bound to the servo object data. The interface is modularly divided according to function, with different functions corresponding to different interface modules. Each interface module displays all relevant data or control items for all servo motors. By using template reuse and data-driven interface generation, the interface can automatically expand with the number of servos, avoiding the need to develop a separate interface for each motor, greatly reducing development complexity, while ensuring a unified interface style and data consistency.

[0048] S140. Construct grouping mapping relationships through the grouping identifier field in the XML configuration file, and configure filtering control components in the servo display interface at each level to achieve classified display and rapid positioning of servo motors in the servo object set.

[0049] Specifically, the host computer reads the predefined group identifier field in the XML configuration file and establishes a group mapping relationship between servo motors and equipment parts, controllers, and unit affiliations. The system integrates a filtering control interaction component in the dynamically generated servo display interfaces at each level. Through this filtering component, operators can filter all servo motors in the servo object set according to the group dimension, and only display the servo data within the target group, thereby realizing hierarchical classification display of large-scale multi-servo motors and rapid location of faults and target equipment.

[0050] By utilizing group identifier fields defined in the XML configuration file (such as group_code, machine_code, servoController, etc.), a multi-dimensional grouping mechanism is constructed. Filtering control components based on device location are provided in various functional interfaces for rapid filtering and display of servo motors. By establishing multi-level grouping mapping relationships, rapid classification and location of multiple servo devices are achieved, enabling operators to quickly locate the target device among a large number of servos, significantly improving operational efficiency.

[0051] The technical solution provided by this invention generates a set of servo objects based on a pre-built multi-source XML configuration file through unified identifier field association and matching, achieving integrated management of all servo information and eliminating the problems of information dispersion and multi-source fragmentation at the data level. Through an OPC UA client, batch read operations are performed on the set of servo node addresses in the set of servo objects to obtain servo motor operating data, which is then cached and concurrently controlled. Servo status data scattered across different controllers is centrally acquired and updated, eliminating the need for separate data reading for different pages and channels, and avoiding switching between multiple pages for data retrieval. Based on a pre-built servo operation interface module, data binding and control command issuance are completed according to the set of servo objects. A multi-level servo display interface is generated using a unified interface template, integrating status monitoring and control operations into the same functional module. All servos can be centrally monitored and operated within the same module, eliminating the need to switch between different independent interfaces to view different servos, and completely eliminating the operation path of frequent switching between multiple pages. Grouping mapping relationships are constructed using grouping identifier fields in XML configuration files, and filtering control components are configured in the servo display interfaces at each level to achieve categorized display and rapid location of servo motors within the servo object set. Operators can directly filter target groups to quickly locate target motors and malfunctioning devices among a large number of servos without traversing all servos or switching pages to search. The technical solution provided by this invention can effectively improve the status monitoring efficiency of multi-servo systems.

[0052] Figure 2 This is a flowchart illustrating another multi-servo control method based on XML configuration and OPC UA communication provided by an embodiment of the present invention. This embodiment further refines the aforementioned embodiments. See also... Figure 2 Optionally, S110 specifically includes:

[0053] S210. Construct a multi-source XML configuration file to perform structural decoupling modeling of the multi-servo control system. The host computer parses the multi-source XML configuration file and generates a set of servo objects by associating and matching them through a unified identifier field.

[0054] Specifically, at least two types of XML configuration files are constructed to perform structural decoupling modeling of the multi-servo control system; the XML configuration files are read and associated through unified identifier fields to generate a set of servo objects.

[0055] The two types of XML configuration files include status monitoring XML and control function XML. The status monitoring XML is used to define the mapping relationship between servo motor operating status parameters and OPC UA nodes, including the corresponding OPC UA nodes (NodeId) for position, speed, current, temperature, alarm codes, etc. The control function XML is used to define servo control function parameters, including brake control address, set address, jog control address and related function identifiers. It also uniformly configures motor coding, grouping information, device affiliation and controller number.

[0056] By configuring the status data and control functions of the servo system in a structured manner and associating them with a unified identifier, decoupled modeling of multiple servo systems is achieved, enabling the system to have good scalability and cross-model reuse capabilities, and avoiding the maintenance complexity problems caused by traditional hard-coding methods.

[0057] Optionally, S120 specifically includes:

[0058] S220: Based on the servo node address set obtained by parsing the multi-source XML configuration file, the OPC UA client performs a batch read operation on the servo node address set to obtain servo motor running data and perform caching and concurrent control.

[0059] Specifically, the host computer software parses the pre-built multi-source XML configuration file, extracts and summarizes the OPC UA communication node addresses corresponding to all servo motors, forming a servo node address set; the system calls the OPC UA communication client to perform a one-time batch data read operation on all node addresses in the address set, collecting real-time operating data such as the position, speed, current, and faults of the servo motors; at the same time, the system builds a data cache structure to uniformly store the collected operating data, and uses a concurrency control mechanism to ensure the consistency and security of data reading and writing in a multi-threaded operating environment, providing stable data support for subsequent interface monitoring and control operations.

[0060] The technical solution provided by this invention involves embedding grouping attributes such as tobacco packaging location and equipment affiliation into an XML configuration file on a host computer. A unified identifier field is used to integrate and match the grouping information with the identity and communication address of the servo motor, generating a structured set of servo objects. This set provides modular and grouped structured encapsulation of the servo motors at the data level, replacing the fragmented and undifferentiated data organization of existing technologies. Each servo motor possesses standardized grouping attributes, eliminating the defects of unmodularized and chaotic servo information at the data source. This provides a structured data foundation for the orderly display of data, fundamentally improving the problems of information density and poor readability. Through multi-source XML configuration, decoupling modeling of status data and control functions is achieved, generating a unified and standardized set of servo objects and establishing a structured data model adaptable to multiple servo scenarios. This replaces the fragmented and irregular data organization methods of existing technologies, providing a unified and reusable data mapping carrier for the host computer interface and solving the problem of inefficient data mapping caused by the lack of a structured data model. Based on the structured servo node address set obtained by XML parsing, the system centrally collects servo operation data using OPC UA batch reading and achieves unified data storage and management through caching and concurrency control. This replaces the traditional single-point scattered data acquisition method, realizing centralized and efficient acquisition and reuse of multi-servo data, greatly improving data utilization efficiency in multi-servo scenarios, and eliminating the technical defects of scattered data and inefficient access.

[0061] Figure 3 This is a flowchart illustrating another multi-servo control method based on XML configuration and OPC UA communication provided by an embodiment of the present invention. This embodiment further refines the aforementioned embodiments. See also... Figure 3 Optionally, following S140, the following also includes:

[0062] S310. When a user selects a servo motor, the corresponding device location diagram is matched based on the servo motor's identification information to complete the spatial location visualization linkage.

[0063] Specifically, when an operator selects any servo motor on the human-machine interface, the system obtains the unified identification information corresponding to that servo motor. Using this identification information as the retrieval basis, the system automatically matches the pre-configured equipment location association information of the servo motor in the servo object set and retrieves the equipment location diagram corresponding to the servo motor's installation location. This diagram is then displayed in a designated area on the interface, intuitively presenting the physical installation location and spatial affiliation of the servo motor within the tobacco packaging equipment. This achieves a visual linkage between the servo motor selection operation and the equipment's spatial location. The equipment location diagram indicates the motor's installation location or part within the equipment. By establishing a mapping relationship between motor objects and equipment location diagram information, the linkage between motor selection and spatial location display is achieved, thereby improving the operator's ability to identify the actual location of the motor and assisting in fault location and equipment debugging.

[0064] The technical solution provided by this invention integrates a unified selection and linkage interaction logic within a single human-machine interface. When a user selects a target servo motor, the system automatically matches and synchronously displays a schematic diagram of its device location based on the servo motor's identification information. This integrates three types of interactive functions—servo motor selection, status recognition, and spatial location visualization—into a single operation link, forming a unified interaction logic. This solution eliminates the fragmented design of existing technologies that require multiple switching between status monitoring interfaces, device drawing interfaces, and control operation interfaces. Servo positioning and location confirmation can be completed without navigating multiple pages, significantly shortening the operator's operation path, simplifying the interaction process, and achieving integrated collaboration between operation and visualization during servo debugging. This effectively improves the on-site debugging efficiency and operational convenience of multi-servo systems.

[0065] Optionally, the equipment location diagram is used to characterize the installation position and part of the servo motor in the tobacco packaging equipment, and is displayed in a designated area of ​​the interface.

[0066] Optionally, the unified identifier field can be either motor_code or ID, used for the association and matching of status parameters and control function parameters.

[0067] Optionally, the servo object collection supports dynamic expansion of more than 50 servo motors, adapting to large-scale multi-servo application scenarios in tobacco packaging equipment.

[0068] To address the challenges of numerous servos and complex control relationships in tobacco packaging equipment with multiple servo drivers, this invention introduces an XML-based configuration modeling mechanism. This mechanism provides a structured description of servo control objects, their state parameters, and control functions. By parsing configuration files, it automatically generates servo object models and corresponding human-machine interfaces, enabling dynamic construction and unified management of multi-servo systems. Furthermore, a multi-level servo control and state management mechanism is built. Through group mapping and templated interface generation, it achieves centralized monitoring and independent adjustment of the servo controller and servo motor operating states. Simultaneously, by combining batch data communication mechanisms and multi-source alarm information fusion methods, it collects and displays motor enable status, position feedback, current parameters, braking status, and fault information in real time. This improves system scalability and interface construction efficiency in scenarios with multiple servos (50 or more), reduces operational complexity, and enhances equipment debugging efficiency and operational stability, thereby ensuring the continuous, safe, and efficient operation of tobacco packaging equipment.

[0069] Figure 4 This is a schematic diagram of a multi-servo control device based on XML configuration and OPC UA communication provided in an embodiment of the present invention. It is applied to a multi-servo control system for tobacco packaging equipment. The device includes: a servo object set generation module 410, an acquisition module 420, an interface generation module 430, and a display and positioning module 440.

[0070] The servo object collection generation module 410 is used to generate a servo object collection based on a pre-built multi-source XML configuration file by associating and matching through a unified identifier field.

[0071] The acquisition module 420 is used to perform batch read operations on the set of servo node addresses in the set of servo objects through the OPC UA client, acquire servo motor running data, and perform caching and concurrent control.

[0072] The interface generation module 430 is used to complete data binding and control command issuance based on the pre-built servo operation interface module and the servo object set, and generate a multi-level servo display interface using a unified interface template.

[0073] The display and positioning module 440 is used to construct grouping mapping relationships through the grouping identifier field in the XML configuration file, and configure filtering control components in the servo display interface at each level to realize the classification display and rapid positioning of servo motors in the servo object set.

[0074] The multi-servo control device based on XML configuration and OPC UA communication provided in this embodiment of the invention can execute the multi-servo control method based on XML configuration and OPC UA communication provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0075] Figure 5 This is a schematic diagram of an electronic device providing an embodiment of the multi-servo control method based on XML configuration and OPC UA communication. The electronic device is intended to represent various forms of digital computers, such as laptops, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0076] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, the ROM 12, and the RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0077] Multiple components in electronic device 10 are connected to input / output I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0078] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a multi-servo control method based on XML configuration and communication with OPC UA.

[0079] In some embodiments, a multi-servo control method based on XML configuration and OPC UA communication can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via read-only memory ROM 12 and / or communication unit 19. When the computer program is loaded into random access memory RAM 13 and executed by processor 11, one or more steps of the multi-servo control method based on XML configuration and OPC UA communication described above can be performed. Alternatively, in other embodiments, processor 11 can be configured in any other suitable manner to perform a multi-servo control method based on XML configuration and OPC UA communication.

[0080] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.

[0081] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0082] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0083] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to a user; and a keyboard and pointing device through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with a user; for example, feedback provided to the user can be any form of sensory feedback; and input from the user can be received in any form.

[0084] The systems and technologies described herein can be implemented in computing systems that include backend components, middleware components, or frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0085] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0086] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0087] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A multi-servo control method based on XML configuration and OPC UA communication, characterized in that, A multi-servo control system for tobacco packaging equipment includes: Based on a pre-built multi-source XML configuration file, a set of servo objects is generated through association and matching using a unified identifier field; The OPC UA client performs a batch read operation on the set of servo node addresses in the set of servo objects to obtain servo motor running data and perform caching and concurrent control. Based on the pre-built servo operation interface module, data binding and control command issuance are completed according to the servo object set, and a multi-level servo display interface is generated using a unified interface template. Grouping mapping relationships are constructed using grouping identifier fields in XML configuration files, and filtering control components are configured in the servo display interfaces at each level to achieve categorized display and rapid positioning of servo motors in the servo object set.

2. The method according to claim 1, characterized in that, Based on a pre-built multi-source XML configuration file, a set of server objects is generated through association and matching using a unified identifier field, including: A multi-source XML configuration file is constructed to perform structural decoupling modeling of the multi-servo control system. The host computer parses the multi-source XML configuration file and generates a set of servo objects by associating and matching them through a unified identifier field.

3. The method according to claim 2, characterized in that, The process of performing a batch read operation on the set of servo node addresses in the set of servo objects using the OPC UA client to obtain servo motor operating data and perform caching and concurrent control includes: Based on the servo node address set obtained by parsing the multi-source XML configuration file, the OPC UA client performs a batch read operation on the servo node address set to obtain servo motor running data and perform caching and concurrent control.

4. The method according to claim 2, characterized in that, A multi-source XML configuration file is constructed to perform structural decoupling modeling of the multi-servo control system. The host computer parses the multi-source XML configuration file and uses a unified identifier field for association and matching to generate a set of servo objects, including: Construct at least two types of XML configuration files to perform structural decoupling modeling of the multi-servo control system; The XML configuration file is read and associated using a unified identifier field to generate a set of server objects.

5. The method according to claim 4, characterized in that, The two types of XML configuration files include a status monitoring XML file and a control function XML file. The status monitoring XML file is used to define the mapping relationship between the servo motor operating status parameters and the OPC UA node. The control function XML file is used to define the servo control function parameters and uniformly configure the motor code, grouping information, device affiliation, and controller number.

6. The method according to claim 1, characterized in that, After constructing grouping mapping relationships through grouping identifier fields in the XML configuration file and configuring filtering control components in each level of the servo display interface to achieve categorized display and rapid positioning of servo motors in the servo object set, the following is also included: When a user selects a servo motor, the system matches the corresponding device location diagram based on the servo motor's identification information, thus completing the spatial location visualization linkage.

7. The method according to claim 6, characterized in that, The equipment location diagram is used to represent the installation position and part of the servo motor in the tobacco packaging equipment, and is displayed in a designated area of ​​the interface.

8. The method according to claim 4, characterized in that, The unified identifier field is either motor_code or ID, and is used for the association and matching of status parameters and control function parameters.

9. The method according to claim 1, characterized in that, The servo object set supports dynamic expansion of more than 50 servo motors, adapting to large-scale multi-servo application scenarios in tobacco packaging equipment.

10. A multi-servo control device based on XML configuration and OPC UA communication, characterized in that, A multi-servo control system for tobacco packaging equipment includes: A servo object collection generation module is used to generate a servo object collection based on a pre-built multi-source XML configuration file by associating and matching through a unified identifier field. The acquisition module is used to perform batch read operations on the set of servo node addresses in the set of servo objects through the OPC UA client, acquire servo motor running data, and perform caching and concurrent control. The interface generation module is used to complete data binding and control command issuance based on the pre-built servo operation interface module and the servo object set, and generate a multi-level servo display interface using a unified interface template. The display and positioning module is used to construct grouping mapping relationships through the grouping identifier field in the XML configuration file, and configure filtering control components in the servo display interface at each level to realize the classification display and rapid positioning of servo motors in the servo object set.