Construction method and device of self-adaptive axis control system and electronic equipment
By acquiring the determination and configuration information of the servo slaves, a mapping relationship between the protocol axis and the servo control system is established, which solves the resource consumption and compatibility issues of the EtherCAT master station when the number of servo slaves changes, and realizes flexible process data object parsing and adaptive axis control system.
Patent Information
- Application Number
- CN202510957330.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-11-14
AI Technical Summary
In existing technologies, Codesys' EtherCAT master station consumes significant resources when the number of servo slaves changes considerably, and it is incompatible with multiple servo types, lacks flexibility, and cannot directly parse process data object messages.
By obtaining the determination information of the servo slave station, setting it according to the configuration information, and adding it to the master station through the network protocol, a mapping association between multiple protocol axes and the servo control system is established to realize an adaptive axis control system.
It enhances the system's flexibility, enabling direct parsing of process data object messages and adapting to changes in the servo slave without requiring code modifications, thus saving resources.
Smart Images

Figure CN120949554A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation technology, and more specifically, to a method, apparatus, and electronic device for constructing an adaptive axis control system. Background Technology
[0002] As an open industrial automation software platform, the Controller Development System (Codesys) boasts excellent cross-platform compatibility and scalability, leading to its increasingly widespread applications. Its integrated Ethernet for Control Automation Technology (EtherCAT) master station, with its strong versatility, low communication latency, and superior synchronization performance, has been widely used in practical engineering scenarios such as servo control, robotics, and CNC systems. In real-world applications, the master station connects to multiple servo slave stations. Customers may need to add or remove additional axes at the tail end for different operating conditions, or switch between different brands of servo slave stations due to cost and performance considerations.
[0003] In existing technologies, the configuration of master and slave stations based on operating conditions mainly relies on the simplified device startup configuration attribute provided by Codesys' EtherCAT master station. This attribute supports the actual number of slave stations used being less than the configured number. However, this configuration method requires configuring the maximum number of slave stations on the device tree side when the number of slave stations varies greatly, resulting in high resource consumption. Moreover, the configured slave type must be consistent with the actual slave type, making it incompatible with multiple slave types. To solve the above problems, Codesys also provides a dynamic configuration scheme, which adds and configures slave stations by scanning code and dynamically identifies slave stations. However, this scheme does not have a device tree and cannot adapt to protocol axes (generally the AXIS_REF_ETC_DS402_CS axis, also known as the 402 axis, which is attached to the slave station device tree). Users need to parse the process data object (PDO) message themselves, resulting in poor flexibility. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method, apparatus and electronic device for constructing an adaptive axis control system, which can solve the technical problem in the prior art that the process data object message cannot be directly parsed, resulting in poor flexibility.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:
[0006] In a first aspect, embodiments of the present invention provide a method for constructing an adaptive axis control system, comprising:
[0007] Obtain the determination information of each servo slave station connected to the master station, and determine the configuration information of each servo slave station based on the determination information;
[0008] According to the configuration information, each of the servo slave stations is configured according to the corresponding configuration information, and the configured servo slave stations are added to the master station through the network protocol to obtain the servo control system;
[0009] Multiple protocol axes are established based on the master station, and the protocol axes are mapped and associated with the servo slave stations in the servo control system to obtain the adaptive axis control system; wherein each servo slave station is mapped and associated with one or more protocol axes.
[0010] Furthermore, this embodiment of the invention provides a first possible implementation of the first aspect, wherein the step of establishing multiple protocol axes based on the master station, mapping and associating each protocol axis with its corresponding servo slave station in the servo control system to obtain the adaptive axis control system includes:
[0011] Multiple initial protocol axes are generated based on the main station, and the axis parameters of each initial protocol axis are set to obtain multiple protocol axes; wherein, the axis parameters include: axis type, axis identifier and scaling parameters;
[0012] Based on the configuration information of each servo slave in the servo system, establish a dictionary of process data objects corresponding to each servo slave;
[0013] Establish a list of the locations of each process data object based on the dictionary of each process data object;
[0014] The adaptive axis control system is obtained by mapping and associating each of the protocol axes with the corresponding process data object location list of each of the servo slave stations.
[0015] Furthermore, this embodiment of the invention provides a second possible implementation of the first aspect, wherein the step of establishing a location list of each process data object based on each process data object dictionary includes:
[0016] Determine the bit size of each process data object array in the dictionary of each process data object;
[0017] The position of each process data object array is determined based on the bit size of each process data object array;
[0018] Establish a list of the positions of each process data object based on the position of each process data object array.
[0019] Furthermore, this embodiment of the invention provides a third possible implementation of the first aspect, wherein the step of mapping and associating each of the protocol axes with the corresponding process data object location lists of each of the servo slave stations to obtain the adaptive axis control system includes:
[0020] The adaptive axis control system is obtained by mapping and associating the variables in each protocol axis with the positions of the process data object arrays in each process data object position list through parameter identifiers.
[0021] Furthermore, this embodiment of the invention provides a fourth possible implementation of the first aspect, which further includes the step of:
[0022] The control cycle and deceleration ratio of the protocol axis in the adaptive axis control system are set to obtain the optimized adaptive axis control system.
[0023] Furthermore, this embodiment of the invention provides a fifth possible implementation of the first aspect, wherein the step of obtaining determination information of each servo slave station connected to the master station, and determining the configuration information of each servo slave station based on the determination information, includes:
[0024] Obtain configuration information and determination information for different models of servo slave stations; wherein, the determination information is model data;
[0025] Based on the configuration and determination information of the servo slave, configuration files corresponding to different models of servo slaves are constructed respectively;
[0026] The configuration information of each of the aforementioned slave servers connected to the master station is determined based on the configuration files.
[0027] Furthermore, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein the step of determining the configuration information corresponding to each of the server slave stations connected to the master station based on each of the configuration files includes:
[0028] Obtain the determination information of each of the server slave stations connected to the master station; wherein, the determination information includes: vendor ID and product ID;
[0029] The configuration files are filtered based on the determination information of each of the servo slaves to obtain the filtered configuration files; wherein the determination information in each of the filtered configuration files is the same as the determination information of each of the servo slaves.
[0030] Based on the filtered configuration files, the configuration information corresponding to each of the servo slave stations connected to the master station is determined.
[0031] Furthermore, this embodiment of the invention provides a seventh possible implementation of the first aspect, wherein the step of configuring each of the server slave stations according to the corresponding configuration information includes:
[0032] The current configuration parameters of each servo slave are set to be consistent with the corresponding configuration information; wherein, the configuration information includes: receive process data object, send process data object, distributed clock data, fieldbus memory management unit data, and synchronization manager data.
[0033] This invention provides a method for constructing an adaptive axis control system, comprising: obtaining determination information of each servo slave station connected to a master station; determining configuration information of each servo slave station based on the determination information; configuring each servo slave station according to the corresponding configuration information; adding each configured servo slave station to the master station via a network protocol to obtain a servo control system; establishing multiple protocol axes based on the master station and mapping and associating the protocol axes with the servo slave stations in the servo control system to obtain an adaptive axis control system; wherein each servo slave station is mapped and associated with one or more protocol axes. This invention obtains configuration information of each servo slave station based on the determination information, configures each servo slave station according to the configuration information to meet subsequent usage requirements, adds each servo slave station to the servo control system, and maps and associates the protocol axes with the servo slave stations in the servo control system to complete the mapping between protocol axes and servo slave stations, thereby obtaining an adaptive axis control system. The adaptive axis control system obtained by this construction method can directly obtain the communication status of each servo slave station through the protocol axes, realize the parsing of process data object messages, and improve the flexibility of the system.
[0034] Secondly, embodiments of the present invention provide a construction apparatus for an adaptive axis control system, comprising:
[0035] The slave station addition module is used to obtain the determination information of each servo slave station connected to the master station, and determine the configuration information of each servo slave station based on the determination information;
[0036] The slave station configuration module is used to configure each of the servo slave stations according to the configuration information, and add each of the configured servo slave stations to the master station through the network protocol to obtain the servo control system.
[0037] The system acquisition module is used to establish multiple protocol axes based on the master station and map and associate the protocol axes with the servo slave stations in the servo control system to obtain the adaptive axis control system; wherein each servo slave station is mapped and associated with one or more protocol axes.
[0038] Thirdly, embodiments of the present invention provide an electronic device, characterized in that it includes: a processor and a storage device;
[0039] The storage device stores a computer program, which, when executed by the processor, performs the construction method of the adaptive axis control system described above.
[0040] Other features and advantages of the embodiments of the present invention will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above in the embodiments of the present invention.
[0041] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0042] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0043] Figure 1 A flowchart illustrating a method for constructing an adaptive axis control system according to an embodiment of the present invention is shown.
[0044] Figure 2 This diagram illustrates a mapping relationship between a protocol axis and a servo slave station provided by an embodiment of the present invention.
[0045] Figure 3 A schematic diagram of an adaptive shaft control system provided by an embodiment of the present invention is shown;
[0046] Figure 4 The diagram illustrates a process flow for constructing an adaptive axis control system according to an embodiment of the present invention.
[0047] Explanation of reference numerals in the attached figures:
[0048] 30 - Main station; 31 - First slave station; 32 - Second slave station; 33 - Third slave station; 34 - Fourth slave station; 35 - Fifth slave station; 36 - Sixth slave station. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0050] This embodiment provides a method, apparatus, and electronic device for constructing an adaptive axis control system. (See also...) Figure 1 The diagram shows a flowchart of a method for constructing an adaptive axis control system. This method mainly includes:
[0051] Step S100: Obtain the determination information of each servo slave station connected to the master station, and determine the configuration information of each servo slave station based on the determination information.
[0052] In the above steps, the configuration information of each servo slave station physically connected to the master station is determined by determining the information. The configuration information includes the specific values of each parameter of each servo slave station.
[0053] Step S200: According to the configuration information, each servo slave station is configured according to the corresponding configuration information, and the configured servo slave station is added to the master station through the network protocol to obtain the servo control system;
[0054] Each servo slave is configured according to the specific values of each parameter contained in the configuration information to meet the usage requirements. Then, each configured servo slave is added to the master station through the network protocol to obtain the servo control system. Specifically, each servo slave is added to the master station in turn by calling the AddSlave interface and the network protocol to obtain the servo control system.
[0055] Step S300: Establish multiple protocol axes based on the master station, and map and associate the protocol axes with the servo slave stations in the servo control system to obtain an adaptive axis control system; wherein, each servo slave station is mapped and associated with one or more protocol axes.
[0056] In the above steps, based on the configuration information of each servo slave station, the number of protocol axes (specifically including 402 axes) corresponding to each servo slave station is determined (i.e., the number of axes that each servo slave station has). Based on the master station, the corresponding number of protocol axes for each servo slave station is established. Each servo slave station is mapped and associated with its corresponding number of protocol axes, and finally, an adaptive axis control system is obtained.
[0057] The method for constructing the adaptive axis control system provided in this embodiment of the invention obtains the configuration information of each servo slave station based on the determined information, sets each servo slave station according to the configuration information so that each servo slave station meets the subsequent usage requirements, and then adds each servo slave station to the servo control system. The protocol axis is mapped and associated with the servo slave station in the servo control system to complete the mapping between the protocol axis and the servo slave station, thereby obtaining the adaptive axis control system. In the adaptive axis control system obtained by this construction method, the communication status of each servo slave station can be directly obtained through the protocol axis, realizing the parsing of process data object messages and improving the flexibility of the system.
[0058] In one embodiment, this embodiment provides a specific implementation method for establishing multiple protocol axes based on a master station, mapping and associating each protocol axis with its corresponding servo slave station in the servo control system to obtain an adaptive axis control system. This implementation method further includes:
[0059] Step S310: Generate multiple initial protocol axes based on the main station, and set the axis parameters of each initial protocol axis to obtain multiple protocol axes; wherein, the axis parameters include: axis type, axis identifier and scaling parameters;
[0060] The master station establishes the initial protocol axis corresponding to each servo slave based on the number of axes of each servo slave. It sets the axis parameters (including axis type, axis identifier, and scaling parameters) of each initial protocol axis, and sets the axis type (including rotation axis, linear axis, and virtual axis, etc.), axis identifier (including the logical name and topology position of the protocol axis, etc.), and scaling parameters (including position scaling and speed scaling, etc.) of each initial protocol axis to obtain multiple protocol axes.
[0061] Step S320: Based on the configuration information of each servo slave in the servo system, establish a dictionary of process data objects corresponding to each servo slave;
[0062] Based on the configuration information of each servo slave in the servo system, a dictionary of process data objects corresponding to each servo slave is established. For details, see [link to documentation]. Figure 2 The diagram shown illustrates a mapping relationship between a protocol axis and a servo slave station. Figure 2 The left-hand list shows that the process data object dictionary stores various process data objects (including control words, status words, target positions, actual positions, operation modes, error codes, etc.). Each process data object is defined as a 32-bit integer array format, and each integer array is represented by 8 characters. For example, the character "60400010" represents a control word, 6040 is the primary index, 00 is the sub-index, and 10 is the bit size (i.e., data length).
[0063] Step S330: Establish a list of the locations of each process data object based on the dictionary of each process data object;
[0064] In the above steps, since the process data object message (i.e., PDO message) is obtained by compactly splicing together each protocol axis object (i.e., 402 axis object) in the process data dictionary, the process data object array in each process data object dictionary corresponding to each servo slave is traversed, and the bit size of the preceding process data object of the process data object is accumulated to obtain the position of the process data object in the process data object dictionary (i.e., the offset of each process data object in the process data object message), thus finally obtaining the process data object position list.
[0065] Step S340: Map and associate each protocol axis with the corresponding process data object position list of each servo slave station to obtain the adaptive axis control system;
[0066] The purpose of the above steps is to establish associations between each protocol axis (402 axis) and its corresponding servo slave, so that each associated protocol axis can obtain the communication status of its corresponding servo slave and control the corresponding servo slave to perform internal state switching. By mapping and associating the corresponding variables in each protocol axis with the positions obtained from the process data object position list of each servo slave, the object variables in the protocol axis corresponding to the commonly used process data objects are found, and the position mapping (i.e., address mapping) between each protocol axis and each process data object is realized.
[0067] In one embodiment, this embodiment provides a specific implementation method for establishing a list of locations for each process data object based on a dictionary of each process data object, which further includes:
[0068] Step S331: Determine the bit size of each process data object array in the dictionary of each process data object;
[0069] In the above steps, the bit size of each process data object array is determined based on the last two bits of each process data object array in the process data object dictionary. Specifically, for example... Figure 2 As shown, Figure 2 The list on the left is a dictionary of process data objects corresponding to the servo slave. Each 8-bit character represents a 32-bit integer array for each process data object, and the last two bits of each 8-bit character represent the bit size of each process data object. For example, Figure 2 The '08' in the 'process data object' represents the operation mode in the process data object. The last two characters '08' are in hexadecimal and can be represented as 16#08.
[0070] Step S333: Determine the position of each process data object array based on the bit size of each process data object array;
[0071] Each process data object array is arranged sequentially in the process data object dictionary. The specific process data object it represents is determined by the first 6 characters of each process data object array in the dictionary. The position (i.e., byte offset) of each process data object array is determined by the size of its preceding process data object array in the dictionary. Specifically, for example... Figure 2As shown, for example, the character "60400010" in the left-hand list represents a control word. Its predecessor process data objects in the process data object dictionary include the characters "60600008" and "607A0020". The bit sizes of the predecessor process data objects are "16#08" and "16#20" respectively. Converting them to decimal gives "10#08" and "10#32". Calculating the sum of the bit sizes of the two predecessor process data objects in decimal gives "10#40". Since the size of each byte is 8, dividing the sum of the bit sizes "10#40" by 8 gives the final control word position as 5 (i.e., byte offset is 5).
[0072] Step S335: Establish a list of the positions of each process data object based on the positions of each process data object array;
[0073] In the above steps, such as Figure 2 As shown, based on Figure 2 The left-hand process data object dictionary contains arrays of process data objects, which determine the location of each process data object. Figure 2 The middle part is a list of process data object locations, which includes: "control word (5)", "status word (*)", "target location (*)", "actual location (*)", "operation mode (0)", and "error code (*)". Specifically, "(*)" is the address bar in the process data object location list. "*" can be filled with any integer, representing the location (i.e., byte offset) of each process data object. For example, "(5)" means that "*" is 5 at this time, which means that the control word location is 5 (i.e., the byte offset is 5), and "(0)" means that "*" is 0 at this time, which means that the operation mode location is 0 (i.e., the byte offset is 0).
[0074] In one embodiment, this embodiment provides a specific implementation method for mapping and associating each protocol axis with the corresponding process data object location list of each servo slave station to obtain an adaptive axis control system, which further includes:
[0075] Step S341: Map and associate the variables in each protocol axis with the positions of the process data object arrays in each process data object position list using parameter identifiers to obtain the adaptive axis control system;
[0076] The variables in each protocol axis are mapped and associated with each process data object and its position in the process data object location list through a unique parameter identifier (i.e., a unique ParaID). For example, the variable wControlWord in the protocol axis is mapped and associated with the control word and its position through a unique parameter identifier.
[0077] In one embodiment, the specific implementation method for constructing an adaptive axis control system provided in this embodiment further includes:
[0078] Step S400: Set the control cycle and reduction ratio of the protocol axis in the adaptive axis control system to obtain the optimized adaptive axis control system;
[0079] Since the adaptive axis control system obtained by the construction method provided in this embodiment of the invention defines and maps the servo slave and the protocol axis through code instead of using the device tree to associate the protocol axis, it lacks a configuration interface and background call. Therefore, it is necessary to configure the control cycle and deceleration ratio of the protocol axis through code to simulate the device tree behavior of the traditional axis control system and obtain the optimized adaptive axis control system.
[0080] In one embodiment, this embodiment provides a specific implementation method for obtaining determination information of each servo slave station connected to the master station, and determining the configuration information of each servo slave station based on the determination information, which further includes:
[0081] Step S110: Obtain configuration information and confirmation information for different models of servo slaves; wherein, the confirmation information is model data;
[0082] The above steps involve obtaining the identification and configuration information of each servo slave station with different models (i.e., commonly used brands). Obtaining the identification information (i.e., model data) facilitates the subsequent identification of each servo slave station based on the model data (including manufacturer ID and product ID). Obtaining the configuration information allows the servo slave station to be configured according to the configuration information corresponding to the signal servo slave station after the model of each servo slave station is determined.
[0083] Step S120: Based on the configuration information and determination information of the servo slave, construct the configuration files corresponding to different models of servo slaves;
[0084] In the above steps, in order to store the determination and configuration information of each servo slave in a data format that is easy to retrieve and parse, the structure of each servo slave is defined according to the standard parameter format of the servo slave in Codesys. The configuration and determination information of different models of servo slaves are filled into the corresponding structure of each servo slave. Then, the structure of each servo slave is stored according to the standard configuration parameter format of Codesys to obtain the configuration files corresponding to different models of servo slaves.
[0085] Step S130: Determine the configuration information of each servo slave station connected to the master station based on each configuration file;
[0086] In the above steps, in order to identify each servo slave station physically connected to the master station and determine the configuration information of each servo slave station based on the preset configuration file, it is convenient to set each servo slave station according to the configuration information of each servo slave station in the future, thereby realizing adaptive configuration of each servo slave station.
[0087] Furthermore, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein the step of determining the configuration information corresponding to each servo slave station connected to the master station based on each configuration file includes:
[0088] Step S131: Obtain the determination information of each servo slave station connected to the master station; wherein, the determination information includes: vendor ID and product ID;
[0089] In the above steps, the determination information of each servo slave connected to the master station is obtained. Specifically, the number of servo slaves physically connected to the master station is obtained by calling the ReadNbrSlaves function block in the programmable logic controller, and then the vendor ID and product ID of the servo slaves physically connected to the master station are obtained by calling the ReadEEpromData function block.
[0090] Step S133: Based on the determination information of each servo slave station, the configuration files are filtered to obtain the filtered configuration files; wherein the determination information in each filtered configuration file is the same as the determination information of each servo slave station.
[0091] In the above steps, each configuration file is filtered based on the determination information of each servo slave (i.e., vendor ID and product ID), and the configuration files corresponding to those that are the same as the vendor ID and product ID of each servo slave connected to the master station are obtained.
[0092] Step S135: Determine the configuration information corresponding to each servo slave station connected to the master station based on the filtered configuration files;
[0093] Since the vendor ID and product ID in each of the filtered configuration files are the same as those in each servo slave, the configuration information in each configuration file is obtained to determine the configuration information corresponding to each servo slave.
[0094] Furthermore, this embodiment of the invention provides a seventh possible implementation of the first aspect, wherein the step of configuring each servo slave station according to corresponding configuration information includes:
[0095] Step S210: Set the current configuration parameters of each servo slave station to match the corresponding configuration information; wherein, the configuration information includes: receive process data object, send process data object, distributed clock data, fieldbus memory management unit data, and synchronization manager data.
[0096] Set the configuration parameters of each servo slave station to be consistent with the corresponding configuration information settings. The configuration information includes the Transmit Process Data Object (TXPDO), the Receive Process Data Object (RXPDO), the Distributed Clock (DC) data, the Fieldbus Memory Management Unit (FMMU) data, and the SyncManager (SM) data.
[0097] The adaptive axis control system constructed by the method provided in this invention needs to periodically call the input pre-read processing function (Before Read Input, BRI), input post-read processing function (After Read Input, ARI), output pre-processing function (Before Write Output, BWO), and output post-write processing function (After Write Output, AWO) of the protocol axis (i.e., axis 402) during subsequent use, so as to complete the data interaction, parsing, uploading, and downloading.
[0098] This invention provides a method for constructing an adaptive axis control system. The method involves acquiring the determination and configuration information of various servo slave stations currently available on the market, filling this information into a configuration file according to the Codesys slave station standard parameter format, resulting in an easily searchable and parsable configuration file. This configuration file supports multiple brands of servo slave stations, allowing users to switch servo brands based on cost and performance requirements without modifying the code. When a brand not in the configuration file appears among the connected servo slave stations, a new configuration file is imported. The method determines the number and determination information of each servo slave station physically connected to the master station, filters the configuration files based on this information, configures each servo slave station using the configuration files, and adds the configured servo slave stations to the master station via network protocol, thus obtaining a servo control system. The process of obtaining the servo control system... The system employs automated code implementation, adapting to the brand of each servo slave and accommodating changes in servo slaves. This avoids the need for source code modification and reconfiguration required when changing servo slave brands, as is common in traditional device tree configurations. By dynamically identifying the number of servo slaves physically connected to the master station through code, the system enhances code adaptability, saves resources, eliminates the need for device tree setup, and avoids adding a maximum number of servo slaves and protocol axes on the device tree side. Dynamic configuration of servo slaves is achieved through code. Multiple protocol axes are established based on the master station, and each protocol axis is mapped and associated with each servo slave in the servo control system to obtain an adaptive axis control system. This process is also implemented through code. After establishing the mapping association, users no longer need to control the protocol axes through EtherCAT details but can directly call the Programmable Logic Controller (PLC). The Logic Controller Open (PLCOpen) function block controls the protocol axis, adds variable mapping functions on the basis of the protocol axis, and establishes a connection with the servo slave station, shielding the underlying details and simplifying user operation. Users can adapt to various working conditions with little or no modification to the motion control code. Based on the code, the control cycle and deceleration ratio of the protocol axis are configured to obtain an optimized adaptive axis control system.
[0099] This invention provides a method for constructing an adaptive axis control system. The adaptive axis control system obtained by this method can detect changes in the number of protocol axes through motion control code during subsequent use. It can adaptively adjust the number of controllable protocol axes according to the operating conditions of the adaptive axis control system, for example, by adding or removing protocol axes, or adding or removing control units in the adaptive axis control system (the purpose of which is to achieve multi-protocol axis composite applications). This allows a single set of motion control code to adapt to different operating conditions and multiple brands of servo slaves. For details, see... Figure 3The diagram shows an adaptive axis control system. In the first operating condition, the master station 30 is connected to the first slave station 31, ..., the fourth slave station 34, requiring only four servo slave stations. In the second operating condition, two additional axes (i.e., the fifth slave station 35 and the sixth slave station 36) are added as auxiliary control, building upon the first operating condition. In the third operating condition, the first slave station 31 and the second slave station 332 need to be replaced with high-power brands. The switching between different operating conditions is achieved through motion control code, allowing users to switch or add servo slave stations according to different operating conditions without modifying the code. This solves the compatibility problem of motion control code when the number and brand of servo slave stations change.
[0100] Secondly, embodiments of the present invention provide a construction apparatus for an adaptive axis control system, comprising:
[0101] The slave station addition module is used to obtain the determination information of each servo slave station connected to the master station, and determine the configuration information of each servo slave station based on the determination information;
[0102] The slave configuration module is used to configure each servo slave according to the corresponding configuration information, and then add each configured servo slave to the master station through the network protocol to obtain the servo control system.
[0103] The system acquisition module is used to establish multiple protocol axes based on the master station and map and associate the protocol axes with the servo slave stations in the servo control system to obtain an adaptive axis control system; wherein, each servo slave station is mapped and associated with one or more protocol axes.
[0104] Thirdly, embodiments of the present invention provide an electronic device, characterized in that it includes: a processor and a storage device;
[0105] The storage device stores a computer program, which, when run by the processor, executes the construction method of the adaptive axis control system described above.
[0106] Based on the foregoing embodiments, this embodiment provides an example of constructing an adaptive axis control system using the aforementioned construction method, see, for example... Figure 4 The diagram shown illustrates a method for constructing an adaptive axis control system. The specific steps are as follows:
[0107] Step S601: Obtain the determination information and configuration information of the servo slave stations of various brands currently on the market, and establish a configuration file based on the determination information and configuration information; wherein, the determination information includes: manufacturer ID and product ID; the configuration information includes: DC, FMMU, SM, RXPDO and TXPDO;
[0108] Step S603: Based on the code, determine the number and information of each servo slave station physically connected to the master station; based on the information, filter to obtain the configuration file corresponding to each servo slave station; and set the configuration parameters of each servo slave station to be consistent with the configuration information in the corresponding configuration file.
[0109] Step S605: Add each configured servo slave station to the master station via network protocol to obtain the servo control system;
[0110] Step S607: Determine the process object data and its location corresponding to each servo slave station based on the process data object dictionary of each servo slave station, and establish a process data object location list corresponding to each servo slave station based on the process object data and its location.
[0111] Step S609: Establish multiple protocol axes based on the master station, determine the number of axes supported by each servo slave station through code, and establish a mapping association between the protocol axes and the corresponding process data object location list of each servo slave station through parameter identifiers to obtain an adaptive axis control system; wherein, the number of protocol axes associated with each servo slave station is the same as the number of axes it supports;
[0112] Step S611: Based on the code settings, the control cycle and deceleration ratio of each protocol axis are set to obtain the optimized adaptive axis control system.
[0113] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0114] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for constructing an adaptive axis control system, characterized in that, include: Obtain the determination information of each servo slave station connected to the master station, and determine the configuration information of each servo slave station based on the determination information; According to the configuration information, each of the servo slave stations is configured according to the corresponding configuration information, and the configured servo slave stations are added to the master station through the network protocol to obtain the servo control system; Multiple protocol axes are established based on the master station, and the protocol axes are mapped and associated with the servo slave stations in the servo control system to obtain the adaptive axis control system; wherein each servo slave station is mapped and associated with one or more protocol axes.
2. The construction method according to claim 1, characterized in that, The step of establishing multiple protocol axes based on the master station, mapping and associating each protocol axis with its corresponding servo slave station in the servo control system to obtain the adaptive axis control system includes: Multiple initial protocol axes are generated based on the main station, and the axis parameters of each initial protocol axis are set to obtain multiple protocol axes; wherein, the axis parameters include: axis type, axis identifier and scaling parameters; Based on the configuration information of each servo slave in the servo system, establish a dictionary of process data objects corresponding to each servo slave; Establish a list of the locations of each process data object based on the dictionary of each process data object; The adaptive axis control system is obtained by mapping and associating each of the protocol axes with the corresponding process data object location list of each of the servo slave stations.
3. The construction method according to claim 2, characterized in that, The step of establishing a list of the locations of each process data object based on the dictionary of each process data object includes: Determine the bit size of each process data object array in the dictionary of each process data object; The position of each process data object array is determined based on the bit size of each process data object array; Establish a list of the positions of each process data object based on the position of each process data object array.
4. The construction method according to claim 3, characterized in that, The step of mapping and associating each of the protocol axes with the corresponding process data object location list of each of the servo slave stations to obtain the adaptive axis control system includes: The adaptive axis control system is obtained by mapping and associating the variables in each protocol axis with the positions of the process data object arrays in each process data object position list through parameter identifiers.
5. The construction method according to claim 1, characterized in that, It also includes the following steps: The control cycle and deceleration ratio of the protocol axis in the adaptive axis control system are set to obtain the optimized adaptive axis control system.
6. The construction method according to claim 1, characterized in that, The step of obtaining the determination information of each servo slave station connected to the master station, and determining the configuration information of each servo slave station based on the determination information, includes: Obtain configuration information and determination information for different models of servo slave stations; wherein, the determination information is model data; Based on the configuration and determination information of the servo slave, configuration files corresponding to different models of servo slaves are constructed respectively; The configuration information of each of the aforementioned slave servers connected to the master station is determined based on the configuration files.
7. The construction method according to claim 6, characterized in that, The step of determining the configuration information corresponding to each of the server slave stations connected to the master station based on each of the configuration files includes: Obtain the determination information of each of the server slave stations connected to the master station; wherein, the determination information includes: vendor ID and product ID; The configuration files are filtered based on the determination information of each of the servo slaves to obtain the filtered configuration files; wherein the determination information in each of the filtered configuration files is the same as the determination information of each of the servo slaves. Based on the filtered configuration files, the configuration information corresponding to each of the servo slave stations connected to the master station is determined.
8. The construction method according to claim 1, characterized in that, The step of configuring each of the servo slave stations according to the corresponding configuration information includes: The current configuration parameters of each servo slave are set to be consistent with the corresponding configuration information; wherein, the configuration information includes: receive process data object, send process data object, distributed clock data, fieldbus memory management unit data, and synchronization manager data.
9. A device for constructing an adaptive axis control system, characterized in that, include: The slave station addition module is used to obtain the determination information of each servo slave station connected to the master station, and determine the configuration information of each servo slave station based on the determination information; The slave station configuration module is used to configure each of the servo slave stations according to the configuration information, and add each of the configured servo slave stations to the master station through the network protocol to obtain the servo control system. The system acquisition module is used to establish multiple protocol axes based on the master station and map and associate the protocol axes with the servo slave stations in the servo control system to obtain the adaptive axis control system; wherein each servo slave station is mapped and associated with one or more protocol axes.
10. An electronic device, characterized in that, include: Processors and storage devices; The storage device stores a computer program that, when executed by the processor, performs the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Control system and method for rotating speed of motor spindle of numerical control system
CN102393762A
Automatic configuration method for hybrid reconfigurable CANopen slave station
CN106483930A
EtherCAT modular multi-axis servo driver and internal communication method
CN115347985A
Industrial Ethernet protocol conversion device and method
CN117749905A
Industrial robot EtherCAT multi-slave-station dynamic configuration method
CN118535210A