noc20-me44-lec22

IIT Kanpur July 201
20 followers
1 Video View·Dec 4, 2023
The next important topic in CNC is going to be, Manual Part Program, an Example. So, we
will try to start from here, this is a component. So, we will try to start from point p0, then
we go to p1. This is all in inches by the way; these are all in inches. So, we will
go to p1, from p1 we will go to p2. You know the length; you know the angle which is set
45 degrees. Then from here you will try to come here offset. Then you have a radius,
so the radius is divided into 2. So, this is one clockwise.
If you take it is as counter clockwise, counter clockwise and then this becomes your clockwise,
whatever it is. So, you can try to do up to here and then you can try to split up to here.
Or you can use the same command and then swing it up to here. p4, so this will be G00, this
will be G01, this will be G01. This will be either G02 or 03, depending upon your requirement.
And then, this is G01, and then G01. So, if you wanted to do the component while
machining, so here are the tools sizes given, feed rates, cutting speed, starting point,
everything is given. So, this is speed 2 comma 2, this is what is given here. The program
is in inches. So, we write p0, p1, p2, p3, p4, p5, p6, p5 and p1, and then p0. So, if
you want to make a component, so this is how a sequence has to be followed. Again here,
you can choose either to do absolute or you can do incremental one.
So, let us do step by step, by step. First, set up the part programming. So, first block
you write, N010. So, the entire program is inches, G70. We are going to follow absolute,
G90. So here it says, the feed is in inches and then we have; this in inches. Then we
have spindle speed in RPM, and then we will try to have spindle on, which is in the counter
clockwise direction.
So then, N02 I am trying to move. G17 is the plane, XY plane I am going to use. And then
use, full circle interpolation is G75. Then we are defining the feed, cutting speed, tool
number, and finally the flood coolant on. Miscellaneous will come at the last. This
is second point.
Then the third one is, we have N03. We are saying G01 X3.857 and Y is 3.698. So, this
is the target coordinates, to the end point what it has to go. So now, from here it will
try to go here. So, this is p1, this is p1. So, here if you look at it, so this is p1.
So here, it is 4 comma 4, this point is 4 comma 4. So now, I have to go stop here. So,
I have to find out the point. So, it is 4 minus 1.25 times, which is a diameter, so
it is 3.85 comes here. And Y axis is this. So, it is divided by tan 22.5, which is nothing
but 44 divided by 2. So, it is 3.68. So, this will be my end points. So, from p0 I have
to go towards the destination point of p1. So, this will be there. So, all the feeds
and speeds we will take, this is the feed and this is the speed. And the tool 1, is
used for the operation.
Next, from here I will try to do your linear interpolation, which will go from here N0,
N40, G01. So now, from here I have to go up to here. So, what I will do is, I will try
to; because this is 4 and this is 5, so this is 9 inches. So, I will have to go X3.875.
I will go up to p2 destination which is 9.125. Why is this 125? because we have told the
diameter of the cutter is 0.25 inches, so half of it.
I can write it like this. Since, there is no change in the X coordinate point, I can
directly write G04, G01 and then I can say Y9.1. So, the X value is assumed to be the
same. The X coordinate does not change, so no need to change in the program. We are following
absolute scale.
Then, from here I have to come up to here. So, this is what is N050 G01. I have to say
from here it is 9.25, which is fixed. And from here, I know the diameter up to here;
the length up to here is 2.5. And I have to, this radius is 1 inch. So now, I have to subtract
it and find out what is p3, so p3 is a point here. So, we know the diameter is 0.25, so
radius is 0.125. So, this is your X axis, and this is your
Y axis, and this is your X axis. So, X value will be 9. So, this will be the X value, it
is 6.5 minus X to the whole square plus 0.125 to the whole square. This is going to be your
X value. So, X is this. And 9, it is the same, so it is the 9.25 is there. So, this point
is going to be 6.5 comma 9, this point. So, and then from here, we are going to draw a
radius which is around about 1 inch. We will try to take this center and draw.
So currently, we are up to here. Then from here we have to move here, so that you can
swing the radius to get it. So, here what they say is; they say that this total is 5
inches and then this is 2.5. So, this point plus 2.5 will try to give me the center. I
have to find this point.
Next one is circular interpolation, counter clockwise motion. So, N60 G03. So, it is from
here I have to swing it around up to here. So, it tries to tell me the point, so which
is 7.366 and Y is along a straight line, 9.25. And I and J are the coordinates of the center
of the circle, or you can try to define the radius of R. You can write it like this or
you can write it like, N60 G03, X is the same, Y is the same. I0, you can define R0.8. Then
you can go up to this point.
Then, from here we have to go along a straight line, so it is N70 G01. Now, I am not changing
the Y value, it is only the X. I go to X9.302. So, the target value of Y is unchanged. So,
it is linear interpolation. Here it was circular; counter clockwise circular, so here it is
linear. So now, from here I will have to go again a linear towards the point p1.
So N080 G01. So, from here I am trying to go to this point which was 3.875, Y is 3.698.
I come to this point p1.
And then, from here I will try to move here. So, it is G01. So, X2 and Y2; so, I come to
this point and I say end of the data. And then I say, N100 M00 stop the program. So,
the complete part is executed in this program. So, we have done it in 9 steps.
So, if you see this complete CNC program, we have done step by step, by step by, step.
So, you will know p0, p1 how to go, p1, p2, p3, p4. Now interestingly, the latest software
have come up in a great way. So, you do not have to do so much of small calculations,
what is the offset. You just have to define these points, and the rest of the calculations
will be done by interpolation techniques and the system takes care. So, you have to say
p2, p3, p4, p5 and p1. So then rest of the calculations, it will take care. And then
you can easily execute the program.
When I consolidately put this, complete program into number of blocks. So, this is how it
looks like. First step, N010 G70 G90 G94 G97 M04, we did it. Then, which plane we are operating.
And then we are trying to talk about linear interpolation, then circular interpolation,
counter clockwise, then linear. And finally, we say, we go there. And then, if you want
to go, one more step outside, we can say G00 X0 Y0. So, it takes completely outside the
component. So here, this you can write it in R plane,
R radius, or you can write as I and J options. So please keep that in mind. And just for
simplicity, you can start using R, rather than using I and J. In examination if at all
there is a program asked, so it is better you use R, instead of I and J.
So now, let us take; this is for your milling component. Now let us see, one example for
a turning component. So, a simple G code example for a CNC lathe. As I told you, in milling
you will have X, Y and Z; 3 points. But in that program, we did not have any Z value,
because we assume the work piece to be a plate. So, it is a constant Z. So, that is why we
did not define the Z value at all. But now here, we can see how do we use the
codes. So, in turning, we will have only 2 axes. One, this axis is called as the Z axis,
and this axis is called as the X axis. If you look at the complete component, the component
has to be phased. And then it has to be turned. Then you will have a taper in the turning
and then finally you make it. So, the larger diameter is going to be dia80
and the smaller diameter is going to be dia50. The length of the shaft, whatever you have
made, the length is going to be 30. And this length is going to be 50. So exactly dot,
you can’t keep the tool and start machining it because if there is any undulation on the
work piece, the tool will get hit and the tool will get broken, the insert will get
broken. So, what we do, we always try to move it to
a place which is little far off and safely keep at that point. So, here what we do is
we try to keep it at a safer point. And from the safer point, we try to move it to the
tip of the shaft. So, from here we go from A to B it goes. From B it goes to C, and from
C it goes to D, and at D it tries to finish the component. So, we are going to write our
CNC program accordingly. We are not going into facing operation. This
is only an example. So, we are supposed to know how to write the coordinates, along the
given points A, B, C and D. So, it is very easy. So, from here to here, there is no variation
in diameter, so it will be the same. Only variation is going to be the Z. So, here you
will have X, as well as Z variation.
So, let us see in words how are we going to write the code? and then we will see the code.
So, N5 is clamping of the workpiece. Then N10, the changing number 1 tool and executing
its offset because if the tool, whatever comes if you have to see what is; you have to call
the tool and then you are to say all this offset. Every tool will have a register, in
that register you will try to record all the details relevant to it. Then you will start
moving it to position A, from somewhere you will start move it to position in A, in a
very rapid speed. Then, you start the spindle with 600 RPM.
So, before machining, you will first start rotating the job and then only you will start
are doing. When you start rotating the job, you will on for the coolant. Then once these
2; A position is reached, job started rotating, coolant start on then what will happen, the
approaching point from A, you will move to approaching point B with 600 millimeter per
minute. Because this happens in air, you are not touching the work piece. So, this happens
in air, so you move in rapid speed. Then cutting from B to C happens, at a given
speed and feed rates. Then cutting from C, we go to D point. Then after finishing the
D point, we retract the tool to come back to point A. Now, you should cancel the offset,
whatever you are given, T01. Then you will stop the spindle, switch off the coolant,
release the workpiece and then you say end of the program.
So, now we have described the complete sequence of operation for this particular program.
So, I would give you as an assignment. Please start working on this assignment and you can
submit it to us for correction.
So, let me see one more component. And this is milling a component. So, in this milling
component, we have given you your home position here, this is the home position. We are trying
to follow absolute. So, it is at this point where X is minus and Y is 86.95. From here
we will use G00, come to here which is this point. So maybe, we might take this as 0 comma
0. So, this is A point which is 20 in X axis, Y axis it is 0. So, you can try to take this
as 20 comma 0. From here you are going to this point, where we have given you the points
30. So, this is 0 comma 30. And from here, you
are going to this point wherein which, it is 10 offsetted from here and from here it
is 100. So it is, X axis it is 10, X axis it is 30, and Y axis 100, this is the point.
From here we are going to D. So D is going to be, this is 150. And here from 150, we
are going to go up to here. So, this point E is 150, 150 minus 10, it is going to be
in X axis 140. And this is going to be 60, so comma 60. So, from here we will go here.
So, from here to here, you have to use a circular interpolation. From here to here, you will
use a linear interpolation. And from here to here, E we will be; Y axis will be 0. So,
it is 150 plus 70, so it is 170 comma 0. And here naturally, so that I have missed out
this 20 which is there from the origin. So, it is going to be 160 comma 60. So, let us
see the sequence of operation, for this part you will write the program and you will submit.
So, when we try to look at the sequence, N5 absolute position, so G90 and metric units
has to be used. Then you will have; next is call for tool 1. Then define work zero at
A. So, if you want to define the point at A, you can make this as 0, 0 or you can try
to make this point as 0, 0. I have made offset from this point as 0, 0 and I have given these
values. But, if you want to follow the sequence what is given here, you can also do that.
So, define your work zero point at A. Then rapid traverse from a different coordinate
system to A with a spindle speed on, this is what it is. Then at Z, you have to plunge
12.5. So, Z will be throughout the program minus 12.5 because this is 0 of your workpiece,
and this is 12.5. If you want to play save, you can go even 16. So rapid plunge to 12.5
millimeter above 0. So now, the feed rate to Z minus 12.5 feed rate up to 150 millimeters
per minute. Now, cutline AB to B. Then from BC to C, CD
to D, DE to E and EA to A. So, you are just going AB, BC, CD, and then you are going back
to A, EA back to. So now, once you have finished all the cuts, now after reaching here you
have to retrack that minus 12.5, 12.5 so it comes above. Minus 12.50, 0, 12.5 it goes.
So, then the reference point returns to Z direction, spindle is switched off, reference
point returns to X and Y directions, and end of the program happens.
So, these are the sequence of operations. You just have to look into this program and
then start writing. I have assumed this as my 0, 0 and I have given the point. But here,
you please check whether they are talking the same. If it is same use it, if there is
a change, from your understanding please make the changes accordingly and write a program.
Then let us look at one more program, sample program for drilling. So, you have; let us
assume this is your 0 comma 0 and these are the points which we have given. And if you
look at the slide view, it is not through hole drilling. The through hole of a plate
will 0.5 but you are trying to run only 0.375. So, since it is a drill, you will always have
this conical taper. So, you should have a flat. But since you are drilling and it is
blind, you will have this depth; conical depth. So, the depth which is given here is 0.375.
So, here it is inches. So, please try to execute this program, the
previous 2 and then this program, three programs and then you can share it across. Or if you
have doubts, you can keep it for yourself.
Now that we have understood manual programming, let us move to the next step called as computer
assisted part programming. So, in computer assisted part programming, here it APT or
Automatically Programmed Tools is high level computer programming language, most commonly
used to generate instructions for numerical control machine tools.
APT uses language statements to define part shape and tool motions as well as machine
tool dependent data example, feed rate, spindle speed. APT uses language statements to define
part shape and tool motions, as well as machine tool dependent data. The general procedure
for generating APT source codes involves the following steps, identify the part geometry;
identifying the cutter motion, feed, speed and the cutter parameters. Then we talk about
the code, the geometric cutter motions and general machine instructions into a part programming
languages. The code is known as a source code. We will see that.
Then it is moved to a compiler, a compiler or process the source to produce the machine
independent list of cutter movements and auxiliary machine control information, known as cutter
location data file, CL data file; Cutter Location. So, it complies all the program and then it
tries to take the cutter movement and the auxiliary machine control informations. An
APT, processor program is used to read these statements, interpret the meanings, and perform
all necessary calculations to generate a series of cutter location motion that define the
tool path. A generalized APT output usually is a CL,
cutter location data is converted to the particular format G code, required by the CNC machine
using a post processor program. Then CL data file contains details of the cutter movement,
either as a series of absolute linear GOTO moves or relative GODLTA moves.
Note that the CL data is different from APT. So, CL data is defined by the International
Organization of Standards (ISO). And finally, you do post processing and transmitted to
the MCD.
So, this is what a part programmer’s job is, define path, define tool path operation,
specify other functions speed, feed, etc. The computer’s job will be, input translation,
arithmetic and cutter offset compensation, editing phase and then it does a post processing.
The sequence of activities in computer assisted part programming is very important, you should
understand.
Automatically programmed tools, a major advantage of APT is that it has developed into an acceptable
standards for machine tools, in addition to the alleviating the burden of coding of very
basic levels. The primary disadvantage of APT is that it uses English language command
to define geometry instead of convenient graphical method. Note that, APT type programming approach
is being gradually replaced by more advanced CAD/CAM approaches.
So in APT, suppose let us assume this is a part which has to be done and these are the
points P1, P2, P3, P4, P5, P6, P7, P8 and P9. P1-P2 is joined together by a line L1.
P2-P3, L2. P3-P4, L3. P4-P5, L4. P5-P6, L5. P6-P7, L6. P7-P8, L7. P8-Pl, L8. So now, there
are points P1 to P8 and there are lines which are L1 to L8. So, desired tool path and the
geometry entities identified and labeled. This is a part and it is labeled.
So now, the APT source code is part number example. Machine was going to be Mill5; cutter
is going to be of diameter D0. So now, what are you do is, you define all the points.
Then you define all the lines, then you define your plane, what is the plane. And then you
will say spindle on, feed rate, coolant. Then now, what you say is move from P0, GOTO L1
to plane 1 on L8. GOTO P0-P1; so it says GOTO L1 which is a line, to plane 1 on L8. So,
you have to; this is meeting L8. So, you have to go to this point. From L8, there is a point
coming, L1 there is a point coming and then we say GOTO point number P1.
Then you go left of L1 past L2; GOTO L1 past; so you are crossing L1. GOTO L1; go left of
L1 and then you say past L2, up to L2. So, L2 you have to cross so that you go to this
point, L2 this is what is L2. And then, you GOTO right of L2 to L3. Then go left of L3
past L4. Go right of L4 past L5. Go right of L5 to L6. Go left of L6 past L7. Go right
L7 past L8. Go right of L8 past L1. So, all these things will now, if you see
closely watching, it will talk about how will the tool move to get to the profile. It will
go left, go right L1, L2. You have defined all these M1. So here, you do not use any
G-codes, M-codes, nothing. So, you try to use this English language and then you get.
Then go rapid, it going out. Then go to point 0, coolant is off, end of program and then
finish. So, this is just written in English.
This is what we said here. So, here prime disadvantage of APT is that it uses English
like command. So here, this also you should see. I told you. So, an APT post processor
program is used to read these statements, interpret the meaning, and perform all the
necessary calculations to generate a series of cutter location points. So, that is what
is CL data file, which will be generated. So, this is the APT source code which is generated.
This will be compiled and you can use it.
So, the next approach is going to be CAD/CAM approach. So, there will be a demonstration
which will be done by Dr. Amandeep Singh, on this topic. But let us quickly go through
what is covered here. The CAD/CAM approach is the most popular and advanced approach
in generating CNC codes. So here, manually we do not do it. We will
read the drawing; the system itself will read the drawing. From the read drawing, it will
try to understand. It will try to give you the G codes and M codes. The process starts
with creating a reference model and work piece and then assembling them in an assembly mode.
After the solid models are assembled, user defines the manufacturing setup, including
choosing a work cell and the coordinate system. Then user creates some machining sequence
depending upon the profile. And in the meantime, user chooses a cutter
and specify machining parameters. Then at this point, a machine sequence is completely
defined. CAD/CAM will generator a tool path, and the tool path was created using Pro-e
which is a commercially available software for this example.
To summarize, what all we saw in this lecture is, how the programming works in NC machine?
What are all the various axial motions? What are the different types of part programming?
Then various preparatory and G codes. How to use manual and part programming? What is
computer assisted programming? How do part programming uses APT which is English based
code, and CAD/CAM programming? Where we will see a simulation. Thank you.
