Application of CAM systems to simulate of a milling machine work

Mechatronic is an interdisciplinary science which consist of subsystems like mechanics, electronics and theory of control. CAD/CAM systems are mechanics and theory of control resulted of synergy, so they are also a part of mechatronic. CAM means Computer Aided Manufacturing so it is useful to make simulation of manufacturing process and machine work. The subject of the work is to create a model in CAM program and next simulate the operation of this model. The CAM model can be use for programming numerical control machine using G-code (generated by CAM program). As an example it is propose a milling machine, which was made in the NX program using a special postprocessor. That model can simulate real work of that machine using set displacement parameters. The model was used to produce simple shaped product. The aime of the work is to generate a path of real milling tool and most precise mapping work of the real machine center. That aim was established in that form has been obtained. The created model is working and allowing to make simulation of individual product manufacturing, not exceeding the maximum of the axes values and keeping all of the parts according constrains. In the future the project could be expand in more complicated shape of product and use more complicated milling model machine (for example 5-axes milling center machines).


Introduction
Computer Aided Manufacturing (CAM) is one of the most powerful engineering tools used in the area of simulation of production systems. More precisely it is software utilized to control machine tools and other devices during manufacturing of workpieces. It allows to make programs in G-code simpler and cheaper (the programmer needs less time to program, hence CAM programming allows for example avoiding collisions). [1][2][3]. The example of CAM operation is shown in figure 1.
G-code is a normalized language for NC machines, which was included in the ISO 6983 standard. It defines based operations which should be done to make all of product using numerical control machine.
There are three ways to create G-code: [4]  writing the NC code in any text editor and next importing the program to a machine,  defining it on the machine's desktop,  generating CAM program (as it is done in this case). Among the G-code it should be distinguished groups of parameters such as: [4]  N -number of lines (e.g. N10), 2

1234567890''""
ModTech 2018 IOP Publishing IOP Conf. Series: Materials Science and Engineering 400 (2018) 042037 doi:10.1088/1757-899X/400/4/042037  G -functions (they specify many parameters such as tool movement, unit layout, etc.)  M -auxiliary functions (machine)-they can be used, among others in order to conditionally or unconditionally stop the program, set the spindle direction, etc.,  T -indicating the tool selection (e.g. T2, which means selecting the tool assigned as the second tool),  S -used to define the spindle speed (e.g. G21 S1200 means value 1200 in metrical unit layout so it is means 1200 mm/min),  F -defines the feed speed (e.g. G20 F10 means value 10 in/min),  X -defines the positions along the X axis (e.g. G21 G90 X100, means the tool movement with relative to the X axis to the point 100 mm on this axis),  Y -determines the position along Y axis (e.g. G21 G91 Y100 -means, that value of position on Y axis will grow by 100 mm),  Z -determines the value along the Z axis (similarly to the previous axes).

Simulation in the NX environment
The Siemens NX program is a multi-tasking tool helpful in solving many engineering tasks. One of the simplest applications of the program is using the CAD module to create a 3D model. An example of the use of NX software as a CAD system is shown in figure 2. This model includes simple motion simulation.
In order to create a simulation, it was necessary to use the motion module, where the links have been declared, which have been assigned to each of the parts of the mechanism. Then, the appropriate motion types, assigned to individual parts, were specified. The element was declared as a slide and appropriate motion parameters have been set -uniform motion, while second have been fixed. The simple simulation only involved generating motion at a constant speed of 10 millimeters per second, without getting into the details of the movement. The whole simulation lasted 60 seconds and was divided into 120 steps, but it can be accelerated by changing the Animation Sampling Rate value. A useful function that allows presenting simulations outside the program is its ability to convert it to a video file via the Export to the movie option. Another, more advanced task, that can be done is utilization it as a CAE system to perform engineering calculations for the created model. As an example of such application, it could been presented the calculation of strength of a mining support, which is shown in figure 3 [6]. However, the most important task (from the perspective of this work) to which the NX was created is using it as a CAM system, in order to simulate the production of a product through a programmed model of a cutting machine.

Simulation in the NX environment
The result of CAM simulation was generating the proper path, which was helped to avoid collisions. It had been created a base shape and final shape and next the program was generated. The example of the product which was used in simulation with the generated path could be seen in figures 4-5.
As can be seen the movement of the tool has been defined by colored lines, where red lines are idling move, blue lines mean the milling cutter depth of penetration in a material (or upward movement), whereas light blue mean cutting by feed motion. As it could be seen, the path had no collision and is optimized to make the part. The simulation of the milling operation could be seen in figures 6-7. Program simulating the milling process step by step (each of step has one line of NC code) was elaborated in the G-code. It is possible to see stripping of material as well as the possible collisions are visible.

Conclusion
In the presented analysis the NX system was used to generate a virtual model of a milling station. NX was used to generate special CAM models, generate a postprocessor with G-code and next conduct simulation. That simulation could show time of production of one product (in example it was about 25 minutes) and allow to check that the generated path had no collision. The simulation using CAM is very important in engineering work. It can help to reduce collision and program more optimized Gcode programs in a shorter time, because preparing a CAD model is more simpler than other two ways of creating of numerical control machine programs.
Then it could be realized more complicated, five axis models and more complicated products. The work should be focused in the future on integration with other environments by the special drivers