To let CNC system software reconfigurable, an active object oriented software design method was proposed,and its design principles were given. Based on the actual application as an example, this paper expounded the design method, reconstruction process and reconstruction results. The method based on object -oriented design endued each object with its own thread of execution, event queue and state machine. The active objects,which were independent and did not share resources,communicated with other objects through the event queue,deliver and receipt events in publish-subscribe way. In this way,a new reconfigurable CNC system was constructed, with low degree of complexity, convenient modification and high reconstruction efficiency.%为使数控系统软件可重构,提出一种面向活动对象的软件设计方法,给出设计原理、实现方法;以实际应用为例,阐明设计方法、重构流程及重构结果.该方法基于面向对象设计,并给每个对象赋予一个独立执行线程、事件队列和状态机.活动对象相互独立、不共用资源、能够独立执行,通过事件队列与其他对象通信,以“出版-订阅”的方式投递和接收事件.在该方式下,数控系统的重构复杂程度低、修改便捷、重构效率高.
展开▼