Docsity

COMPUTER AIDED COMPUTER 14, Appunti di Comportamento Meccanico Dei Materiali

Toggle sidebar
bg1
Chapter 14 – CNC machine tool programming
Let us starting with the following definitions:
• Numerical Control
Automatic control of a process performed by a device that makes use of numerical data introduced
while the operation is in progress
• Computer Numerical Control
Realization of NC using a computer to control the machine functions to have a closed loop control
of the motion by controlling the axes
The goal of this section is focused on part program and how to realize it.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Anteprima parziale del testo

Scarica COMPUTER AIDED COMPUTER 14 e più Appunti in PDF di Comportamento Meccanico Dei Materiali solo su Docsity!

Chapter 14 – CNC machine tool programming

Let us starting with the following definitions:

  • Numerical Control Automatic control of a process performed by a device that makes use of numerical data introduced while the operation is in progress
  • Computer Numerical Control Realization of NC using a computer to control the machine functions to have a closed loop control of the motion by controlling the axes The goal of this section is focused on part program and how to realize it.

We can define a part program as an ordered set of instructions in a language and in a format required to cause operations to be effected under automatic control, which is either written in the form of a machine program on an input medium or prepared as input data for processing in a computer to obtain a machine program. We can write the program directly or use some applications that enables us to interact with an environment where we have tool, machine and components virtual representation. By this way, we can choose at high level the strategies that can be applied.

ISO code

Let us start from ISO code, a simple and old programming language, which is one of the main used in manufacturing in different kind of applications linked to numerical control. It involves NC commands such as G, M, S, T, H, D, F code and related address and it is written in a dedicated language for part programming with a quite simple structure that can be easily exported and read by the machine. It consists of a structures sequence of different blocks where inside each one we have a set of calling sub-program and displaying message with the possibility setting variable or conditional program calls. A block example is the following one:

Preparatory function (G-code) About the machine functions, we employ the G-code , which includes preparatory functions. We can set different aspects in this code portion:

  • Movement : command the relative movement between tool and workpiece.
  • Setting local coordinate system : specify the origin and orientation of local coordinate system including orthogonal coordinate system, the polar coordinate system, and rotational coordinate system.
  • Interpolation : command machining various profiles such as line, arc, helical, spline, etc.
  • Miscellaneous : commands for tool compensation, safety check, and skip. Here we have an example of the G command : Auxiliary functions (M-code) For the auxiliary functions , the M-code is used:
  • Coolant : command coolant on or off.
  • Start/End of a main and sub- program : inform the beginning and end of a part program.
  • Spindle : command a spindle to rotate in CCW or CW direction and specify the spindle speed, limit speed and spindle gear change.
  • Miscellaneous : command the change of tool, workpiece, pallet and rotation of the table/loader. About the M-command , it can be the only instruction in the block and three (3) is the limit on the number of M instructions in a block. It is activated before the movement commanded in the same block (G instruction). We have a very big list of possible commands:

Another important one is the S-command , linked to the spindle control. In particular:

  • The address S relates to machine spindle function
  • Two alternatives about the speed control:
    1. Cutting speed in [m/min] – G96 (to keep vc constant changing n, like in facing and conical turning)
    2. Spindle speed in [rpm] - G The maximum speed can be limited (e.g., G50 S800).
  • The spindle rotation direction must be specified:
    1. Clockwise (CW) – M
    2. Counterclockwise (CCW) – M To establish it as CW and CCW, we must look from the headstock area towards the spindle face
  • Spindle will not start rotating until both the speed and the rotation commands have been processed

Also the wear offset amount is important in this case. It can be defined as the difference between programmed value and the actual measured size of part and be adjusted on the basis of the measured machined parts. Speaking about milling/drilling , the geometry offset corrects the difference between programmed tool length and its actual length. Finally, it is important to underline the tool preset, which occurs away from the CNC machine. Indeed, different tools have different distances from the part (we consider the point of interaction between tool and workpiece to provide this information and compensate the position of that point).

Coordinate systems

Now we must define a machine reference system and the possible range of variation in position on a reference frame. The zero-position corresponding to the origin of the machine coordinate system. It is important distinguish:

  • Machine coordinate system Cartesian coordinates fixed on a machine with respect to the machine zero (origin of the machine fixed by the manufacturer).
  • Workpiece coordinate system Cartesian coordinates fixed on the workpiece. Hence, we position the workpiece coordinate system into the machine one, in order to control the tool motion and the correct workpiece positioning (translation and rotation operations).

Let us consider the following example (turning) , where:

  • M: machine coordinate origin (machine zero)
  • W: workpiece coordinate origin (part zero)
  • E: tool coordinate origin (tool zero) We set firstly an origin of the machine and an origin of the workpiece; the latter selected on the basis of:
  • Technical drawing
  • Convenience of setup and operation
  • Safety of working conditions Thus, we have the possibility to describe all the motion wrt that reference frame. Work offset and types of coordinates Generally, if we consider even the work offset , we are capable of put in relationships part zero with machine zero. This allows the CNC programmer to program a part away from the CNC machine. There are two G-commands referring to the coordinate system:
  • G90: absolute coordinate system
  • G91: incremental coordinate system

Interpolation The basic interpolation is the linear one. We need also other information as the speed values (cutting speed and feed rate). The motion is executed with a programmed feed. Inputs:

  • Destination point coordinates
  • Spindle speed (S)
  • Feed (F)

Even the circular interpolation is very used, for example in milling operations. About its syntax:

  1. Initial point coordinates
  2. Choice between:
    • Center coordinates (center of the circular interpolation respectively in x and y plane; starting from these values we can define the possible circular interpolation, once defined the final point) plane x,y (G17): I,J plane x,z (G18): I,K plane y,z (G19): J,K
    • Radius R
  3. Choice between:
    • Final point
    • Angle range

Other possible commands are:

  • MACHIN/ name of the machine tool
  • COOLNT/ coolant on/off
  • FEDRAT/ feed rate
  • SPINDL/ rpm
  • TOOLNO/ tool number
  • CUTTER/ tool compensation
  • INTOL/ o OUTTOL/ tolerance
  • END (program end) Usually, the creation/modification of a part program can be done in two ways:
  • Manually on the machine by the operator
  • Using a Computer Aided Manufacturing software, that creates the APT code The programming on the machine is used when the part to be produced is simple. Instead, when the part is hard to manufacture (it has complicated features or requires the interaction of multiple programmers) the usage of a CAM software becomes necessary. Its application enables to put together information about starting and final workpiece, in order to let the definition of the final tool path easier.

In general, each operation corresponds to a line of code. In the following picture we can see an example of tool path approximation and tool compensation using a CAM software : There can be also some problems in tool path generation : In general we must predict all these stuffs.

Step-NC As we can see in the picture, the NC machining processes has been subjected to an evolution over the years: actually we're in the middle between ISO code and step NC way of thinking. The final goal will consist of reaching an high level of programming in order to machine our product. STEP-NC changes the way that manufacturing is done by defining data as "working steps": a library of specific operations that might be performed on a CNC machine tool. In other words, it breaks down every machining operation into the steps required to perform the operation. In the past, CNC machine tools had to be programmed using G and M codes (from ISO 6983), which were instructions that only told the machine what moves to make, without any semantic content that referred to the part being processed. The idea is to have a new way to program at high level not entering in the detailed definition of ISO code. Hence, we need something to interpret the high-level programming and convert it into ISO code.

At the very end, this representation has:

  1. Full set of the whole geometry (elementary and complex working features)
  2. The workplan, that is a set of matching working step, which link a feature with the relative machining operation