
技术领域technical field
本发明涉及一种基于Windows操作系统的数控系统。The invention relates to a numerical control system based on Windows operating system.
背景技术Background technique
目前,Windows系列操作系统在PC机上占据着统治地位,它标准美观的图形用户接口(GUI)、方便快捷的操作方式,不但已经被普通用户所接受,而且在工业应用领域内的用户也越来越多。At present, Windows series operating systems occupy a dominant position on PCs. Its standard and beautiful graphical user interface (GUI) and convenient and quick operation methods have not only been accepted by ordinary users, but also more and more users in the field of industrial applications. more.
然而Windows是一个多任务的操作系统,PC机软硬件资源被多个程序共享,导致系统的实时性不好,如果系统资源被其它程序占用,CNC程序就无法满足实时性的要求,而CNC程序对实时性和连续性要求非常高,因此Windows操作系统环境下很难保证实时性,难以应用在实时控制系统中。However, Windows is a multi-tasking operating system. The software and hardware resources of the PC are shared by multiple programs, resulting in poor real-time performance of the system. If the system resources are occupied by other programs, the CNC program cannot meet the real-time requirements. The requirements for real-time and continuity are very high, so it is difficult to guarantee real-time performance under the Windows operating system environment, and it is difficult to apply it in real-time control systems.
目前解决Windows实时性问题主要有以下两种方式:At present, there are two main ways to solve the Windows real-time problem:
(1)使用专门的实时内核开发工具,如通用的RTX开发环境就能开发出实时内核,但是这种开发环境往往价格都比较高,而且这种系统的实时性好坏很大程度上取决于开发人员对开发环境的理解和掌握程度,如果用得不好反而会影响系统的实时性;(1) Real-time kernels can be developed using special real-time kernel development tools, such as the general RTX development environment, but this kind of development environment is often relatively expensive, and the real-time performance of this system depends largely on The developer's understanding and mastery of the development environment, if not used properly, will affect the real-time performance of the system;
(2)采用WINCE系统,这种操作系统能够解决实时性的问题,但是它的软、硬件兼容性不好,尤其是系统中不能借用第三方的软、硬件资源,如CAN的通信功能就不能在WINCE系统上实现。(2) Adopt WINCE system, this operating system can solve the real-time problem, but its software and hardware compatibility is not good, especially the software and hardware resources of the third party cannot be borrowed in the system, such as the communication function of CAN cannot Realized on WINCE system.
发明内容Contents of the invention
本发明为解决现有的CNC系统存在的实时性较差、开发成本较高以及基于WINCE的数控系统存在的软硬件兼容性较差的问题,提供一种基于PC机的开放式数控系统。本发明包括以下单元:The invention provides a PC-based open numerical control system to solve the problems of poor real-time performance, high development cost and poor software and hardware compatibility of the WINCE-based numerical control system in the existing CNC system. The present invention comprises the following units:
PC机1,所述PC机1基于Windows操作系统;PC
数控设备2,用于接收PC机1发出的控制命令并完成数控加工的实时任务的执行;The
硬件接口板3,用于建立PC机1和数控设备2之间的连接并作为中断源产生停止PC机1其它任务、仅执行数控加工的实时任务的中断信号;The
它还包括以下单元:It also includes the following units:
实时调度模块4,用于建立PC机1和硬件接口板3之间的连接,调度数控加工的实时任务并为实时任务分配优先级;The real-
CNC模块5,通过实时调度模块4调度实时任务来实现从零件加工程序中产生数控机床刀具的运动路径,管理程序缓冲区中存储的零件加工程序、编译零件加工程序、工具路径插补、轴位置控制、与实时调度模块4通信,并在PC机1的内存中建立共享内存区8以及与实时调度模块4连接;The
PLC模块6,通过实时调度模块4调度的实时任务来完成开关量的逻辑控制、模拟量控制和过程控制的功能;The
人机界面模块7,通过共享内存区8输入路径程序、设置运行方式、进行系统的数据配置,并通过共享内存区8接收数控加工的实时任务反馈的执行结果,再将执行结果显示给用户;The man-
实时调度模块4、CNC模块5和PLC模块6都嵌入在Windows操作系统中,人机界面模块7是一个运行在用户态的Windows程序。The real-
本发明的有益效果是:基于Windows操作系统,不但具有响应较快、兼容性较好、开发成本较低的特点,而且由实时调度模块4为数控程序分配最高的优先级,当硬件接口板3产生中断时,数控程序可以独占CPU的资源,实现较高的实时性和可靠性,能够更好的满足机械加工中对控制精度的较高要求。The beneficial effects of the present invention are: based on the Windows operating system, not only has the characteristics of fast response, good compatibility, and low development cost, but also the highest priority is assigned to the numerical control program by the real-
附图说明Description of drawings
图1是本发明的整体结构示意图。Fig. 1 is a schematic diagram of the overall structure of the present invention.
具体实施方式Detailed ways
具体实施方式一:参见图1,本实施方式包括以下单元:Specific embodiment one: referring to Fig. 1, this embodiment includes the following units:
PC机1,所述PC机1基于Windows操作系统;PC
数控设备2,用于接收PC机1发出的控制命令并完成数控加工的实时任务的执行;The
硬件接口板3,用于建立PC机1和数控设备2之间的连接并作为中断源产生停止PC机1其它任务、仅执行数控加工的实时任务的中断信号;The
它还包括以下单元:It also includes the following units:
CNC模块5,通过实时调度模块4调度实时任务来实现从零件加工程序中产生数控机床刀具的运动路径,管理程序缓冲区中存储的零件加工程序、编译零件加工程序、工具路径插补、轴位置控制、与实时调度模块4通信,并在PC机1的内存中建立共享内存区8以及与实时调度模块4连接;The
PLC模块6,通过实时调度模块4调度的实时任务来完成开关量的逻辑控制、模拟量控制和过程控制的功能;The
人机界面模块7,通过共享内存区8输入路径程序、设置运行方式、进行系统的数据配置,并通过共享内存区8接收数控加工的实时任务反馈的执行结果,再将执行结果显示给用户;The man-
实时调度模块4、CNC模块5和PLC模块6都嵌入在Windows操作系统中,人机界面模块7是一个运行在用户态的Windows程序。The real-
所述硬件接口板3可采用公开号为CN1818895的发明专利公开的串并综合型总线数据传输方法传输PC机1与数控设备2之间的数据;所述实时调度模块4是一个嵌入到PC机1中的Windows内核的驱动程序,由一个.EXE文件作为初始进程,此初始进程导入整个的CNC模块5的系统软件,从注册表读取系统配置和.INI文件来创建所有需要的程序,并在启动程序前读取所有的共享文件;所述CNC模块5用于从零件加工程序中产生数控机床刀具的运动路径,并管理程序缓冲区中存储的零件加工程序、编译零件加工程序、工具路径插补、轴位置控制、与PLC模块6以及外部环境通信;所述PLC模块6用于实现逻辑控制功能、通过实时调度模块4创建实时任务来完成所有的PLC程序;所述人机界面模块7是一个通用性的运行在用户态下的Windows程序,可以输入路径程序、设置运行方式、进行系统的数据配置等操作,输入的数据经过处理后送入共享内存区8,实时任务执行时从共享内存区8中读取输入指令,并把相关运行结果送回共享内存区8,人机界面模块7从共享内存区8中读取这些结果并显示在界面上供操作者查询;用户还可以根据具体的要求编写第三方程序模块9,第三方程序模块9也是一个运行在用户态的Windows程序,用于为用户提供其它的数控操作;人机界面模块7和第三方程序模块9都作为Windows程序10运行,实施调度模块4、CNC模块5和PLC模块6都作为实时子系统11运行。The
CNC模块5和PLC模块6都以计算机程序的形式存储在PC机1中,并采用共享映射存储器的技术与人机界面模块7之间进行通信,通过共享PC机1的同一段内存区来实现数据的交换,通信区域包括以下几个部分:从人机界面模块7传递到CNC模块5和PLC模块6的数据和命令;从CNC模块5和PLC模块6传递到人机界面模块7的数据和命令;从CNC模块5和PLC模块6传递到人机界面模块7的用于显示的轴位置、命令位置和实际位置的偏差、路径速度等;CNC模块5和PLC模块6之间的通信包括以下内容:来自PLC模块6的二进制信号、发送到PLC模块6的二进制信号、NC参数、NC修正、轴位置、命令等。Both the
CNC模块5由编译进程和插补进程组成。编译进程由运行在核心态的编译任务和运行在用户态的数据服务器线程组成;编译任务的主要职责是编译NC程序并把信息转化成插补器能够理解的方式,编译任务还完成偏移量和工具长度修正,诊断,传送插补进程的输入输出信息等功能;数据服务器线程为所有的CNC程序的文件IO服务,数据服务器线程不是PA实时子系统的一部分,当它进行文件操作的时候需要Windows API,因此它是作为标准Windows 32用户态线程来实现的;插补进程由插补任务和位置任务组成,插补任务是由插补进程创建的,插补任务以固定周期工作,插补任务是CNC模块5的执行单元。位置任务和插补任务一样,都是由硬件定时器产生的中断来启动的。编译进程首先启动,它初始化所有的数据、建立与人机界面模块7之间的通信并建立编译进程和插补进程之间通信所需要的共享内存区域、它连接到实时调度模块4并创建一个实时任务一编译任务、还建立数据服务器来处理所有的CNC模块5的文件输入输出;插补进程是在编译器初始化后启动的,它初始化插补进程专用的数据和内存、连接到实时调度模块4并建立两个实时任务:插补任务和位置任务。The
工作原理:PC机1启动并完成自检和通过硬件接口板3对数控设备2进行检测,实时调度模块4启动并分配给实时任务最高的优先级,CNC模块5启动并初始化位置控制程序的数据,建立共享内存区8并连接到实时调度模块4,PLC模块6启动并初始化逻辑控制程序的数据,人机界面模块7启动,用户通过人机界面模块7把数控参数等数据输入到共享内存区8中,PC机1将位置控制程序和逻辑控制程序所需要的数据通过硬件接口板3读入到共享内存区8,由硬件接口板3产生中断,PC机1暂停所有正在执行的程序,实时调度模块4调度位置控制程序和逻辑控制程序的运行,进行插补、位置控制的运算,通过硬件接口板3发送到数控设备2,实时调度模块4通过硬件接口板3接收到数控设备2的反馈信息并将反馈信息显示到人机界面模块7上,当位置控制程序和逻辑控制程序都执行完毕后,中断返回,数控过程结束。Working principle: PC 1 starts and completes self-inspection and detects
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2007101449569ACN100514234C (en) | 2007-12-28 | 2007-12-28 | Open type numerical control system based on PC |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2007101449569ACN100514234C (en) | 2007-12-28 | 2007-12-28 | Open type numerical control system based on PC |
| Publication Number | Publication Date |
|---|---|
| CN101196738Atrue CN101196738A (en) | 2008-06-11 |
| CN100514234C CN100514234C (en) | 2009-07-15 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2007101449569AExpired - Fee RelatedCN100514234C (en) | 2007-12-28 | 2007-12-28 | Open type numerical control system based on PC |
| Country | Link |
|---|---|
| CN (1) | CN100514234C (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101533263B (en)* | 2009-02-17 | 2011-01-26 | 固高科技(深圳)有限公司 | Computer programmable autocontrol system and control method thereof |
| CN102346687A (en)* | 2011-09-21 | 2012-02-08 | 南京航空航天大学 | Real-time system based on Windows driver |
| CN102375433A (en)* | 2010-07-06 | 2012-03-14 | 发那科株式会社 | Numerical control device having personal computer function |
| CN102495590A (en)* | 2011-12-20 | 2012-06-13 | 上海三一精机有限公司 | Electric adjustment method of numerical control system |
| CN102540972A (en)* | 2010-12-09 | 2012-07-04 | 沈阳高精数控技术有限公司 | Remote control method supporting multi-point cross-platform communication for numerical control machine |
| CN102567082A (en)* | 2010-12-09 | 2012-07-11 | 中国科学院沈阳计算技术研究所有限公司 | Dynamic allocation method for real-time tasks of numerical control system based on thread management |
| CN102591262A (en)* | 2012-03-21 | 2012-07-18 | 绍兴文理学院 | System hardware of bearing cutting automatic production line based on graphic programming |
| CN102662349A (en)* | 2012-05-21 | 2012-09-12 | 天津职业技术师范大学 | Cross-platform numerical control system |
| CN102722142A (en)* | 2011-12-09 | 2012-10-10 | 绍兴文理学院 | Special control system of bearing cutting automation production line based on graphic programming |
| CN103163827A (en)* | 2011-12-14 | 2013-06-19 | 沈阳高精数控技术有限公司 | Key data acquisition method for bus type numerical control system |
| CN103365253A (en)* | 2012-04-10 | 2013-10-23 | 宝元数控精密股份有限公司 | Flexible and flexible automation controller |
| CN103955153A (en)* | 2014-04-15 | 2014-07-30 | 深圳众为兴技术股份有限公司 | Motion control system and method |
| CN106802635A (en)* | 2017-03-08 | 2017-06-06 | 北京海普瑞森科技发展有限公司 | A kind of control method of contact lenses lathe, device and system |
| CN107544437A (en)* | 2016-06-24 | 2018-01-05 | 发那科株式会社 | Procedure editing device, method and storage medium |
| CN107888508A (en)* | 2017-09-29 | 2018-04-06 | 广州奇芯机器人技术有限公司 | A kind of anti-interference weak projectivity procotol of digital control system and its AUT based on PC NC |
| CN108334035A (en)* | 2017-12-21 | 2018-07-27 | 苏州谷夫道自动化科技有限公司 | A kind of digital control system programmed method |
| CN109542648A (en)* | 2018-11-23 | 2019-03-29 | 凌云光技术集团有限责任公司 | A kind of method and device of striding course communication |
| CN110703677A (en)* | 2019-09-29 | 2020-01-17 | 四川中曼电气工程技术有限公司 | PLC control system integrated on industrial personal computer |
| CN110914768A (en)* | 2017-06-07 | 2020-03-24 | 布鲁克斯自动化(德国)有限公司 | Method for controlling PLC using PC program |
| CN112154385A (en)* | 2018-06-22 | 2020-12-29 | 软件伺服系统公司 | Motion control program, motion control method, and motion control device |
| CN112346405A (en)* | 2020-10-13 | 2021-02-09 | 深圳市汇川技术股份有限公司 | Numerical control system control method, device, numerical control system and computer storage medium |
| CN112846476A (en)* | 2020-12-15 | 2021-05-28 | 广州瑞松智能科技股份有限公司 | Intelligent integrated friction stir welding numerical control system |
| CN114020493A (en)* | 2021-11-09 | 2022-02-08 | 西门子工厂自动化工程有限公司 | Data sharing method, device and system |
| CN114594731A (en)* | 2020-12-07 | 2022-06-07 | 山东新松工业软件研究院股份有限公司 | CNC control method and system based on bus control |
| CN116736792A (en)* | 2023-08-01 | 2023-09-12 | 广州亿达科技有限公司 | Logic control programming method and device embedded in CNC system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101923335A (en)* | 2010-08-10 | 2010-12-22 | 济南大学 | An open CNC system based on the kernel platform and directly facing the processing path point |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101533263B (en)* | 2009-02-17 | 2011-01-26 | 固高科技(深圳)有限公司 | Computer programmable autocontrol system and control method thereof |
| CN102375433A (en)* | 2010-07-06 | 2012-03-14 | 发那科株式会社 | Numerical control device having personal computer function |
| CN102540972A (en)* | 2010-12-09 | 2012-07-04 | 沈阳高精数控技术有限公司 | Remote control method supporting multi-point cross-platform communication for numerical control machine |
| CN102567082A (en)* | 2010-12-09 | 2012-07-11 | 中国科学院沈阳计算技术研究所有限公司 | Dynamic allocation method for real-time tasks of numerical control system based on thread management |
| CN102567082B (en)* | 2010-12-09 | 2013-08-07 | 中国科学院沈阳计算技术研究所有限公司 | Dynamic allocation method for real-time tasks of numerical control system based on thread management |
| CN102540972B (en)* | 2010-12-09 | 2013-06-19 | 沈阳高精数控技术有限公司 | Remote control method supporting multi-point cross-platform communication for numerical control machine |
| CN102346687A (en)* | 2011-09-21 | 2012-02-08 | 南京航空航天大学 | Real-time system based on Windows driver |
| CN102722142A (en)* | 2011-12-09 | 2012-10-10 | 绍兴文理学院 | Special control system of bearing cutting automation production line based on graphic programming |
| CN103163827A (en)* | 2011-12-14 | 2013-06-19 | 沈阳高精数控技术有限公司 | Key data acquisition method for bus type numerical control system |
| CN103163827B (en)* | 2011-12-14 | 2015-07-29 | 沈阳高精数控技术有限公司 | A kind of key data acquisition method for bus-type numerical control system |
| CN102495590A (en)* | 2011-12-20 | 2012-06-13 | 上海三一精机有限公司 | Electric adjustment method of numerical control system |
| CN102591262A (en)* | 2012-03-21 | 2012-07-18 | 绍兴文理学院 | System hardware of bearing cutting automatic production line based on graphic programming |
| CN103365253A (en)* | 2012-04-10 | 2013-10-23 | 宝元数控精密股份有限公司 | Flexible and flexible automation controller |
| CN102662349A (en)* | 2012-05-21 | 2012-09-12 | 天津职业技术师范大学 | Cross-platform numerical control system |
| CN103955153A (en)* | 2014-04-15 | 2014-07-30 | 深圳众为兴技术股份有限公司 | Motion control system and method |
| CN107544437A (en)* | 2016-06-24 | 2018-01-05 | 发那科株式会社 | Procedure editing device, method and storage medium |
| CN107544437B (en)* | 2016-06-24 | 2021-02-12 | 发那科株式会社 | Machining program editing device, method and storage medium |
| CN106802635B (en)* | 2017-03-08 | 2020-08-11 | 北京海普瑞森科技发展有限公司 | Control method, device and system for contact lens lathe |
| CN106802635A (en)* | 2017-03-08 | 2017-06-06 | 北京海普瑞森科技发展有限公司 | A kind of control method of contact lenses lathe, device and system |
| CN110914768B (en)* | 2017-06-07 | 2023-06-30 | 布鲁克斯自动化(德国)有限公司 | Method for controlling PLC using PC program |
| CN110914768A (en)* | 2017-06-07 | 2020-03-24 | 布鲁克斯自动化(德国)有限公司 | Method for controlling PLC using PC program |
| CN107888508A (en)* | 2017-09-29 | 2018-04-06 | 广州奇芯机器人技术有限公司 | A kind of anti-interference weak projectivity procotol of digital control system and its AUT based on PC NC |
| CN107888508B (en)* | 2017-09-29 | 2021-07-20 | 广州奇芯机器人技术有限公司 | PC-NC-based numerical control system and anti-interference weak real-time communication method thereof |
| CN108334035A (en)* | 2017-12-21 | 2018-07-27 | 苏州谷夫道自动化科技有限公司 | A kind of digital control system programmed method |
| CN112154385A (en)* | 2018-06-22 | 2020-12-29 | 软件伺服系统公司 | Motion control program, motion control method, and motion control device |
| CN112154385B (en)* | 2018-06-22 | 2024-03-19 | 软件伺服系统公司 | Motion control program, motion control method, and motion control device |
| CN109542648A (en)* | 2018-11-23 | 2019-03-29 | 凌云光技术集团有限责任公司 | A kind of method and device of striding course communication |
| CN110703677A (en)* | 2019-09-29 | 2020-01-17 | 四川中曼电气工程技术有限公司 | PLC control system integrated on industrial personal computer |
| CN112346405A (en)* | 2020-10-13 | 2021-02-09 | 深圳市汇川技术股份有限公司 | Numerical control system control method, device, numerical control system and computer storage medium |
| CN114594731A (en)* | 2020-12-07 | 2022-06-07 | 山东新松工业软件研究院股份有限公司 | CNC control method and system based on bus control |
| CN112846476A (en)* | 2020-12-15 | 2021-05-28 | 广州瑞松智能科技股份有限公司 | Intelligent integrated friction stir welding numerical control system |
| CN114020493A (en)* | 2021-11-09 | 2022-02-08 | 西门子工厂自动化工程有限公司 | Data sharing method, device and system |
| CN114020493B (en)* | 2021-11-09 | 2025-08-08 | 西门子工厂自动化工程有限公司 | Data sharing method, device and system |
| CN116736792A (en)* | 2023-08-01 | 2023-09-12 | 广州亿达科技有限公司 | Logic control programming method and device embedded in CNC system |
| CN116736792B (en)* | 2023-08-01 | 2024-04-05 | 广州亿达科技有限公司 | Logic control programming method and device embedded in CNC system |
| Publication number | Publication date |
|---|---|
| CN100514234C (en) | 2009-07-15 |
| Publication | Publication Date | Title |
|---|---|---|
| CN100514234C (en) | Open type numerical control system based on PC | |
| CN110524543A (en) | A kind of industrial robot control device and system based on manipulation one | |
| CN101226385A (en) | Soft PLC Module of Open Soft Numerical Control System | |
| CN101114174A (en) | Embedded four-axis motion controller | |
| CN101226388A (en) | Open software CNC system | |
| CN111427310A (en) | Industrial robot controller operation system | |
| CN103941648A (en) | Multi-axis motion control system and control method thereof | |
| JP2017520061A (en) | Numerical control system and control method based on virtualization technology | |
| WO2017177695A1 (en) | Method and system for development and integration of application in numerical control system | |
| CN1601415A (en) | An open reconfigurable soft numerical control system | |
| CN114690702B (en) | Robot control system combining soft PLC and motion control | |
| CN108549330A (en) | A kind of multi-shaft interlocked built-in digital control system and its development approach | |
| CN106914900A (en) | Robot control system based on ROS and OROCOS | |
| CN106945045B (en) | Communication method and system for robot control based on ROS and OROCOS | |
| CN111650886A (en) | Motion control system | |
| CN111267111B (en) | Robot control method, device and system | |
| CN102621960A (en) | Advanced RISC machine-Linux (ARM-Linux)-based compiled programmable automation control (PAC) | |
| CN106956265A (en) | Method and system for executing robot motion planning based on ROS and OROCOS | |
| CN105467857A (en) | Method for power station simulation | |
| CN201489345U (en) | Double-processor motion control card | |
| CN201237713Y (en) | Built-in type integrated industrial control computer | |
| CN206489436U (en) | A kind of new PLC | |
| CN201945835U (en) | Embedded control system used for carton proofing machine | |
| CN201084005Y (en) | Embedded machine tool numerical control system based on ARM technology | |
| CN114510354B (en) | A method for constructing a CNC system architecture based on a quad-core processor |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20090715 Termination date:20141228 | |
| EXPY | Termination of patent right or utility model |