摘要随着现代制造业的快速发展,传统数控系统兼容性差、功能不易扩展、人机界面不灵活等缺点日益显现,数控系统的开放化已成为数控技术的主流。
开放式数控系统的研究目的是开发一种模块化、可重构、可扩充的控制系统结构,以增强数控系统的功能柔性,在体系结构上给用户二次开发留有更多的余地,从而快速地响应新的加工需求。
本文阐述了数控技术的发展过程,介绍了国内外开放式数控系统的发展现状和发展趋势,指出研究和开发开放式数控系统的必要性。
在分析目前应用比较广泛的OSACA 开放式体系结构的基础上,建立了基于PC+运动控制器的开放式数控系统的软硬件结构,并重点介绍了系统软件的构成与实现。
系统软件设计采用模块化结构,如:总体调度模块、参数模块、软PLC模块、NC模块,客户界面模块等。
各个模块之间通过标准的接口协调工作,共同完成数控系统的功能。
该系统是一个能够同时完成程序译码、插补运算、系统管理、伺服控制等任务的控制系统,具备了一般商用数控系统的通用功能。
如果需要对系统的功能进行调整,只需要增减功能模块即可,体现出了系统开放性、灵活性的特点。
最后以系统研究为背景,将开发出的数控系统应用在铣床数控化改造中。
实践证明,以工控机和运动控制器为控制系统的核心控制器,不仅可以大大的简化系统的开发周期,实现资源的合理配置,而且,系统开发者和机床用户可以将自己的特殊的加工工艺、管理经验和操作技能纳入控制系统形成自己的产品特色。
关键词:开放式数控系统,模块化结构,运动控制器Development and Research of Open CNC System with 8-AxisAbstractWith the rapid development of modern manufacturing, the weakness of traditional CNC system becomes apparent increasingly, such as compatibility, expandability and inflexible human-machine interfaces and so on. The research of Open CNC Systems is becoming one of the most important directions of CNC technology. The purpose of studying Open CNC System is to build a modular, reconfigurable and expandable control system. So the functional flexibility of the CNC system can be improved, the systems are enabled to be re-developed. And some new demands of the producing can also be responded quickly.Through the discussing of the different courses of the NC technology and the introduction of the status of research in the Open CNC System field, the need of researching and exploiting open CNC system is brought forward. The hardware and software configuration of CNC system based on PC + Motion Controller are build with analyzing the most popular open CNC architecture——OSACA. Then that how to build the software is mainly discussed. Modularization is the idea of the software’s project, such as Main interface module、parameter module、soft-PLC module、NC module、HMI module in the paper. These function modules with standard interfaces will work coordinately. The CNC system discussed by this paper is a real time and multi-task control system.It can deal with coding interpretation, interpolation, system management and servo control simultaneity. It has the function of general commercial CNC system. The function modules can be added or deleted if some adjustments want be done to the system, which shows the opening and flexibility of the system.The CNC system is used in the numerical renovation of Milling Machine in order to research the system. Not only the CNC system based on PC and Motion Controller shortens the exploitive cycle, achieving resource rational configuration, but also the CNC developer and customer can bring their technologies, experiences and skills into the open CNC system.Key Words:Open CNC System,Modularization Architecture,Motion Controller目录摘要 (I)Abstract (II)1 绪论 (1)1.1 数控系统的发展概况 (1)1.2 开放式数控系统概述 (2)1.2.1 开放式数控系统的定义 (2)1.2.2 开放式数控系统的特点 (3)1.2.3 开放式数控系统的体系结构 (3)1.3 开放式数控系统的发展 (7)1.3.1 国外开放式数控系统的发展状况 (7)1.3.2 国内开放式数控系统的发展状况 (9)1.4 课题的产生及意义 (10)1.5 课题的研究方法和内容 (11)2 数控系统的总体设计 (12)2.1 系统的设计目标 (12)2.2 数控系统硬件结构设计 (12)2.2.1 系统硬件的总体设计及实现 (12)2.2.2 工控机的选型 (14)2.2.3 运动控制器的选型 (15)2.3 数控系统软件结构设计 (15)2.3.1 系统软件的总体设计 (15)2.3.2 系统中各模块的功能概述 (16)2.3.3 系统中各模块的关系 (17)3 参数模块设计 (19)3.1 参数模块的设计要求 (19)3.2 参数模块的结构 (19)3.3 参数设置模块的拓扑结构 (20)3.4 参数设置模块的功能细分 (21)3.5 参数设置模块的实现 (22)4 软PLC模块的设计 (25)4.1 软PLC技术及特点 (25)4.2 软PLC模块的组成及工作流程 (25)4.3 软PLC模块的变量设计 (27)4.4 软PLC模块控制程序的设计 (30)4.5 软PLC模块解释程序的设计 (35)5 NC模块的设计 (40)5.1 NC模块的功能描述 (40)5.2 NC模块的程序流程 (40)5.3 NC模块解释程序设计 (42)5.3.1 数控加工程序的结构与格式 (42)5.3.2 解释程序的实现 (43)5.4 NC模块运动执行程序设计 (47)5.5 实时多任务的实现 (49)5.5.1 系统线程的总体设计 (50)5.5.2 系统线程的具体实现 (51)6 客户界面模块的设计 (53)7 结论 (60)参考文献 (61)在学研究成果 (64)致谢 (65)1 绪论1.1 数控系统的发展概况数控技术集传统的机械制造技术、计算机技术、信息处理技术、网络通讯技术、成组技术、现代控制技术、传感检测技术、微电子技术、液压气动技术、光机电技术于一体,是现代制造技术的基础[1]。
大力发展以数控技术为核心的先进制造技术,已成为世界各发达国家加速经济发展、提高综合国力和国家地位重要途径[2]。
自从1952年麻省理工学院研制出世界上第一台三坐标数控铣床以来,数控系统的发展已经经历了八代,大致上可以分为四个发展阶段[3-5]:(1) 硬件数控阶段早期计算机的运算速度低,远不能适应机床实时控制的要求,人们不得不采用数字逻辑电路搭建一台专用计算机作为数控装置,被称为硬件连接数控,简称数控(NC)。
世界上第一台数控铣床的数控装置是采用电子管、继电器和模拟电路构成的试验样机,通称为第一代数控;1959年,晶体管取代了笨重的电子管,缩小了体积,使得工业应用成为了可能,诞生了第二代数控系统;1965年出现了小规模集成电路构成的NC,体积更小,功率更低,提高了可靠性,NC发展到第三代。
这一阶段的数控系统,各种控制功能均由硬件逻辑完成,称为“硬件”控制,其功能简单,灵活性差,设计周期长,系统可靠性低,因而限制了其进一步的发展和应用。
(2) 计算机数控系统的发展和完善阶段70年代初,大规模集成电路、半导体存储器、微处理器的问世,使得通用小型计算机逐渐普及,给数控技术带来了突破性的发展。
1970年在美国芝加哥数控博览会上,首次展出了以小型计算机为核心的计算机数控系统(CNC),标志着数控系统进入了计算机为主体的第四代。
至此,原来由硬件实现的功能逐步改为由软件完成,从此系统进入了“软连接”数控时代。
1974年,首次出现了采用微处理器芯片的软连接CNC系统,象征着数控系统进入了以微机为背景的时代。