System, method, device, processor and storage medium for realizing field bus driver management aiming at CNC software

文档序号:67382 发布日期:2021-10-01 浏览:34次 中文

阅读说明:本技术 针对cnc软件实现现场总线驱动器管理的系统、方法、装置、处理器及其存储介质 (System, method, device, processor and storage medium for realizing field bus driver management aiming at CNC software ) 是由 李康 姜洪宇 牟凤林 于 2021-07-07 设计创作,主要内容包括:本发明涉及一种针对CNC软件实现现场总线驱动器管理的系统,包括应用层,用于封装总线驱动器服务;中间件,与所述的应用层相连接,用于对运行时的总线驱动器服务进行数据的解析、下发及上报;驱动层,与所述的中间件相连接,用于定义数据报文格式,进行中间件与固件层的数据通信;固件层,与所述的驱动层相连接,用于封装总线驱动器协议栈,统一自定报文格式。本发明还涉及相应的方法、装置、处理器及其计算机可读存储介质。采用了本发明的针对CNC软件实现现场总线驱动器管理的系统、方法、装置、处理器及其计算机可读存储介质,所有驱动器连接可在1s内完成,提高初始化效率,驱动层现场总线驱动器管理库可以方便的移植,对上接口统一,本发明可连接M2/M3/EtherCAT任意总线类型驱动器,配置灵活。(The invention relates to a system for realizing field bus driver management aiming at CNC software, which comprises an application layer, a bus driver management layer and a bus driver management layer, wherein the application layer is used for encapsulating bus driver services; the middleware is connected with the application layer and used for analyzing, issuing and reporting data of the bus driver service during operation; the driving layer is connected with the middleware and used for defining the format of the data message and carrying out data communication between the middleware and the firmware layer; and the firmware layer is connected with the drive layer and used for packaging a bus driver protocol stack and unifying the self-defined message format. The invention also relates to a corresponding method, device, processor and computer readable storage medium thereof. By adopting the system, the method, the device, the processor and the computer readable storage medium for realizing the field bus driver management aiming at the CNC software, all driver connections can be completed within 1s, the initialization efficiency is improved, the field bus driver management library of the driving layer can be conveniently transplanted, the upper interfaces are unified, the system can be connected with any bus type driver of M2/M3/EtherCAT, and the configuration is flexible.)

1. A system for implementing fieldbus driver management for CNC software, the system comprising:

an application layer for encapsulating bus driver services;

the middleware is connected with the application layer and used for analyzing, issuing and reporting data of the bus driver service during operation;

the driving layer is connected with the middleware and used for defining the format of the data message and carrying out data communication between the middleware and the firmware layer;

and the firmware layer is connected with the drive layer and used for packaging a bus driver protocol stack and unifying the self-defined message format.

2. The system for CNC software implemented fieldbus driver management of claim 1, wherein the middleware reads various driver profiles at initialization; when releasing, disconnecting all drivers and releasing equipment resources; and unifying the pair of upper function interfaces.

3. The system for CNC software implementation of fieldbus driver management as claimed in claim 1, wherein the firmware layer encapsulation bus driver protocol stack is specifically configured with different protocol stacks according to ID of application layer issued message.

4. A method for implementing fieldbus driver management for CNC software based on the system of claim 1, characterized in that the method comprises the following steps:

(1) analyzing the configuration file;

(2) integrating the vendor configuration file and the configuration supplement to the driver into a total configuration file;

(3) encrypting the total configuration file, converting the total configuration file into a binary file, and sending the binary file to a controller;

(4) the controller analyzes the binary file into a driver configuration file which is distributed to each driver functional unit and each protocol stack, and the firmware environment configuration is completed;

(5) the application layer calls a driver service interface to execute a specified function, and configures a driver address and a communication cycle;

(6) the firmware layer carries out driver connection and reports a connection state after the execution is finished;

(7) and accessing the driver alarm, parameters and subfunctions to be in a master-slave response mode, calling a service interface by an application layer, and executing a specified function by a firmware layer according to an initial configuration file.

5. The method for implementing fieldbus driver management for CNC software according to claim 1, wherein the step (1) comprises the steps of:

read drive profile name, path and independent configuration complement to the drive, read drive's functional support configuration.

6. An apparatus for implementing fieldbus driver management for CNC software, the apparatus comprising:

a processor configured to execute computer-executable instructions;

a memory storing one or more computer-executable instructions that, when executed by the processor, perform the steps of the method of implementing fieldbus driver management for CNC software of claim 4 or 5.

7. A processor for implementing fieldbus driver management for CNC software, characterised in that the processor is configured to execute computer-executable instructions which, when executed by the processor, implement the steps of the method of implementing fieldbus driver management for CNC software of claim 4 or 5.

8. A computer-readable storage medium, on which a computer program is stored which is executable by a processor for carrying out the steps of the method of carrying out fieldbus driver management for CNC software of claim 4 or 5.

Technical Field

The invention relates to the field of field bus technology, in particular to the field of field bus driver management of CNC software, and specifically relates to a system, a method, a device, a processor and a computer readable storage medium for realizing field bus driver management aiming at CNC software.

Background

The CNC software execution unit belongs to application layer behaviors and is related to a machining process, tool path analysis and the like, but the current CNC system has too many execution units related to the functions of the driver, the control right of the driver is completely dispersed in each sub-function module, and the CNC system is not convenient for later maintenance, low in execution efficiency, and has the defects of unsmooth cooperation and the like.

Disclosure of Invention

The present invention is directed to overcome the above-mentioned shortcomings of the prior art, and provides a system, a method, an apparatus, a processor and a computer readable storage medium thereof for implementing fieldbus driver management for CNC software, which are convenient to maintain, efficient to execute, and wide in application range.

To achieve the above objects, the system, method, apparatus, processor and computer readable storage medium thereof for CNC software implementing fieldbus driver management of the present invention are as follows:

the system for realizing the field bus driver management aiming at the CNC software is mainly characterized by comprising the following steps:

an application layer for encapsulating bus driver services;

the middleware is connected with the application layer and used for analyzing, issuing and reporting data of the bus driver service during operation;

the driving layer is connected with the middleware and used for defining the format of the data message and carrying out data communication between the middleware and the firmware layer;

and the firmware layer is connected with the drive layer and used for packaging a bus driver protocol stack and unifying the self-defined message format.

Preferably, the middleware reads various driver configuration files during initialization; when releasing, disconnecting all drivers and releasing equipment resources; and unifying the pair of upper function interfaces.

Preferably, the firmware layer encapsulation bus driver protocol stack is configured with different protocol stacks according to the ID of the application layer issued message.

The method for realizing the field bus driver management aiming at the CNC software based on the system is mainly characterized by comprising the following steps:

(1) analyzing the configuration file;

(2) integrating the vendor configuration file and the configuration supplement to the driver into a total configuration file;

(3) encrypting the total configuration file, converting the total configuration file into a binary file, and sending the binary file to a controller;

(4) the controller analyzes the binary file into a driver configuration file which is distributed to each driver functional unit and each protocol stack, and the firmware environment configuration is completed;

(5) the application layer calls a driver service interface to execute a specified function, and configures a driver address and a communication cycle;

(6) the firmware layer carries out driver connection and reports a connection state after the execution is finished;

(7) and accessing the driver alarm, parameters and subfunctions to be in a master-slave response mode, calling a service interface by an application layer, and executing a specified function by a firmware layer according to an initial configuration file.

Preferably, the step (1) comprises the following steps:

read drive profile name, path and independent configuration complement to the drive, read drive's functional support configuration.

The device for realizing the field bus driver management aiming at the CNC software is mainly characterized by comprising the following steps:

a processor configured to execute computer-executable instructions;

a memory storing one or more computer-executable instructions that, when executed by the processor, perform the steps of the above-described method of implementing fieldbus driver management for CNC software.

The processor for implementing fieldbus driver management for CNC software is primarily characterized in that the processor is configured to execute computer-executable instructions that, when executed by the processor, implement the steps of the above-described method for implementing fieldbus driver management for CNC software.

The computer-readable storage medium is primarily characterized in that a computer program is stored thereon, which computer program can be executed by a processor to carry out the individual steps of the above-described method for implementing fieldbus driver management for CNC software.

By adopting the system, the method, the device, the processor and the computer readable storage medium for realizing the field bus driver management aiming at the CNC software, all driver connections can be completed within 1s, the initialization efficiency is improved, the field bus driver management library of the driving layer can be conveniently transplanted, the upper interfaces are unified, the system can be connected with any bus type driver of M2/M3/EtherCAT, and the configuration is flexible.

Drawings

Fig. 1 is a block diagram of a system for CNC software implemented fieldbus driver management according to the present invention.

Detailed Description

In order to more clearly describe the technical contents of the present invention, the following further description is given in conjunction with specific embodiments.

The system for realizing the field bus driver management aiming at the CNC software comprises the following steps:

an application layer for encapsulating bus driver services;

the middleware is connected with the application layer and used for analyzing, issuing and reporting data of the bus driver service during operation;

the driving layer is connected with the middleware and used for defining the format of the data message and carrying out data communication between the middleware and the firmware layer;

and the firmware layer is connected with the drive layer and used for packaging a bus driver protocol stack and unifying the self-defined message format.

As a preferred embodiment of the present invention, the middleware reads various driver configuration files during initialization; when releasing, disconnecting all drivers and releasing equipment resources; and unifying the pair of upper function interfaces.

As a preferred embodiment of the present invention, the firmware layer encapsulation bus driver protocol stack is specifically configured with different protocol stacks according to the ID of the application layer issued packet.

The method for realizing the field bus driver management aiming at the CNC software by utilizing the system comprises the following steps:

(1) analyzing the configuration file;

(2) integrating the vendor configuration file and the configuration supplement to the driver into a total configuration file;

(3) encrypting the total configuration file, converting the total configuration file into a binary file, and sending the binary file to a controller;

(4) the controller analyzes the binary file into a driver configuration file which is distributed to each driver functional unit and each protocol stack, and the firmware environment configuration is completed;

(5) the application layer calls a driver service interface to execute a specified function, and configures a driver address and a communication cycle;

(6) the firmware layer carries out driver connection and reports a connection state after the execution is finished;

(7) and accessing the driver alarm, parameters and subfunctions to be in a master-slave response mode, calling a service interface by an application layer, and executing a specified function by a firmware layer according to an initial configuration file.

As a preferred embodiment of the present invention, the step (1) comprises the steps of:

read drive profile name, path and independent configuration complement to the drive, read drive's functional support configuration.

As a preferred embodiment of the present invention, the apparatus for implementing fieldbus driver management for CNC software comprises:

a processor configured to execute computer-executable instructions;

a memory storing one or more computer-executable instructions that, when executed by the processor, perform the steps of the above-described method of implementing fieldbus driver management for CNC software.

As a preferred embodiment of the present invention, the processor for implementing fieldbus driver management for CNC software is configured to execute computer-executable instructions which, when executed by the processor, implement the steps of the above-described method of implementing fieldbus driver management for CNC software.

As a preferred embodiment of the invention, the computer-readable storage medium has stored thereon a computer program which can be executed by a processor to carry out the individual steps of the above-described method of implementing fieldbus driver management for CNC software.

In the specific embodiment of the invention, the method for managing the field bus driver is provided, and the method for managing the driver and stripping the CNC software is adopted, so that the convenience of later maintenance is achieved, and the execution efficiency is improved.

The system of the invention is integrated by the following measures:

and encapsulating the bus driver service into a module in an application layer for CNC (computer numerical control) calling.

Adding a layer of middleware between the CNC and the driver, wherein the middleware is used for analyzing, issuing and reporting data in a bus driver service module during analyzing operation; reading various driver configuration files during software initialization; when the software is released, all drivers are disconnected, and the equipment resources are released; and unifying the pair of upper function interfaces.

Defining data message format for driving communication with firmware layer.

And encapsulating various bus driver protocol stacks in a firmware layer, and configuring different protocol stacks according to the ID of the message sent by an application layer.

The firmware layer unifies the self-defined message format, and various bus driver communication protocols are eliminated.

The CNC software calls the bus driver service module controller driver.

The object of the invention is achieved by the following measures:

(1) analyzing the configuration file during initial configuration, reading out the name and path of the configuration file of the driver, independently configuring and supplementing the driver, and reading out the function supporting configuration of the driver;

(2) integrating the vendor configuration file with the configuration supplement to the drive into a total configuration file;

(3) the total configuration file is encrypted and then converted into a binary file, and the binary file is sent to the controller;

(4) the controller receives the configuration file and analyzes the configuration file into a driver configuration file to distribute the driver configuration file to each driver functional unit and each protocol stack (MII/MIII/EtherCAT and the like);

(5) at the moment, the firmware environment is completely configured, and the application layer calls each service interface of the driver to execute the appointed function;

(6) the application layer configures the address and the communication period of a driver station, informs the firmware layer of performing driver connection, executes all connection actions by the firmware layer, and reports a connection state after the execution is finished;

(7) and the access driver alarm, the parameters and the subfunction are in a master-slave response mode, the application layer calls the service interface to inform the firmware layer of executing the specified function, the firmware layer processes all the execution according to the initial configuration file, and the execution result is reported after the execution is finished.

The management and control of the whole driver are completely unified into driver parameter service and driver alarm service, and if other special functions can be configured by an EMI file and executed by a firmware layer, the application is more flexible.

For a specific implementation of this embodiment, reference may be made to the relevant description in the above embodiments, which is not described herein again.

It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.

It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.

Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.

It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by suitable instruction execution devices. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.

It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, and the corresponding program may be stored in a computer readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium.

The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.

In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

By adopting the system, the method, the device, the processor and the computer readable storage medium for realizing the field bus driver management aiming at the CNC software, all driver connections can be completed within 1s, the initialization efficiency is improved, the field bus driver management library of the driving layer can be conveniently transplanted, the upper interfaces are unified, the system can be connected with any bus type driver of M2/M3/EtherCAT, and the configuration is flexible.

In this specification, the invention has been described with reference to specific embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:CNC时间轴对正的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类