購買設(shè)計請充值后下載,,資源目錄下的文件所見即所得,都可以點開預(yù)覽,,資料完整,充值下載可得到資源目錄里的所有文件。。?!咀ⅰ浚篸wg后綴為CAD圖紙,doc,docx為WORD文檔,原稿無水印,可編輯。。。具體請見文件預(yù)覽,有不明白之處,可咨詢QQ:12401814
A research on open CNC system based on
architecture/component software reuse technology
Li Bin*, Zhou Yun-fei, Tang Xiao-qi
National Research Center of NC System Engineering & Technology, Huazhong University of Science & Technology, 430074 Wuhan City, PR China
Received 12 February 2003; received in revised form 25 October 2003; accepted 25 October 2003
Available online 9 June 2004
Abstract
By analyzing the current development situation of open computer numerical control (CNC) system and architecture/component software reuse technology, this paper researches on open CNC system based on this technology. Adopting domain engineering method, a CNC system is always organized with its data communication, which plays a role of key link. Furthermore, from which the reusable architecture of an open CNC system is extracted. Also the architecture is instanced to reusable data communication components, which differs from general architecture. The facet modal sorting, expression, storage and retrieval of CNC system components are introduced. Combined with all useful information as above, the integrated development platform of open CNC system is constructed. Supported by this platform, the workflow of developing open CNC systems includes two correlated courses: the development of reusable CNC components, and the construction of an application system with these reusable components. Furthermore, the real-time capability of a CNC application system on MS-Windows can be tested by this platform.
Keywords: CNC; Open architecture; Component; Software reuse; Domain engineering
1. Introduction
Owing to the double-quick development of hardware technology, the enhancement of computer numerical control (CNC) system’s complexity, the increase of the compatible requests with third party software, the frequent job-hopping of developer, and the cut-throat competition among craft brothers, the CNC system manufacturers are compelled to do their best to continually improve their system’s quality and shorten the periods of the products development. Hence, the open architecture is becoming the current trend of CNC technology, and its main goal is to build a uniform and recognizable system platform. Developed with the open architecture platform, the CNC application system would become more modular and flexible, thus users of this system will be allowed to choose function modules, even to integrate, modify, and expand systematic functions in order to meet different application demands.The up-to-date opinions on open CNC system can be concluded as follows [1–4]:
(1) An open CNC system is flexible in both hardware and software, so it does not only allow the hardware to change its basic configuration, but also allows the software to alter at all levels of control.
(2) An open CNC system is provided with the plug-and-play compatibility in a real sense.
(3) An open CNC system is standardized to let the third party develop new hardware and software that can meet its requirements.
(4) An open CNC system has the capability of integration of other components at the level of parts with this standard, and can also share data among the components.
(5) An open CNC system can cooperate with other systems at systematic level.
In view of the above-mentioned causes, we take it as natural that establishing an open NC system model for the special NC domain may be a feasible method. On the other hand, the software reuse is in deep degree applied in the process of software development, especially in the same domain because a new system always has very intimate relation with the previous one [5]. It is gradually convinced that the design and specification of the whole system architecture is more important than the selection of algorithm and data structure in company with the increasingly upgrading of software system’s size and complexity. So the significance of software architecture is being recognized on the background. The architecture/component technology has been developing promptly among numerous software reuse technologies in recent years [6,7]. Based on the above-mentioned viewpoints about open CNC and the software architecture/component reuse technology, the architecture of open CNC system and the integrated platform of developing CNC system are researched in this paper.
2. Open CNC system based on architecture/component software reuse technology
2.1. Software reuse and architecture/component technology
Software architecture means the delineation of the overall structure design and the abstract specification of a system. It is a macroscopical description for software system’s composition, architecture, and work mode. In short, the software architecture describes the components and the inner relation among these components in a system. The software development based on architecture diverts its emphasis from code lines to larger granularity architecture elements (for instance, components), as well as the holistic interlinkage structure among these elements. The development keynote is to construct reusable software architecture; it emphasizes the reusability of analyses and design instead of the restriction of code reuse.
Component is a unit that is relatively independent in function. It can be identified clearly, and can be reused in a software system. It may be a class, a class tree, a frame, or a general module. Along with embedded comprehension to software reuse, the concept of components is no longer restricted to code components, but extended to demand, architecture, document, test plan, test cases and data, as well as other useful information to development activation.
The software reuse based on architecture/component technology includes two correlative processes: The development of reusable components and the development of application system with reusable components. The functions of the software architecture/component technology in the process of development can be shown as Fig. 1. Firstly, special domain is analyzed with domain engineering method, and the software architecture of this special domain can be gained. Then the process of component development, sorting and storage can be guided with this architecture. When a new application system needs to be developed, some relevant components are searched and extracted from a domain component library and/or other general component libraries, following that the appropriate components will be selected and modified for adaptation, finally, these components will be assembled in a new application system.
2.2. CNC system openness is the requirement for software reuse technology in a special domain
The first principle of open system technology is to apply interface standards in the process of system development and to use the realization according to interface standards in the meantime. This provides a stable foundation for the design decision of system development and the system evolution, also the guarantee for inter operation among systems (subsystems) at the same time [8].
From 1980s, research projects on open NC system has been set out in the world one after another, some of which have great influence, such as OMAC of America, OSACA of Europe and OSEC of Japan. The OSACA realized data communication among task domains by the communication system, its system model is based on hierarchical structure, all data structures of each functional module of the application system and internal running mechanism based on these data structures of the module must be defined thoroughly, and it needs complicated configure system to establish and maintain the incompact topological structure of the application system.
Now, the software reuse technology can ideally support the open architecture system, especially the components that are in accord with interface standards can be easily integrated to the system in ‘‘plug and play’’ method, which is a black box reuse. In this way, components can be developed independently according to interface standards.
It is reputed that the potential way of realizing CNC system openness is software reuse based on architecture/component technology. The openness of CNC system is coincident with software reuse on three hands as follows:
(1) On the base of the previous edition, joining new functions to produce a new CNC system edition in order to adapt some new requirements.
(2) Modifying the parts associated with the running platform, to enable the software can run on another system platform.
(3) Applying some software (or its components) of a CNC system to another CNC application system, evolving an old system to a new system with different functions and purposes.
3. Analyzing and modeling of CNC system’s architecture based on domain engineering
It is very important to obtain a correct architecture for the system design. And the method of domain engineering [9–12] must be adopted to analyze the CNC system in order to get the correct system architecture. Domain means a suite of functional areas covered by the application systems with similar demands. Domain engineering includes three major stages: domain analysis, domain design, and domain realization. In the process of domain analyzing and modeling, the vital issue is to achieve the key link of an open CNC system.
3.1. Acting the data communication as a key link to organize open CNC system
By analyzing typical CNC systems with domain engineering method, we can discover that the processes and the threads of a CNC system can be organized with data communication that acts as key links of some functional components. The advantages of this kind of organization are shown as follows:
(1) Owing to the developing direction of software integrated by components, a data communication module can be used as a skeleton to organize the system; this makes system organization easier than the former.
(2) Acting data communication as the key link, the system is no longer a hierarchical structure. Every other module has an interface only to connect with the data communication module. The developers only need to pay attention to this interface without considering the organization mode of other modules.
(3) It is sufficient to define the interface of data communication module in detail for one system. According to the interface, what the developers need to do is to develop individual module, in which there is no need to define the internal data structure and establish the internal running mechanism based on these data structures thoroughly.
(4) The topology relationship of the whole system will be defined strictly if data communication of this system is ascertained. It ensures the inter-operability of software parts.
We emphasize the autonomy of every module in the system. The so-called autonomy means that every module is an independent individual, which can ascertain its target and the target value independently, even make a decision, a plan, a action by itself to achieve the target, and can respond to any accident because its behavior is controllable. There is no functions call and memory share among autonomous modules. All information communication is carried out through the data communication module. Each module can only be on alternative state: running or sleeping. The module itself supervises the two states. The key link—data communication module—has the same characteristics too.
The functional model of the CNC system that acts the data communication module as its key link is showed in Fig. 2. The functional module of data communication has several component interfaces. These interfaces can connect with other functional components, such as G-code interpreter component, tool compensation component and interpolation component etc. Inputting and outputting data of each component are realized by exchanging with the key link through its interface; the data communication module reads data from each interface and sends back autonomously.
There are only two kinds of domanial behaviors based on the functional model: (1) sending/receiving data information and control information; (2) supporting activities, such as PLC programming, G-code file management and edit, parameter setting etc.
3.2. Extracting systemic architecture from data communication module
Emphasizing that the system function be realized by components and the components must be autonomous, we can analyze the architecture of CNC system by starting with open CNC system’s key link—the data communication module. The principle of components partition is to make the least coupling of function and the most independence among components, to make a great effort to let component function independent of its operational data stream. Component’s design should follow the universal technical standard in the field.
As an example, the architecture of a CNC system based on MS Windows 2000 and a high performance motion control card will be analyzed in the following. The whole system is organized with the data communication module. The architecture describes the global system organization, the system control structure, the communication and its protocol among components, the components’ synchronization, the components’ function assignment, the components’ physical distribution, the components’ integration, the whole system retractility and so on.
First of all, the relation between the domain and external elements will be analyzed, such as the operating environment and the data requirement. The variability will be evaluated too. The application inter-community and difference of the domain will be analyzed after the domain scope is ascertained, it includes the domain features, the domain knowledge information and the data requirement information that are requested to realize the application in the domain, the operation to data and control stream. On the basis of that, the follow-up works are identifying concurrent processes and common modules of domain-oriented, defining processes, distributing acquired feature, function and data object of these processes and modules, offering software solution for application in the domain, finally developing architecture model of the domain.
The architecture of the open CNC system that is extracted is shown as Fig. 3. The CNC system software can be divided into two parts: the upper part that runs on computer’s CPU and the lower part that runs on the DSP of the high performance motion control card. It is a multi-task system of multiprocesses and multi-threads. The system components can be divided into four types: the device driver components, the basic components, the common components of CNC domain, and the special application components.
The device driver programs of CNC system hardware are standardized to components. So the users can select and setup device driver components as operating other general components.
The basic components are those ones that realize computer system common functions, such as internet-work communication component, file management component and singular hardware test component.
Domain commonness components are those ones that realize domain common functions of CNC system. These components are the most important achievements acquired by domain engineering analysis to CNC system. Usually, it includes data communication component, human-machine interface component, task scheduler component, G-code interpretation component, interpolation component, tool compensation component, motion control component, diagnosis component, PLC procedure interpretation and compilation component, PLC execution component, parameter setting component, database operation component, real-time error compensation component and so on.
The special application components are those developed for some special application, such as the calculation component of helical bevel gear.
3.3. Instantiating the architecture of open CNC system to data communication components
Currently, there are four types of describing and expressing software architecture: (1) figure expression drawing with rectangles and directed line segments; (2) path language in module that links traditional programming language module; (3) special software architecture description language (SADL) combining object-oriented technology with the development experience of traditional program design language; (4) system description language based on components.
The first type is often adopted, but the approach of ‘‘figure + letter annotation’’ is always random and not formalized, namely not strict. The shortcoming of the other types is not intuitionistic. We instantiate each kind of architecture to relevant system data communication component(s), which result that software architecture become no more conceptual model of abstract meaning, but program code which can be reused cosmically by other components. Owing to the difference of development environments, each abstract system architecture corresponds to one data communication component at least, and each data communication component corresponds to only a unique system abstract architecture.
4. The classification and retrieval of the CNC system components
4.1. The classification of the CNC system components
4.1.1. Facet classification model of components
Component classification is the activity of constructing and maintaining catalog information of components, and component retrieval methodology depends on the component expression and classification, therefore component classification will facilitate management, storage, retrieval and comprehension of components. There’re a great deal classification modes, and it is facet classification that is applied widely [13,14].
Facet classification mode is composed of a set of facets describing the essential characteristics of components. Each facet classifies components in the component library by its different aspects. The socalled facet is a term space made up of a set of basic terminology (namely keyword). Each component can be delineated by one or more terms with each facet (facet term is a determinate gather), and each facet reflects a method to classify components in the library. Wherefore, users are able to intuitively designate the components to be retrieved from different views. As a result, this process will also facilitate users to understand components.
Facet classification has characteristics as follows according to combinatorics:
(1) A facet must express all components in the component library fully and definitely, namely it is each component that can be classified by the facet.
(2) Each facet is correlated with a term space. Any two term spaces are orthogonal, which means changes of terms in one facet will not influence the term space in any other facet.
(3) The term space of a facet is a finite and indefinite space. Terms can be added or deleted dynamically.
(4) All facets of each component must be predefined; it is not allowed that there exist undefined facets when classifying components. But when querying, users can query by random number of facets.
(5) When a component library manager classifies components, he should aim at each facet to choose proper (one or more) terms from the term space, so as to finish components’ encapsulation work.
(6) Terms in a term space present a dendriform hierarchical structure according to general-special relation. Each term is accompanied with indefinite number of synonyms.
4.1.2. Classification of the CNC system components with facet mode
According to the above-mentioned facet classification method, a facet classification for CNC system components is proposed, and can be expressed by BNF as follows:
::