Modular Design of NC Program in Multi-varieties and Small-batch Production Mode

. Aiming at design efficiency and quality problems of NC program in multi-varieties and small-batch production mode, this paper applied the concept of product modular design into NC program design, and presented the modular design method of NC program and its implementation techniques. By design the module NC program structure and build the database of basic module, provided technical support for the modular design of NC program. The practical application shows those: the constructed module database can be reused and can be combined, using the modular design method can effectively improve the design efficiency and quality of NC program, especially for multi-varieties and small-batch parts, provides an optimal way for NC program to quickly meet the individual demands.


Introduction
Today, the rapid development of economy and industrialization and the rapid upgrading of products make the production mode of mass production be gradually replaced by the production mode of multivarieties and small-batch. In the current manufacturing industry, how to improve the quick response capability of companies to market, how to achieve the production of high efficiency, high quality and low cost, is an urgent need to solve practical problems. The NC machining is an important part of the product development. Its efficiency and ability is directly related to the efficiency of product development. And the efficiency and quality of NC programming directly determine NC machining efficiency. How to improve the efficiency of NC programming is a problem in multi-varieties and smallbatch production mode [1][2][3].
The traditional programming method of NC program is to write program according to the parts one by one. In this way, there are many shortcomings, such as that the amount of labor is very large, that repeated programming is inevitable, that the optimized programs which are verified by practice cannot be reused and so on [4][5][6][7]. In this paper, the modular technology is applied in NC programming, and by a way of the selection and combination of modules achieves the purpose of rapid design of NC program. That solves the contradiction between the efficiency of NC programming and the individuation of products, between the repeated programming and repeated debugging of NC program, and solves the technical problem of mature NC program reused. How to set up machining program module in high level manufacturing is not currently clearly defined. The process mainly depends on the professional knowledge. In this paper, the methods and techniques in the production mode of multi-varieties and small-batch are studied, how to realize the modular program design, such as module partition, module creation, module combination and so on. That provides an optimal way for NC program to quickly meet the individual demands.

Technical ideas of modular NC programming
The application of modular design in product development and large-scale software development has been very mature. The design method is, firstly to analyzing the products function of a certain range including with different functions, or with the same functions and different performances, or with different specifications, on this basis to divide and design out a series of functional modules, and to constitute different products by the selection and combination of modules to meet the different market needs [8]. The Basic guiding ideology of modular design is, to combination into a variety of products with some specific function module, not only to ensure the basic functional requirements of product, but also to promote mass production, and so as to achieve the purpose of reducing the production cost. Modular design method of NC program uses the technology and ideas of modular design for product development and by creating the standard NC module database with different functions provides to the user. In the program design process, the method of the combination of different modules and matching is used to generate a large number of variants NC machining programs in order to improve the efficiency of NC programming. Therefore, the technique thought of modular NC programming is to combination the modules which have already created, carries on the highly efficient preparation of NC machining program. The module is the basic component of the modular design. In order to make the NC program have a unique processing function, structure characteristic and processing level, the module function partition and the program structure are the key to the modular NC programming.

Module function partition
The principle of NC program module partition is based on the function of NC program. A complete NC program usually contains the control of machine tool, the control of motion cutting control and other functions. According to the function of NC program, the module can be divided into four kinds of function modules, namely, the main program module, the processing preparation module, the cutting condition control module and the cutting motion control module. The specific function name and implementation contents are shown in Table 1.

Modular NC program composition structure
The modular NC program is composed of relatively independent basic function modules. It is responsible for a relatively independent work in the process of NC machining. Each module can be replaced by other modules. This makes the modular programming reconfigurable and efficient. When new products need to be processed, the new NC program can be programmed by module combination of some existing modules A complete module NC program is based on the main program module as the main line. It is composed of a number of modules, including processing preparation module, cutting condition control module and cutting motion control module, to achieve the processing of multiple geometric features. The composition structure is shown in Figure 1.

Structure and function of database
The higher the standardization degree of a module is, the higher the efficiency of modular program design for product structure. When creating the module database, the module is need which has standardized to help the standardization of processing technology, which has reusability to be repeated calls for programming a new NC program and which has openness to support for the increase of new module resources or for the modify of existing modules. The structure and function of the database is shown in Figure 2.

Modular program design
Because of the requirement of the module program is universal, the parameter variable is adopted in the design of module program. In the four module program, the cutting motion control module determines the modular programming diversity of NC program, and the design technique is the key. The cutting motion control module is designed as two parts. One is the geometric feature model with the geometric parameters as the variable, and the other is the machining model with the machining parameters as the variable. The geometric feature model is a description of the shape structure and the position properties of the workpiece, including the shape feature parameter variable and the position parameter variable. Commonly used geometric feature model can be divided into the holes category, plane contour category and three-dimensional surface category and so on [9,10]. Subordinate categories of each can have a variety of geometric features, see Figure 3.  The similarity of geometric features determines that the parts can be processed by a similar NC program. The geometric feature belonging to the same geometry properties may have different processing parameters determined by the different material used. But the route planning of NC program is the same. So, the cutting motion control module is designed to determine the program trajectory by geometric feature model and the processing parameters by processing parameter model.
The processing model is based on the processing parameters as variables. It describes the processing methods and processing parameters. The machining parameters are determined by the machining method, which mainly includes the variables of the machining method, the tool variables, the machining strategy and the process parameters. Table 2 shows an example of a processing model variable for a surface [11].

Design flow of modular NC program
The process of using modular NC program design is, to decompose geometric features needed to be processed according to the processing procedure and combined with the geometric feature database, then to match the tool, to instantiate the process model parameters and the geometric model parameters of geometric features needed to be processed. At last, the NC program is generated by combination various modules. The details of the process are shown in Figure 4.

Applications in products
In production practice, modular NC programming technology has been applied in the processing of a number of products, including the disk type, threedimensional space type, plane curve type, space curve type and hole type. Figure 5 shows a part of the parts programmed by the method of modular NC program design.

Analysis on Effect of Application
For a variety of products in Figure 5, the quality and efficiency of the application of modular programming are analysed.

Efficiency comparison
To the structure similar parts, the general programming method is each kind of different structure size corresponding one program. The number of programs will continue to increase with the increase of product types. However, modular programming only needs to select the corresponding geometric features, to combine the modules and then to complete the programming. For the workpiece with the same structure and the size difference, to complete programming only need to modify the corresponding geometric parameters and processing parameters. Efficient programming is realized through the combination of the module and the instantiation of geometric parameters and process parameters.

Quality assurance of modular programming
Because the modular database is designed to the structure which be able to be continuously improved and managed. On the hand, the mature modules of parts that has been processed provides effective quality assurance for parts with the same structure and different size, on the other hand, for the modules of parts that has not been processed, the design and planning are carried out by NC programming engineers with extensive experience, at the same time, they are constantly improved and perfected in the practice to ensure the quality of reliability.

Conclusions
The modular NC programming technology is applied in the production mode of multi-varieties and small-batch,, and the conclusion is as follows: The created basic module unit database of common geometric features provides a technical support for the modular NC program design.
The modular NC programming method solves the contradiction between the product individuation and programming efficiency and the reuse technologies of mature NC program. It is the best way for NC program to quickly meet the individual demands.