noc18-me69 Lecture 28

IIT Kanpur July 201
20 followers
Dec 3, 2023
This lecture modules covers the following topics: word sequential format, G codes, axis motion commands, etc.
[Music]
hello and welcome to this design
practice to module 28 I'll be talking
today about the next in the sequence
format which is very useful and it's
mostly it is one of the CNC programming
aspects which is about the word
sequential format as the name means or
you know shows up in the format in
exhibit 6.3 there are certain words
which are used now so that there is no
indexing as such or a column header
which would be needed to study the
column the word itself gets to be a part
of the code for example n indicates the
line number G indicates the proprietary
code X why's that indicate their access
positions under word F indicates feed so
on so forth so so many words have been
now put in instead of just numerals and
the advantage that such a representation
has is that every time we do not refer
as a programmer to the column header or
you know particularly for long programs
this is a big issue that the column
headers have to be referred again and
again and it may not be on the same page
okay so this format changes the overall
level of the inconvenience of usage
related to the CNC programming so this
is a format that is virtually used by
all modern controllers each type of word
is assigned as address it is identified
by a letter code within this program and
the letter code specifies the type of
word that follows and then it is
associated with the numeric data which
is again based on the controller
capability for example the the code P
here is not mentioned in this particular
exhibit but there is a
called T which would represent what is
the tool number so typically the words
are being chosen in a manner so that it
can index very well the purpose that is
associated with a set of numerals where
this is a part of so a word in the form
T 0 1 for example would represent tool
number 1 okay
so automatically it brings home the
capability that 100 tools can be
accumulated with the controller capacity
which can start from T 0 1 to P 99 it
automatically means that but the fact
that e as a subscript is there in that
particular column doesn't leads to a
situation where the kilometers are
avoided and you can have data often for
anybody else to enter ok easy B so
theoretically with this approach the
words given in a block can be entered in
any sequence ok now because there are
you know certain chains which are pulled
up in the algorithm that is developed
underneath the controller programming
that is developed underneath where
whatever be the particular number is
really based on the word and so the word
is a chain to a section which would lead
to eventually the implementation of
controller commands to the machinery and
so the controller should be able to
interpret them correctly and sequence
may vary accordingly
so these are some of the commonly used
words in such word address formats you
have F for feed rate command G's
preparatory function there are a set of
G codes which exist which take care of a
lot of preparatory steps associated to
the machine motion axis there is again
circular interpolation command along the
x y&z direction is ijk the miscellaneous
commands there are sequence numbers you
can define in arc radius you could also
fix the spindle speed also try to do
tool selection
and access data along X Y z axes so on
so forth so with this word address
format only the need for words for a
given operation has been the additional
included part of what used to happen
earlier
so obviously the command to which the
particular numeric data apply is
identified by the proceeding address
score in terms of the word so it brings
a sequence chain you know which would
relate irrespective of wherever the word
is placed in the sequence the particular
part of the program of the subroutine of
the program which would be able to input
the correct data what advantage the what
format has a certain advantage in terms
of having more than one particular
command in one block so obviously you
can use many commands and when we look
at how internationally standardization
has been developed for the word address
format it is typically available at the
American National Standards Institute in
si which is defined this controller
capability code which comes with all
manufacturers with or you know with
machines from a variety of different
manufacturers to the user so the code
mentions about the capability of a
controller in terms of numbers it can
handle n for typically looks at
principle line identification number
varying between zero zero zero zero to
nine nine nine nine that's about ten
thousand different numbers again jeetu
again indicates 100 different numbers
varying between G 0 0 G 99 x y&z are
having a controller capability of zero
zero zero zero point zero zero zero I
think I'd mentioned this why this four
and three are important three places to
the right of the decimal four places to
the left of the decimal two all the way
nine nine nine nine point nine nine nine
that's how much how different you know X
graduations can be involved
similarly the same goes true for y&z and
even our radius so you have capability
of the controller to handle numbers up
to this extent it's about ten thousand
different numbers actually much more
than ten thousand so ten to the power of
eight actually numbers that it was ten
it was seven numbers I'm sorry when we
talk about the controller range you also
have options for feed which is between
zero zero zero zero all the way to nine
nine nine nine so ten thousand feed
numbers you have the option of so this
is a certain controller that they are
defining capability wise option of speed
again tool option which can define about
hundred tools again the controller way
of understanding miscellaneous options
from standpoint of 100 different
miscellaneous operations M 0 0 to m 99
and then these individual circular
interpolation parameters which will
again linked up in a similar manner so
this one line of standard defines how
controllers typically are defined within
the international market and within
these specifications which are mentioned
you know a letter identifies a specific
type of word a plus minus symbol after
the letter indicates that sign is
significant for the Associated numeric
data a positive sign is assumed if
numeric data have no sign specified so
these are certain basic norms that needs
to be followed so if one numeral follows
the letter the the data for that word
are of integer form with up to the
number of digits specified by the
numeral I've already shown you the
controller capability if the letter is
followed by two numerals the data for
that word are real numbers the decimal
points are not programmed
it's position is inferred by counting
the number of digits in the actual data
so share it with the word counting from
the right okay so whatever is towards
the right of the number indicates how
much is towards the right of the decimal
and similarly a situation for the left
so the second numeral in the
specification gives the number of digits
to count in the data before the decimal
point and so that's how standard
Institute has developed this
representation of format for every
controller so just relooking at it again
and what can have up to four integer
digits
no Associated signs G word can have a
two integer digits X word can have up to
seven real digits which may be positive
or negative F script again can have up
to four real digits which may be
positive or negative again decimal point
which is not explicitly entered is in
the rightmost position and there can be
up to four digits to the left of the
decimal point the I word can have up to
seven real digits with no associated
signs the decimal point which is not
explicitly entered is assumed to be
three digits from the right there can be
up to four digits to the left of the
decimal point in the matric format I
think I have clearly explained to you
all this in the last slide on the ANSI
format and that's how the word address
format goes so let us now step by step
look at how to write such programs on a
real sense so the first step in writing
of course of a part program is to be
able to determine and organize the data
that will be used within the program for
a certain part generally a fully coded
program would consist of five broad
categories or classes of commands there
would be some preparatory function there
would be some exists motion commands
some feed speed commands identification
commands and miscellaneous commands
these are the the must-haves in the
different blocks to be able to justify
you know the program make a correct
logical sequence so when we look at each
of these types we will need some little
discussion related to the different
types of commands so let us talk about
preparatory commands first so what I
didn't explain earlier and I can
probably take it up now is that there
are two different classes of commands
one called the modal command another
called an on modal command depending on
whether the commands keep existing if
not entered again okay or if not changed
so there is a counter you have fixed
some numbers and the number keeps on
being taken by the code every time up to
an extent you don't change it so these
are models so in time they are
progressing there of course non model
where once it has been executed the the
command would stop and the next step
would typically have to be entered back
let us look at a very basic machining
operation like dwell time so once for
particular step there is a dwell time
inserted you won't definitely wish the
dwell time to continue until changed so
once executor it's automatically set
back to counter zero unless you again
reprogram it in the other case for
example something like a proprietary
command like a rapid positioning once
the rapid positioning aspect is over
until you decide that a different form
of positioning needs to be in place it
should keep continuing so these are
modal commands so most of the propriety
functions are model so they have to be
changed if you want them to have
different effects efforts have been made
to standardize more or less all the NC
commands and these codes are typically
you know which describe the proprietary
function are also very well known as
decodes there are about 97 different G
codes that controllers are used to
handle some of the major ones are
represented in this table 6.2 starting
from G 0 0 which is a point-to-point
positioning at a high rate we also call
it rapid positioning G 0 1 which is a
linear interpolation controlled feed
rate
g02 circular interpolation clockwise or
circular the interpolation
counterclockwise and then ever idea
whether these different codes G 0 4 for
example is a dwell for program duration
17 a select xy-plane 70 was four inches
units 71 is metric units so these are
preparing the axes to start reading the
numeral data numeric data associated
with the part geometry 90 is absolute
dimensions 91 is incremental dimensions
and so on so forth so these are some
commonly used preparatory codes in
almost all the programs now if we look
at the differences there are very subtle
differences between the preparatory
functions for example if we look at the
case of G 0 0 as opposed to 0 1 1 being
the rapid positioning another being the
linear positioning the utility here is
quite different because the rapid
positioning comes into picture when
there is no tool engagement with the
workpiece typically when you are trying
to take something back to the origin or
big taking back the tool to the point of
engagement where machining motion would
start you can rapidly do that because 2
doesn't scratch the particular workpiece
surface but once it is engaged and once
the machining operation starts there has
to be a well-defined feed rate which
would be in accordance with the material
properties tool properties the failure
criteria as you know all these different
issues associated with such tooling so
the rapid positioning is about a path
which is represented here okay very well
by the solid line let's say in certain
instance certain operation you would
like to go from the point a or position
a to the point C so there are two ways
of doing it one is of course a direct
translation from A to C through the
dotted line and another is going from A
to B and then from B to C the question
that is asked normally is that which of
these paths are more in terms of
time and which may be more lesser in
terms of time and so it's really about
utilizing controller capabilities so
when we are talking about this path
definition through two different
coordinates namely the X and the y
coordinate what we mean is that there
are two different spindles one in the X
direction which has a motor which will
rotate and execute different values of X
and another in the Y direction which
will execute different values of Y so
supposing the motors were to operate at
full speed then obviously the X will
always be equal to Y in that situation
however the Point C as you can see in
this figure may not satisfy that
criteria where X is equal to Y because C
is slightly more towards the right on
the X then on Y if they were to move
equally with respect to each other and
so therefore a best idea for minimum
time arrival of a tool which were at
point A to point C is to operate to an
extent possible where X could be equal
to Y okay where the maximum speed or the
full speed of both the motors could be
any shear it and then once it reaches
that point namely B where the angle here
is about 45 degrees corresponding to X
equal to Y line then you can actually
switch off one motor and let only the
excess motion be covered in the
x-direction again at full speed so
timewise in a MC XY table it makes
perfect sense if I say that the path ABC
is more quickly traversed in comparison
to AC you can see the limitation in AC
is that one of the motors will
definitely particularly in the
x-direction has to be slower so that it
reaches between a and C so the question
again comes into which n is a better
motion and so one from ABC is considered
to be rapid positioning g00 and the one
which is actually along the dotted line
here either a certain fixed rate we can
call this to be linear positioning G 0 1
so these are inserted there the sudden
subtle differences between the different
G codes which are often on being
visited by a programmer okay so
typically the rapid positioning is also
known as point-to-point motion or
point-to-point positioning and the
linear positioning is a rate driven feed
rate driven positioning system let us
look at some other aspects which is
about the circular interpolation G 0 2 &
0 3 so as we all understand G 0 2 and G
0 3 corresponds to whether or the arc of
a circle is described in the clockwise
sense or the counterclockwise sense it's
a proprietary function to specify that
the tool should be moved to a specified
location it differs definitely from G 0
0 and 0 1 functions in that in this case
the path followed by the tool is moving
from target point to the target point in
a circular manner so there is a circular
arc which is being described in order to
reach the target okay starting from the
current tool position and you know you
can move in the clockwise direction if
you have G 0 2 if it is G 0 3 it can be
the anti-clockwise direction and so you
should have an ending target position as
well provided an early position where
earlier on a position earlier on where
it started to execute the arc so within
the block in which G 0 2 is programmed
for example this right here shows a
block n 15 where this G 0 2 comes up as
a preparatory command the center of the
arc is given by specifying its location
relative to the start of the arc to an
appropriate combination of words I J and
K in this case for example it has a
certain X&Y position which shows where
it starts from so these are the starting
positions namely X 20 and so we have the
end positions here at X
20 y 10 corresponding to the point be up
to which the ark has to be described and
we would like to definitely find out the
start position from the last step in the
programming of the code where the two
laws which is the position a in order to
describe this Ark we need to define the
center about which it has been described
and for which you have these I and J
commands which correspond to I 5,000 and
J 15,000 and of course a feed rate which
is about 2500 millimeters per minute in
this particular case so essentially what
is happening is that you are taking this
input position where the tool is
starting from from the last command line
or the last block and you define what is
the end position and you also define
what is the center along which a motion
has to execute the very nature of g02
makes the interpolation go in a
clockwise direction so obviously from a
the tool would start moving towards B
and not revert back and so that's how
you define g0 to or subsequently g0
three circular interpolation so there
are also axis motion commands which are
used to specify axes that are required
to move during the execution of a given
command they are made up of letters
signifying an axis such as small X for
example followed by dimensional
information associated with the motion
of the axis in question the x y&z
commands respectively specify the motion
of the Cartesian coordinates ijk specify
the offsets relative to the XY and z
axis some controllers support the use of
polar coordinates also in which case
there would be the additional definition
of radius R and axes are used to specify
the radial and angular direct
also prospectively so if you want to
reset the axis of motion in terms of the
dimensional data that you input so you
can actually specify whether you want to
read data on absolute basis or if you
would like to read them on an
incremental basis you could also have
some codes namely g70 associated with
whether the dimensions that need to be
followed of the dimensional system that
needs to follow is inches or 471 it is
metric units so these are some basic
preparatory functions needed for setting
up or setting stage stage for the
machining to happen an important point
to remember is that the axis commands
guide the motion of the point defining
the tool position for some operations
such as profile milling the periphery of
the cutter moves along the surface to be
machined rather than the tool point the
center of the cutter so one has to be
careful of the cutter compensation and
other aspects when you program such
particular motions so obviously because
of the radius of a circular tool the
actual motion of the tool has to be
along a different parallel path from the
geometry of the machine surface this is
typically known as the tool offset
because you are assuming that you are
sitting as a programmer at the center of
such a circular disc which has edges
which are starting to engage with
workpiece and perform cutting action etc
so most of the modern controllers though
do have a compensation factor which you
can put in so that you can still assume
you yourself to be in contact with the
workpiece profile and the compensation
factor automatically would generate a
parallel path but such compensations are
sometimes programmed with g41 & g42
codes and you can cancel such companies
using jihadi codes so but then one has
to understand the basic a sense when you
use such codes whether you are in a
parallel path or whether you are at the
point of engagement of the tool to the
the workpiece rest of the things the
controller's adjust internally for
difference in the actual path followed
by the tool point accordingly once the G
command G 41 and 42 are applied so I
would like to now finish this particular
module maybe in the next module we'll do
some real programming for a certain part
with all these knowledge base that we
have developed so that you can become
trained in carrying out such small
programs so once we do that then we will
start various aspects of rapid tooling
and prototyping which is actually very
important from a standpoint of 3d shape
visualization or creation thank you very
much for being with me
[Music]
[Music]
