The Modular Design and Analysis of Open CNC System Machine

. According to the demanding of design and development about small 3 axes numerical control machine, three machine structure schemes were designed, the finite element method was used to analyze and optimize the machine structure, the movable gantry machine structure was decided as the ultimate scheme, the open numerical control system which includes NC program editing, tool path simulation, machine condition data displaying and computer aided process planning functions was developed in DELPHI language based on “PC+ motion controller ” mode, the system modules can be customized by users, based on above all, the machine was assembled successfully.


Introduction
Under the influence of the economic globalization and the information technology revolution, profound changes are taking place in the international manufacturing industry.The scale and level of the manufacturing industry have become an important indicator of the overall strength of a country [1].With the advent of the German Industry 4.0 era, the plan of the "Made in China 2025" and the action of the "Internet+" have been put forward.And the intelligent fabrication, high-grade CNC machine tools and robots have become the key development areas for the next 10 years.High-level human-computer interaction, smart production, coordination between humans and machines are the develop trend of the manufacturing industry in the future [2].CNC machine tools are moving in the direction of intelligence, greenization and compounding, and manufacturing systems should be networked and open [3,4].Opening and secondary developing of manufacturing systems or CNC systems needs to comply with the standard and system of the corresponding industry [5].At the same time, CNC machine tools should be able to meet the flexible production mode of multi-variety medium and small batches, enabling remote operation and monitoring.In the field of modern manufacturing engineering, choosing the right CNC machine tool can effectively ensure product yield and quality, reduce production costs, make full use of the company's manufacturing resources, and increase the level of intelligence in the manufacturing process [6].
During the machine design process, modular design, optimized design, various static and dynamic analysis of machine tools are important methods [7,8].This paper mainly carried on the modular design of the desktop small CNC milling machine.Through the designing of different machine structure schemes, and compare of them, the structure of the mobile gantry machine was finally determined."PC + Motion Controller" type of open CNC is developed based on Delphi programming language.The system can realize the editing of NC programs, the simulation of tool paths, the displaying of machine status information, and the formulation of CNC machining processes.The system's function modules can be customized by users.Finally, the installation and commissioning of the CNC machine was carried out.

The design of machine tool
This paper mainly designs a small CNC milling machine with open system based on the motion controller, the parameters of the machine are shown in Table 1.In the process of the machine tool structure designing, the effective stroke of each axis of the machine tool should be taken into consideration.In this paper, the two kinds of machine tool scheme are designed in this paper.figure 1 and figure 2 show the structure designing of the vertical and the fixed gantry machine tools respectively.In the proposal of the vertical machine tool, the feed motion is driven by three servo motors, the spindle is mounted and fixed by a cantilever bracket mounted on the column, and the work table is mounted together with the cross slide table.The spindle is mounted on the cantilever bracket, it will generate deformation, affecting the overall stiffness of the machine tool and the working stroke in the Y direction, due to the influence of the gravity of the spindle and the cutting force in the machining process.In the proposal of the fixed gantry machine tool, the feed motion is also driven by three servo motors, but the spindle is installed on the crossbeam of the gantry, the machine tool can effectively increase the working stroke in the three coordinate directions, and at the same time can avoid the problem that the spindle mounting bracket will produce a certain deformation due to its length in the Y direction.The spindle moves on the beam of the gantry, the machine tool will generate certain deformation, vibration and impact during the machining process, which will damage the transmission system, due to the high dimensions of the gantry column.Moreover, because of the high centre of gravity of the gantry frame, excessive acceleration should not be set.

Figure 1. The structure of vertical CNC milling machine
According to the problems and deficiencies in the two schemes shown in figure 1 and figure 2, the scheme was improved and a mobile gantry CNC milling machine structure was designed, as shown in figure 3.In this program, feed motion is driven by actuating motors in three directions, and it cancels the structure of the cross sliding table, while minimizing the height of the gantry column, the gantry can be moved along the two lead rail in the Y direction, ensuring the working stroke in both X and Y directions.So it not only eliminates the problem of deformation of the cantilever support in figure 1, but also eliminates the problem of the high centre of gravity of the gantry frame in figure 2.

Modal analysis of machine tool structure
Modal analysis is used to determine the vibration characteristics of the system, which includes the natural frequency and mode of the structure [9].The purpose of the modal analysis of the machine tool is to determine the vibration characteristics of structure or components of the machine tool, mainly including the natural frequency and mode.These two parameters are also important parameters in the designing of the machine tool structure, they can reflect the relevant mechanical properties of the machine tool body, and they can reflect the structural characteristics of the machine tool and weak links in a certain direction.Therefore, the machine tool structure can be optimized accordingly by analyzing it.The rigidity and dynamic characteristics of the machine tool body directly affect the working performance of the entire machine, and ultimately affect the machining accuracy of work piece [10].So, the modal analysis of the machine structure is carried out in this paper, and the analysis results of the mobile gantry CNC milling machine are shown as figure 4.  From the results of modal analysis, it can be seen that the former six-order natural frequencies range is 83.42-353.54Hz and the maximum deformation range of each step is 10.56-28.51mm for the mobile gantry type CNC milling machine.Among them, the deformation of the second and sixth-order modal machines is larger, they are 23.69mm and 28.51mm respectively.The X axis motor occurs concussion in the second order modal mode.The Y axis motor occurs concussion in the sixth order modal mode.Comparing the maximum deformation of the first six modes of the three structures, it can be seen that the value of the maximum deformation and the fluctuation of each mode of the vertical structure are the largest, the fixed gantry structure is the second, and the mobile gantry structure is the smallest.
In addition, The harmonic response analysis was finished in this paper, the results are shown as figure 5.The deformation is 3.34μm for X axle while the frequency is 264Hz in X direction, for Y axle, The deformation is 4.22μm while the frequency is 72Hz, and for Z axle, The deformation is 2.54μm while the frequency is 264Hz, the resonance between the spindle and machine should be occurred when the frequency is 72Hz or 264Hz, hence, during the machining process, this frequency range should be avoided.

Designing the open CNC system
This article designs the open CNC system using DELPHI programming language based on Windows XP system and "PC + motion controller" form.The Advantech IPC model IPC-610-E was selected and the GT-400 series motion controller was configured for the system.By programming the interface functions of the motion controller internal, it can achieve high-speed point motion, realize servo control, path planning, programmable logic control and other operations, so that the system has a good function of motion and logic control.And by receiving the command signal from the PC to control the servo system to drive the machine axis moving, this can realize the multi-axis linkage control of the machine tool and the complex relative motion between the tool and the work piece.
The designed open CNC system consists of five modules, each module can be selectively displayed in the main interface according to the user's needs through the module customization function.The processing program editing module is relatively independent, completes the editing of the NC code, and can be saved in the form of a document on the local hard disk of the PC to provide the program code for the work piece processing.The document of the NC code can be shared with other modules of the main interface synchronously to ensure the consistency of data between the machine operation module, the system parameter setting module and the data display module.If the user needs to increase or decrease the function module, it only needs to be selected through the module customization function without changing the overall structure of the main interface.Therefore, the main interface has the characteristics of good extensibility and strong operability.The system mainly includes functions such as login, machine status information display, the simulation of tool path generation, the verification and management of NC program, the generation of machining process sheet and operation sheet.The human-computer interaction between the user and the numerical control system is realized through the main operation interface module, and functions such as work piece processing parameter setting, NC code editing and various operation instructions are provided in this module.The system has designed the CNC machining process module, this module may realize the computer aided process planning, including the establishment of machining process sheet and operation sheet.The user can realize the functions of compiling, modifying, browsing, printing, and inquiring about machining process sheet and operation sheet under the module, and can specifically understand the machining process and the content of parts machining.

Conclusions
In this paper, the program of the vertical and the fixed gantry structure for a small three-axis CNC milling machine is designed, through the finite element analysis and simulation, the maximum deformation, natural frequency and main mode of the former six modes of the machine tool are obtained, and for the defects in its structure, the machine tool structure was optimized and improved, the mobile gantry machine tool structure program was proposed and used as the ultimate scheme finally, and the open numerical control system was developed in DELPHI language based on "PC+ motion controller " mode and Windows XP operating environment, the machine tool is assembled and adjusted at the end of this paper.The designed machine tool and numerical control system can meet the user's requirements.

Figure 2 .Figure 3 .
Figure 2. The structure of the fixed gantry CNC milling machine (a)First order modal mode (b)Second order modal mode (c)Third order modal mode (d)Fourth order modal mode (e)Fifth order modal mode (f)Sixth order modal mode

Figure 4 .
Figure 4.The modal analysis results of the mobile gantry CNC milling machine.

Figure 5 .
The harmonic response analysis

6 .
(a) CNC machine tools (b)the open CNC system Figure The installation and debugging of machine tool The effect after the assembly of the whole machine is shown in figure 6, figure 6(a) shows the structure of the machine tool and figure 6(b) shows the open CNC system.

Table 2 .
The relevant parameters of the HT250 and 45 steel