A data acquisition platform for edge computing modules of a numerical control system and a numerical control system
By designing the data acquisition platform of the edge computing module of the CNC system, including data analysis module, slave real-time status update module and sampling channel module, the problem of the inability to collect multiple types of slave data at the same time in the existing technology is solved, and high real-time and low complexity data acquisition.
Patent Information
- Application Number
- CN202310090656.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-18
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2043-01-18
AI Technical Summary
In existing CNC systems, data acquisition platforms cannot collect multiple types of slave data at the same time, resulting in high deployment complexity of edge computing modules and low real-time data acquisition.
A data acquisition platform for edge computing module of CNC system was designed, including a driver layer and an interface layer. The driver layer includes a data analysis module, a slave real-time state update module and a sampling channel module. The interface layer provides configuration and data exchange interfaces to realize multiple Slave data types are collected simultaneously.
The simultaneous acquisition of multiple slave data types is realized, which reduces the complexity of the deployment of the data acquisition platform in the edge computing module and improves the real-timeness of data acquisition.
Smart Images

Figure CN116009459B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of numerical control systems, and more specifically, relates to a data acquisition platform for an edge computing module of a numerical control system and a numerical control system. Background Art
[0002] The modern mainstream CNC system structure is a master-slave structure, which connects the various components of the CNC system into star, ring and other topological structures through the field bus. The one-master-multiple-slave architecture can simplify the calculation process. The master station performs all calculation tasks, and the slave station only needs to receive control instructions and does not need to participate in decision-making. It is simple and efficient. However, the performance of the CNC system using this architecture is limited by the computing power of the master station. When the master station is overloaded, it will indirectly affect the processing accuracy and workpiece quality.
[0003] In order to utilize the computing power of the edge computing module of the CNC system, some computing tasks can be completed on the edge side, the original data can be processed and analyzed, and the decision results can be fed back to the main station to reduce the computing pressure of the main station. The first condition for the edge computing module to perform task processing is to be able to provide data sources for various intelligent applications at the application layer on the edge computing module.
[0004] There are many different types of slave devices in the CNC system, and the data collected by the existing data acquisition platform is relatively single. In order to collect data from different types of slave devices, multiple data acquisition platforms are required, which not only increases the complexity of edge computing module deployment, but also reduces the real-time performance of data acquisition. Summary of the invention
[0005] In view of the defects of the prior art and the need for improvement, the present invention provides a data acquisition platform and a CNC system for the edge computing module of a CNC system, which aims to realize the simultaneous acquisition of data types from multiple slave stations, reduce the complexity of deploying the data acquisition platform in the edge computing module, and improve the real-time performance of data acquisition.
[0006] To achieve the above object, according to one aspect of the present invention, a data acquisition platform for an edge computing module of a numerical control system is provided, comprising: a driver layer and an interface layer, wherein the driver layer interacts with the data link layer for data, and the interface layer interacts with the application for data;
[0007] The driving layer includes: a data analysis module, a slave station real-time status update module and a sampling channel module;
[0008] The data parsing module is used to separate the uplink data frame of each slave station from the periodic aggregate frame, and parse the real-time status information of each slave station contained therein; wherein the periodic aggregate frame comes from the data link layer;
[0009] The slave station real-time status update module is used to construct an independent structure for each slave station, and the structure contains the real-time status information of the corresponding slave station and the corresponding information between the slave station and the sampling channel;
[0010] The sampling channel module includes a plurality of sampling channels, which are used to cache the real-time status information of the slave stations in the structure in a time sequence according to the corresponding information between the slave stations and the sampling channels;
[0011] The interface layer is used to configure the sampling channel according to user requirements and to implement data exchange between the application program and the sampling channel.
[0012] Furthermore, a circular buffer is provided inside each sampling channel of the sampling channel module.
[0013] Furthermore, the interface layer includes:
[0014] Register the sampling channel interface to initialize the sampling channel and configure the data type collected by the sampling channel;
[0015] Activate sampling channel interface, used to activate the configured sampling channel;
[0016] Close sampling channel interface, used to close the sampling channel in operation;
[0017] The effective data length acquisition interface is used to obtain the length of effective data in the working sampling channel;
[0018] The specified length data acquisition interface is used to extract data of specified length from the specified sampling channel.
[0019] Furthermore, the user's configuration requirements for the sampling channel are transmitted to the slave station real-time status update module in the form of a triplet through the registered sampling channel interface;
[0020] The triplet is in the form of: <channel number, device number, data number>, wherein the device number is used to represent the information of the slave station, and the data number is used to represent the real-time status information of the slave station.
[0021] Furthermore, the structure is constructed for each slave station according to the bus topology of the numerical control system and the type of each slave station.
[0022] Furthermore, the types of slave stations include servo drive devices and IO devices; for servo drive devices, the real-time status information in the structure includes: motor position, motor current, speed, servo warning enable, servo enable flag or current loop instruction.
[0023] Furthermore, for the servo drive device, the real-time status information in the structure complies with the CiA402 standard.
[0024] Furthermore, the data analysis module is also used to analyze NCUC bus message data.
[0025] According to a second aspect of the present invention, there is provided a numerical control system, comprising an edge computing module, characterized in that a data acquisition platform as described in any one of the first aspects is deployed on the edge computing module.
[0026] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:
[0027] (1) The data acquisition platform of the present invention parses the real-time status information of each slave station contained in the uplink data of each slave station separated from the periodic lumped frame through the data parsing module, constructs an independent structure for each slave station through the slave station real-time status update module, stores the real-time status information of each slave station in the corresponding structure, completes the real-time status description of each slave station, and caches the real-time status information corresponding to each slave station to the cache area of the corresponding sampling channel through the sampling channel module. The interface layer provides data services for intelligent applications, realizes the simultaneous acquisition of multiple slave station data types, and reduces the complexity of the data acquisition platform deployed in the edge computing module;
[0028] At the same time, the data collected in the present invention is cached in time sequence, and the slave status real-time update module caches the slave status information parsed from the periodic message in real time, which has the advantages of sampling time synchronization and high real-time performance.
[0029] (2) Furthermore, the buffer inside each sampling channel is designed to be circular. When the circular buffer is full, the latest data will replace the earliest data in the past. At the same time, the circular buffer can ensure the orderliness of the data and ensure that the data provided to the application layer is in chronological order. This solves the contradiction between the data processing speed of the application and the data acquisition speed of the sampling module, and ensures the validity of the data.
[0030] (3) Furthermore, the present invention represents the user's configuration requirements for the sampling channels in the form of a triple, and establishes corresponding connections between the application, interface layer, and driver layer sampling channels, making data exchange convenient and efficient.
[0031] (4) The data acquisition platform of the present invention is deployed on the edge computing module, which does not occupy the computing power of the main station equipment and effectively saves the computing resources of the main controller.
[0032] (5) Furthermore, the data analysis module of the present invention can also analyze NCUC bus message data and support NCUC bus standards.
[0033] In summary, the data acquisition platform of the present invention can realize the simultaneous acquisition of different types of data from multiple slave stations under high real-time conditions, providing data support for intelligent applications on edge computing modules. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is the overall structure diagram of the data acquisition platform of the present invention.
[0035] Figure 2 It is a schematic diagram of the architecture of the data acquisition platform of the present invention.
[0036] Figure 3 FIG. 4 is a schematic diagram of the architecture of the driving layer of the present invention.
[0037] Figure 4 It is a schematic diagram of the structure of the ring buffer in the sampling channel of the driver layer.
[0038] Figure 5 This is a topological diagram of a CNC system containing an edge computing module. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0040] like Figure 1 , Figure 2 As shown, the data acquisition platform of the edge computing module of the numerical control system provided by the embodiment of the present invention mainly includes: a driver layer and an interface layer, wherein the driver layer interacts with the data link layer for data, and the interface layer interacts with the application program;
[0041] The driver layer is used to parse the periodic lumped frames obtained from the data link layer, separate the valid data from them and complete the cache of the valid data. Among them, the field bus data in the CNC system is transmitted to the data link layer through the PHY interface, converted into lumped frames, and passed to the driver layer;
[0042] The interface layer exchanges data with the driver layer to provide the application with the valid data parsed by the driver layer, flexibly meeting the needs of the application.
[0043] Specifically, Figure 3 As shown, the driver layer mainly includes: data analysis module, slave station real-time status update module and sampling channel module.
[0044] The data analysis module is used to separate the uplink data frame of each slave station from the periodic aggregate frame and analyze the real-time status information of each slave station contained therein. At the same time, the data analysis module can also analyze the NCUC bus message data.
[0045] The slave station real-time status update module is used to build an independent structure for each slave station. The structure of each slave station contains the real-time status information of the corresponding slave station and the corresponding information between the corresponding slave station and the sampling channel; wherein, the corresponding information between the corresponding slave station and the sampling channel is also the sampling channel in the sampling channel module to which each slave station corresponds, so as to facilitate caching the real-time status information of the corresponding slave station into the cache area of the corresponding sampling channel.
[0046] Specifically, a structure is constructed for each slave station according to the bus topology of the numerical control system and the specific type of each slave station. The bus topology of the numerical control system specifies the location information of each slave station in the bus. The specific types of slave stations mainly include servo drive devices and IO devices. For servo drive devices, the real-time status information in the structure includes general data such as the position of the motor, motor current, speed, servo warning enable, servo enable flag, current loop instruction, etc. The structure is defined in accordance with the CiA402 standard. For IO devices, the real-time status information in its structure contains the internal status information of the IO device. In this embodiment, an array is used to represent its internal state. When the numerical control system is working normally, each slave station will merge its corresponding status information into the lumped frame. The edge computing module collects these data frames, and the driver layer parses these information, separates the uplink data transmitted by each slave station to the master station, extracts the status information of each slave station from these data, and updates the status information of each slave station to the corresponding structure of each slave station in real time.
[0047] The sampling channel module includes multiple sampling channels, which are used to cache the real-time status information of the slave stations in the structure in a time sequence according to the corresponding information between the corresponding slave stations and the sampling channels; at the same time, the configuration information of each sampling channel is also recorded. One sampling channel corresponds to one state of a slave station, that is, the number of sampling channels corresponds to the total number of states of all slave stations. Each sampling channel records one state of a slave station after configuration (specifically implemented through the registered sampling channel interface of the interface layer). Figure 4 As shown, each sampling channel has a circular buffer inside for caching corresponding data. The buffer is designed to be circular. When the circular buffer is full, the latest data will replace the earliest data in the past. At the same time, the circular buffer can ensure the orderliness of the data and ensure that the data provided to the application layer is in chronological order. Figure 4pHead and pTail in the table represent the head pointer and tail pointer, respectively. When reading data from the ring buffer, the data of the head pointer is read first, and then the data is read in sequence along the direction of the readable area; when writing data to the ring buffer, writing starts from the tail pointer of the ring buffer, and then the data is written in sequence along the direction of the writable area to complete the data cache. When the ring buffer is full, when the latest data is pushed in, the earliest data will be popped out of the buffer. In this embodiment, the capacity of the ring buffer is designed to be 1024, and data in the past 1024 cycle frames can be stored at most.
[0048] The interface layer is used to configure the sampling channel according to the user's needs and to realize the data exchange between the application and the sampling channel. In the present invention, the interface layer provides the following five standard interfaces for the application:
[0049] Register sampling channel interface: This interface can realize the initialization of the sampling channel and configure the type of data collected by the sampling channel;
[0050] Activate sampling channel interface: This interface is used to activate the configured sampling channel to start collecting and storing data;
[0051] Close sampling channel interface: This interface is used to close the sampling channel in operation;
[0052] Valid data length acquisition interface: This interface is used to obtain the length of valid data in the working sampling channel;
[0053] Specified length data acquisition interface: This interface is used to extract data of specified length from a specified sampling channel.
[0054] Intelligent applications can configure sampling channels through the above standard interfaces, and quickly and conveniently exchange data cached in the sampling channels.
[0055] Specifically, in the configuration of the sampling channel, in order to better describe the data that the application layer needs to sample, in the embodiment of the present invention, a triplet method is designed to describe the sampling channel. The triplet is in the form of <channel number, device number, data number>, where the device number is used to characterize the information of the slave station, that is, which slave station it is; the data number is used to characterize the real-time status information of the slave station. For example, <0,3,1> means that the data collected and cached by sampling channel 0 is the data represented by data number 1 in device 3. From the definition of the data dictionary, it is known that data number 1 corresponds to the motor current, that is, channel 0 collects the current data of slave device 3 in the current configuration. The configuration of the sampling channel can be completed by using the registered sampling channel interface of the interface layer to pass the triplet to the slave real-time status update module of the driver layer, where the triplet represents the user's configuration requirements for the sampling channel, establishes corresponding connections between the application, interface layer and each sampling channel of the driver layer, and makes data exchange convenient and efficient.
[0056] Specifically, the application uses the interface layer's register sampling channel interface to complete the attribute configuration of the sampling channel, and then uses the activate sampling channel interface to start data sampling. The application periodically repeats the following steps to complete data acquisition: access the valid data length acquisition interface to obtain the length of the valid data in the current sampling channel, and use the access result as a standard to use the acquisition of the specified length of data in the sampling channel interface to collect the specified length of valid data; through the above process, the application can obtain the target data in real time. When the channel data is not needed, the application uses the close sampling channel interface to close the working sampling channel.
[0057] The embodiment of the present invention is as follows Figure 5 The specific scheme of the present invention is further described in detail by taking the numerical control system topology structure shown as an example.
[0058] The numerical control system in the embodiment of the present invention is based on the NCUC fieldbus, and its topology contains 1 master station and 4 slave stations. The 4 slave stations are respectively the X-axis servo unit, the Y-axis servo unit, the spindle servo unit and the edge computing module in the order of the topology structure. The application on the edge computing module needs to obtain the position data of the X-axis and the current data of the spindle. The data acquisition experiment is actually verified on the data acquisition platform of the edge computing module of the numerical control system.
[0059] Application registers sampling channel: The application needs to obtain the position data of the X-axis and the current data of the main axis. According to the definition of the triplet and the data dictionary, the application needs two channels to collect two sets of data respectively:
[0060] <0,0,0>, sampling channel 0 collects data No. 0 (position data) from device 0 (X-axis servo unit);
[0061] <1,2,1>, sampling channel 1 collects data No. 1 (current data) from device 2 (spindle servo unit);
[0062] The sampling channels represented by the two triplets are registered to the data acquisition platform through the register sampling channel interface of the interface layer, and then the two channels are activated respectively using the activate sampling channel interface.
[0063] The application obtains data: The application periodically accesses the interface layer at an interval of 100ms: obtains the length of the position data in sampling channel 0, and extracts the data of the specified length in sampling channel 0; obtains the length of the current data in sampling channel 1, and extracts the data of the specified length in sampling channel 1.
[0064] In the above manner, the application can correctly and completely collect the position data of the X-axis and the current data of the main shaft through the data acquisition platform.
[0065] The above examples show that the data acquisition platform based on the edge computing module in the present invention can effectively collect data, and reasonably analyze the collected data, maintain the real-time information status of each slave station in the edge computing module, and cache specific data based on the sampling channel and supply it to the application for consumption. The data acquisition platform can complete the data collection of other slave stations inside the CNC system in a high real-time state, and can flexibly collect different data according to the needs of different applications. It can realize the simultaneous collection of real-time information status data of each slave station, and provide the collected data to the upper-level application after processing, which reduces the complexity of the deployment of the data acquisition platform in the edge computing module, and at the same time improves the real-time performance of data collection, and has good application performance in actual scenarios.
[0066] Starting from the edge computing module of the numerical control system, the present invention conducts an in-depth analysis of the data reading and writing of the field bus, studies the method of collecting raw data using device drivers, and designs different data structures according to the characteristics of different types of slave stations. In combination with the bus rules and the topological structure of the numerical control system, the collected raw data is parsed. The effective data is stored and constructed into a data platform, and data is provided to the intelligent applications in the edge computing module through a unified interface to support the development of intelligent applications. In the data acquisition platform of the present invention, the data link layer identifies the data frame and passes it to the data acquisition platform of the present invention. The data parsing module of the driver layer parses the data frame, and then the slave station real-time status update module establishes a real-time status description for each slave station. The sampling channel module selects the corresponding effective data storage, and the interface layer interacts with the data stored in the sampling channel module of the driver layer, extracts the data information in the sampling channel, and provides services for the application through the unified interface of the interface layer.
[0067] The present invention also provides a numerical control system, which includes an edge computing module, and the data acquisition platform in the above embodiment is deployed on the edge computing module.
[0068] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A data acquisition platform for edge computing modules of a numerical control system, characterized in that: include: A driver layer and an interface layer, wherein the driver layer interacts with the data link layer for data, and the interface layer interacts with the application program for data; The driving layer includes: a data analysis module, a slave station real-time status update module and a sampling channel module; The data parsing module is used to separate the uplink data frame of each slave station from the periodic aggregate frame, and parse the real-time status information of each slave station contained therein; wherein the periodic aggregate frame comes from the data link layer; The slave station real-time status update module is used to construct an independent structure for each slave station, and the structure contains the real-time status information of the corresponding slave station and the corresponding information between the slave station and the sampling channel; The sampling channel module includes a plurality of sampling channels, which are used to cache the real-time status information of the slave stations in the structure in a time sequence according to the corresponding information between the slave stations and the sampling channels; The interface layer is used to configure the sampling channel according to user requirements and to implement data exchange between the application program and the sampling channel.
2. The data acquisition platform according to claim 1, characterized in that: A circular buffer is arranged inside each sampling channel of the sampling channel module.
3. The data acquisition platform according to claim 1, characterized in that: The interface layer comprises: Register the sampling channel interface to initialize the sampling channel and configure the data type collected by the sampling channel; Activate sampling channel interface, used to activate the configured sampling channel; Close sampling channel interface, used to close the sampling channel in operation; The effective data length acquisition interface is used to obtain the length of effective data in the working sampling channel; The specified length data acquisition interface is used to extract data of specified length from the specified sampling channel.
4. The data acquisition platform according to claim 3, characterized in that: The user's configuration requirements for the sampling channel are transmitted to the slave station real-time status update module in the form of a triplet through the registered sampling channel interface; The triplet is in the form of: <channel number, device number, data number>, wherein the device number is used to represent the information of the slave station, and the data number is used to represent the real-time status information of the slave station.
5. The data acquisition platform according to claim 1, characterized in that: The structure is constructed for each slave according to the bus topology of the numerical control system and the type of each slave.
6. The data acquisition platform according to claim 5, characterized in that: The types of slaves include servo drive devices and IO devices; For a servo drive device, the real-time status information in the structure includes: motor position, motor current, speed, servo warning enable, servo enable flag or current loop instruction.
7. The data acquisition platform according to claim 6, characterized in that: For servo drive equipment, the real-time status information in the structure complies with the CiA402 standard.
8. The data acquisition platform according to claim 1, characterized in that: The data analysis module is also used to analyze the NCUC bus message data.
9. A numerical control system, comprising an edge computing module, characterized in that: The edge computing module is deployed with the data acquisition platform described in any one of claims 1 to 8.
Citation Information
Patent Citations
Series-parallel bus protocol architecture of multiple field buses of numerical control system and communication method of series-parallel bus protocol architecture
CN113760811A
Data link construction method and apparatus for access control system, and device and storage medium
WO2021056611A1