Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
programs
Identify the elements and structure of a CNC part
program.
In this day and age, the manufacturing industry is adapting to latest
technology which makes manufacturing parts easier for the employees
working on the work floor. Before this technology, lathe machines and
milling machines were manually operated, but with the introduction of
CNC machining, the Lathe and milling machines work by themselves with
the help of an input command. For the CNC machines to work by
themselves they need to be given a set of instructions which help them
calculate the placement of the component (Component location), how and
where the component needs to be cut from and the instructions also
determine the cutting feed rate of the machine. These instructions are
compacted into a program called the CNC part program.
A Part program is basically a sequence of instructions which are used to
describe the work, which has been done on the desired part, structured in
such a format that it can be required by a computer under the control of a
numerical control computer program. It is the process of producing a
programs sheet for a drawing sheet (CAD Part). The data from the
programs sheet is then fed into the numerical control system using a
compatible format. This Numerical control system is attached to the
Machine such as a Lathe. The data is then translated inti a language which
can be understood by the control systems of the machine, helping the
machine determine the following data;
Investigate the use of ISO standards with respect to codes and program
format.
As mentioned in the task above, the Block of data is line of NC words which
have a particular command. Each word in the block conforms to the EIA
(Electronic Industries Alliance) and is written on a horizontal line. The Machine
control unit will not recognize the commands if five complete words are not
included in each block. Each line of words allocates a certain command which the
machine reads and preforms on the material. A block is a complete collection of
NC words representing one single
NC instruction. To separate these
blocks an end of block symbol; is
used.
For Example, in the image provided on the right shows a normal Block of data, in
this bock of data the N080 represent the sequence number of the operation.
G01 represents the linear interpolation. Z-0.5 will move the table -0.5 out, in a
negative direction along the Z axis. And the F40 represents the feed rate of the
machine.
To prepare a part program first the drawing of the part which needs to be
produced should be studied in depth, this will help the programmer with planning
the machining sequences, which will be required to produce the part. The
programmer will have to put the visual concepts into written manuscript. This
would be the first stage to developing the part program. The manuscript for the
part program should include the reference point for aligning the workpiece, type
of cutting tools and work-holding devices and many other pieces of key
information about the part.
In a part program, there are different types of codes some codes have more
significant functions than other codes, such as the CNC Sub programs, which
are similar to NC and CNC programs, except they are usually more simple. In
basic terms, Sub programs will usually be just a series of movements and
positions. The only difference with a sub program is that the end code of the sub
program will usually be an M99. This code commands the control to return to the
main program from which the sub program was called. Calling up a sub program
while the machine is working is easy. This is because to call the subprogram, the
M98 command is used. By feeding this code into the manuscript of the program
the CNC control will leave the current program (Main program) and complete the
Another technique which can be used to increase the performance of the system
includes using a command which brings the control of the CNC to its absolute
Zero point. This is where the X, Y, Z, coordinates are at 0. The absolute zero
shift can change the position of the coordinate system. The programmer first
sends the Machine spindle to the Home Zero position by feeding the G28
command in the program. The command G92 tells the MCU (Machine Control
Unit) how far from the home zero location, the coordinate system origin is to be
positioned. This can simply be explained as;
N1 G28 X0 Y0 Z0 (This NC block of
data, sends the spindle to Home
zero Position)
N2 G92 X4.000 Y5.000 Z6.000
(The Machine will refer these
coordinates as the Part Zero)
This helps the Machine understand
where to start machining from,
because in many cases the work
cant be clamped on the Machines
Zero point due to Jigs, Clamping or
due to the size of the part being
machine itself. Reprograming the
datum edge helps the machinist
work with the part without a hassle
of working out the coordinates,
because he/she can Command the
machine to Zero shift the
coordinates to the datum edge of
the workpiece.
In some CNC machining jobs, the toolpath is required to have both right and Left
hand orientation. With Mirror imaging on a program, the overall programming
time can be shortened. This is because any machining operations can be
repeated symmetrically by using the mirror Imagine feature of a control
system. The programming time is reduced because the programmer or the
Machinist does not need to work out new calculations as he/she can
symmetrically flip or Mirror the programming so it can be done on the other side
of the machine bed, this feature also reduces the chances of errors. The Mirror
image feature can also be defined as the Axis Inversion function, which is
correct up to a certain point, but with the mirror image feature, the machine axes
are inverted, but other changes also take place. To understand the programming
of mirror image, it is important to be familiarized with basic rectangular
coordinate systems, and how they apply to Quadrants.
There are four quadrants on any plane, the upper right area creates Quadrant 1,
the upper left area is quadrant 2, the lower left area is Quadrant 3 and the lower
right area is quadrant 4. In basic terms Mirror image is a feature which is based
on the fact that machining toolpath in one quadrant is not much different than
machining the same toolpath in another quadrant using the same program with
the Mirror image Function in effect.
Another program feature which can be used while CNC machining is known as
Coordinate Rotation. When programming a tool motion that creates a patter,
contour or a pocket in Orthogonal orientation, the Coordinate Rotation can be
used to rotate the tool path of the job about the defined point and a specified
angle. This feature can be used on a lot of CNC operations and makes the CNC
programming process easier, flexible and efficient. The most important
applications of coordinate rotation is a program that is defined by vertical or
horizontal axes (Orthographic orientation) but is defined o be machined at an
angle on the part drawing. Usually the programs toolpaths are calculated on axes
which are parallel to the orthographic orientation, once the toolpaths are fed into
the code, the Coordinate rotation command is fed into the code with a defined
angle of rotation. Usually this feature only requires three items to define the
rotated part to the Machine control unit. The Center of rotation, the angle of
rotation and the toolpath to rotate. Before these items are fed into the code, the
feature needs to be turned off with a preparatory command which is G68. The
g68 command will activate coordinate system rotation based on the center of
rotation which can be defined as the Pivot point. And the degree of rotation. For
example
G68 X Y R Where;
X = Center of rotation Defined by Absolute X
coordinate
Y = Center of rotation defined by Absolute Y
coordinate
R = Angle or Rotation
This Feature can be used for a lot of
conventional Complex CNC machining of a part
which is circularly based with contours and
pockets in the inner diameter. This command
with the Mirror imaging can speed up the CNC
programming time significantly. For example, a
Another function which can be used in CNC is the Scaling Function. This
function is usually used in a situation where the machining tool path that had
already been programmed once must be repeated, but machined as a smaller or
larger part than original, yet still keep it proportional at the same time. For even
more efficiency this function can also be used with other programming functions
such as Datum shifts, Mirror image and coordinate rotation. Those scaling
function is nothing more than multiplying the programmed axis value by the
scaling factor, based on a defined scaling center and the scaling factor. This
function can be switched on with the command G50 and the specified with the
original scaling and then and defining the CenterPoint of the part.
The Macro Routine function for Machining is really powerful and in basic
operations can be used for repetitive operations, and can be classed as fairly
similar to using a sub program. Macro routinizes will allow the machinist to
change some features of the job without actually editing the main program code.
This style of programming is usually used for parts which are fairly similar to
each other but with some different features like dimensions of holes, or pockets
etc. Macro Calls are initiated with G65 instead of M98 (or M97 on a Haas). Macro
Calls have what are called "arguments". All programming languages that have
this capability refer to it as "arguments". Arguments let you use word address
format to send information to your macro. Let's say we have a special custom
deep hole drilling cycle we have created. We want to pass it the X and Y coordinates
where the hole goes as well as a Z coordinate for how deep to drill. With a custom
Subprogram Call, it might look like this:
REFFERENCES
COMPUTERNUMERICAL CONTROL PROGRAMMINGBASICS. 2015. COMPUTERNUMERICAL
CONTROL PROGRAMMINGBASICS. [ONLINE] Available
at:http://www.engr.uvic.ca/~mech410/CAM_references/CNC_Computer_Numerical_Control
_Programmig_Basics.pdf. [Accessed 24 November 15].
Subroutine and subprograms call (all machines). 2015. Subroutine and subprograms call (all
machines). [ONLINE] Available at: http://cncsimulator.info/OnlineHelp/OnlineHelp.html?
Subroutineandsubprogramscallallm.html. [Accessed 24 November 15].
Subprogram and Macro Calls. 2015. Subprogram and Macro Calls. [ONLINE] Available
at:http://www.cnccookbook.com/CCCNCGCodeSubprograms.htm. [Accessed 24 November
15].
CNC Programming Handbook. 2015. CNC Programming Handbook. [ONLINE] Available
at:https://books.google.co.uk/books?id=w7jBgAAQBAJ&pg=PA409&lpg=PA409&dq=mirror+imaging+CNC&source=bl&ots=VZz8b16
uqG&sig=Fme9TF4URc3jRLibWZID0M4dhTc&hl=en&sa=X&ved=0ahUKEwjSxf6hyavJAhV
GcRQKHcjIBO8Q6AEIIDAA#v=onepage&q=mirror%20imaging%20CNC&f=false. [Accessed
24 November 15].
http://www.compumachine.com/support/Tech-Bulletin/How-To-User-Mirror-Fucntion-Fanuc.pdf
http://webcache.googleusercontent.com/search?
q=cache:http://www.ignou.ac.in/upload/Unit-457.pdf&gws_rd=cr&ei=5v44Vu6hAobaeYWJpNAH
Programming CNC machines in Haskell. 2015. Block of data. [ONLINE] Available
at:http://users.dsic.upv.es/~jsilva/cnc/. [Accessed 24 November 15].
COMPUTERNUMERICAL CONTROL PROGRAMMINGBASICS.
2015. COMPUTERNUMERICAL CONTROL PROGRAMMINGBASICS. [ONLINE] Available
at:http://www.engr.uvic.ca/~mech410/CAM_references/CNC_Computer_Numerical_
Control_Programmig_Basics.pdf. [Accessed 24 November 15].
Wikipedia. 2015. G codes ISO standards. [ONLINE] Available
at: https://en.wikipedia.org/wiki/G-code. [Accessed 24 November 15].
CNC cookbook. 2015. coordinate rotation. [ONLINE] Available
at:http://www.cnccookbook.com/CCCNCGCodeG68G69CoordinateRotation.htm.
[Accessed 24 November 15].
COMPUTERNUMERICAL CONTROL PROGRAMMINGBASICS.
2015. COMPUTERNUMERICAL CONTROL PROGRAMMINGBASICS. [ONLINE] Available
at:http://www.engr.uvic.ca/~mech410/CAM_references/CNC_Computer_Numerical_