| Issue 88 |
Fall 2011 |
Copyright 2011, CNC Concepts, Inc. |
|
|
|
October 10, 2011
Dear Subscribers,
Welcome to Issue 88!
We’re just recovering from our flurry of fall
school orders. It was especially busy this year (which is why
this issue is a bit late). More and more schools are using our
curriculums to help them teach CNC classes. And our Setup and
Operation curriculums – those aimed at entry level shop people –
are growing in popularity.
This issue contains information on a variety
of topics – we’re back to our normal format in this issue. I
hope you enjoy it.
Mike Lynch
|
|
|
|
Product Corner:
Custom macro B and NCPlot
We’ve been marketing this great software program since
March of 2007. One of the things that initially
attracted me to NCPlot was its ability to handle custom
macro B commands. NCPlot can show tool motions for
almost all functions of custom macro B. About the only
exception is certain system variables, like those
related to machine position, that contain values related
to the current state of the machine tool.
It frustrates me to some extent that eyebrows are often
raised when I tell people that NCPlot can plot custom
macro B programs. It seems we’re not doing a very good
job of marketing since so many people don’t know that
NCPlot can help verify custom macros. So this short
blurb is intended to help get the word out.
Not only can NCPlot show tool path generated by custom
macro B programs, it has some program verification tools
that are especially helpful when verifying custom
macros. Expression Calculator, for example, allows a
user to get the result of an expression written in
custom macro B format. This helps confirm that the
expression is correct. And the Show Variables function
lets you see the current values of all variables as
programs are being executed. They even allow you to see
the values of local variables for the various nesting
levels when one custom macro calls another – a feature
that even most Fanuc controls cannot do.
If you haven’t already, check out NCPlot – especially if
you need to write custom macro B programs from time to
time. You can download a fully-functional fifteen-day
trial version here:

Top of page
|
|
Instructor Note:
Axis polarity can be tough to explain because...
In almost every CNC class I teach, at
least one student struggle with the polarity of each
machining center axis. The reason for this has to do
with the fact that – with some axes – the cutting tool
does not move along with the axis. With C-frame style
vertical machining centers, for example, it is the table
that moves to form the X and Y axes. With the Z axis, at
least, the cutting tool does usually move along with the
axis – either a quill motion or headstock motion. This
makes it easier to understand polarity for the Z axis.
While not always entirely successful,
it helps (especially when teaching programming) to ask
students to visual the polarity of each axis as if the
cutting tool is moving along with each axis. This
relates nicely to how a programmer will view a drawing.
It forces students to view polarity as the machine does
– from the perspective of the spindle nose.
When looking at the machine correctly – from the front
(Y minus side) of a vertical machining center – tool
motion to the right is X+. Tool motion away is Y+. And
tool motion up is Z+. For Z, it is simple since the tool
does move along with the Z axis.
After presenting this, I ask students
which way the table must move in X for a plus direction
motion. Unfortunately, I often hear a response of
“negative” – or “minus”. I explain that the choices for
an answer are to the left or to the right. Then they
usually get it, responding with “to the left”. So I
reiterate that in order for the tool to have a motion to
the right, and since the tool does not actually move in
the X axis, the table must move to the left.
I repeat the process for the Y axis.
I ask which direction the table must move in order for
the tool to move in the plus Y direction – for a
vertical machining center – the direction away from you
if you’re standing in front of the machine. And of
course, the correct response is “toward you”.
The situation is made more
complicated when students must work with different kinds
of machines. With a gantry style vertical machining
center, the cutting tool does move along with all axes.
With a horizontal machining center, you must imagine
that you’re standing on the headstock side (again,
looking from the perspective of the spindle nose and
cutting tool) in order to correctly interpret polarity.
For a sliding headstock turning center, cutting tools
remain stationary in the Z axis – the workpiece (bar)
moves to form the Z axis. And Z minus bar movement
forward – coming out of the collet.

Top of page
|
|
Manager's Insight:
Changing methods to accommodate new features
This field of computer numerical
control is constantly evolving. New features and
functions are coming along on a regular basis. Though
most new features and functions will in some way enhance
the way a CNC machine is utilized, there can be some
down-sides related to implementing them – especially if
your company owns (older) machines that do not have the
functions.
I was recently in a company that has used CNC machines
for many years. Indeed, they used this kind of equipment
even before computers were an integral component in the
control – when these machines were called NC machines.
Control manufacturers have long made
they’re controls backward compatible, meaning new
controls can accept programs written for controls that
they have made in the past. But this is a one-way street
– programs written for new machines that take advantage
of new features – cannot be run in older machines. This
provides a degree of compatibility among machines.
For this reason, the company I visited elected to ignore
many helpful features that make CNC machines easier to
utilize. Decimal point programming, arc size for
circular motion with an R word, and even tool length
compensation with G43 are among the features they
elected not to use in order to maintain compatibility
among older and newer machines. What makes the situation
even worse – from a machine utilization standpoint – is
that, over time, many of the older machines have been
replaced. The very reason why many new features were not
used does not even exist any more.
Admittedly, compatibility among
machines is a very important factor in any CNC
environment. But as a manager, you must ensure that it
is not taken to extremes. As new features become
available, you must weigh the benefits of maintaining
compatibility against the possibility that the machine
could be better utilized if newer features are used. At
some point – like when old machines are replaced – you
must have your people bite-the-bullet and start taking
advantage of newer features.

Top of page
|
|
G Code Primer:
Some G codes that have run their course
There are several G codes that are
rarely used. Some are options, meaning you’ll have to
pay extra to have a machine equipped with them. Others
simply don’t apply to your application. And yet others
are Fanuc’s “first attempt” at handling a problem or
function. Other methods or G codes have been
subsequently added that replace them. G codes in this
third category will be the topic of this article.
Fanuc controls are – for the most part – backward
compatible. This means that program written for older
machines can be run in newer machines without
modification. While it is unlikely that you’ll have any
need for them, it may be helpful to understand why they
were created and why they’ve been replaced. We’ll go
through them in numerical order.
G22 and G23 –
Interference zone check (G22 instates and G23 cancels).
These G codes allow the programmer to set up a zone into
which a cutting tool cannot move. While they are still
active, over the years I haven’t seen very many CNC
users that actually use them. It is quite cumbersome to
determine the values that set up the interference zone
(specified within the G22 command) – and this zone must
be determined for every program that is to be protected.
For turning centers, this problem is further compounded
by the fact that each tool requires its own G22
instating command. While these G codes have not been
replaced by anything better, again, they are seldom
helpful.
G27 – reference
(zero return) position return check. This is a testing
command to ensure that the machine is at the zero return
position at the end of a motion. If G27 is included in a
motion command that sends the machine to the zero return
position, the machine will perform at test. If the axes
included in the motion command including the G27 are at
the zero return position, the related axis origin lights
will come on and the machine will continue. If an axis
is not at the zero return position, the machine will
stop and go into alarm state. G27 was helpful on turning
centers prior to when geometry offsets became popular
for assigning program zero (over twenty years ago) –
when G50 was used to assign program zero. G27 could help
a programmer determine that the machine was where it was
supposed to be and that wear offsets were appropriately
canceled before the next tool’s G50 command was given.
G29 – return from
reference (zero return position). G29 will cause a
motion that moves through the intermediate position
specified in the most recently executed zero return (G28
command). This can actually be dangerous, especially
when cutting tools are not run in the same sequence in
which the program is written – like when a cutting tool
is re-run by itself after the program completed a cycle.
Nothing has been developed to replace G29. In my
opinion, it was never a very helpful G code.
G44 – tool length
compensation minus. G43 has become the universal G code
(among Fanuc controls) for tool length compensation. G44
works just like G43, except the polarity for the value
specified in the tool length compensation offset
register must be reversed. If, for instance, you use
tool length compensation as I recommend (tool length is
the offset value), you know that with G43, the offset
value must be positive. If for some reason you wish to
enter the offset value (again, the tool’s length) as a
negative value, G44 would correctly instate tool length
compensation.
G45 – G48
offset
expansion and reduction. They are named as follows:
G45 was used for tool length
compensation prior to G43 (about thirty years ago). The
four of them were used together in Fanuc’s first attempt
at cutter radius compensation – again, before G41 and
G42. While there may be some times when you wish an axis
motion to expand or contract by the amount of an offset
(which G45 can accomplish), most CNC users have no need
for these G codes.
G50/G92 – coordinate system setting. G50 is for turning
centers – G92 is for machining centers. These G codes
were required prior to geometry offsets on turning
centers and fixture offsets on machining centers. They
were quite cumbersome to use, requiring the machine to
be in a specific position before a program could be run.
If it was not, the most likely result would be a crash.
Note that G50 is still used on turning centers to set a
maximum spindle speed.

Top of page
|
|
Macro Maven:
Using offset information to make programs more
intelligent
Custom macro B provides the ability
to read and write offset data from and to a CNC program
– and this has been the topic of many past articles in
this newsletter. We’ve shown many applications for
reading and writing offset data – most have been related
to facilitating the way that setups are made or
confirming that offset data is correct.
I was recently in a company that had
a rather unique problem, one that could be solved by
utilizing this ability to read offset data. It involved
cutter radius compensation. As you know, cutter radius
compensation lets you use a range of cutter sizes – and
the operator simply enters the radius of the cutter
currently being used into the cutter radius compensation
offset. The machine, of course, uses this data to keep
the tool the appropriate distance away from the
programmed surface.
With most applications that use
cutter radius compensation, the range of cutter sizes is
relatively small. If the programmer intends to use a 1.0
inch diameter end mill, for instance, the setup person
will use a cutter that is close to – likely slightly
smaller than –1.0 in diameter (smaller would be for a
sharpened cutter). The small deviation in cutter size
(from the planned cutter size to the actual cutter size)
isn’t usually enough to warrant a recalculation of
cutting conditions – that is – spindle speed and
feedrate.
The company I recently visited has a
special problem in this regard. They use slotting
cutters that range in diameter (even for a given job)
from 3.0 to 4.5 inches. With this large range in cutter
sizes, a change in speed and feed are important when
going from a small cutter diameter to a large cutter
diameter – and vise-versa. So the setup person and
operator were actually recalculating cutting conditions
and editing the program whenever a slotting cutter was
replaced.
As you have probably determined by
now, having access to offset data provides the ability
to eliminate the need to recalculate speed & feed and
edit programs. We simply changed the program to perform
the speed and feed calculation based upon the value that
is in the cutter radius compensation offset register.
Here’s how. Say the cutter’s radius is placed into
offset number 31. For many Fanuc controls, the system
variables that provide access to offsets range in the
2000 series. #2001 gives access to offset one, #2002
gives access to offset two, and so on. So system
variable #2031 gives us access to offset number
thirty-one. (You must confirm system variable numbers
for offset access based upon your control model in the
custom macro section of the programming manual.)
So we replaced the S word and F word
with these:
Since #2031 contains the cutters
radius, we must – of course – double this value to come
up with the cutter’s diameter for use within the
calculations.
Note that larger cutters tend to have more teeth,
meaning the inches-per-minute feedrate may also change
based upon the cutter size. Though this criteria is not
included in our example, it could be if you know the
number of teeth for the different cutters that can be
used. It would be relatively easy to determine which
cutter is being used – along with its number of teeth –
with a series of IF statements that test the value of
#2031.
Other times when accessing offset
data can make programs more intelligent
Eliminating cutter radius (or tool
nose radius) compensation – Use the value in the radius
compensation offset register during motion commands.
This will eliminate the need for G41 and G42 – and the
potential for cutter comp. alarms.
Use the T register on turning centers for more than tool
nose radius compensation. By knowing the type of tool
being used (turning tool, boring bar, etc.), you may be
able to move to a more efficient safe index position for
turret indexing.

Top of page
|
|
Parameter
Preference: Initialized G codes
Many modal G codes are automatically
set to a default setting during the machine’s power up.
Indeed, this is the definition of an initialized G code.
It can often be helpful to know that parameters control
the initialized state of many G-code-controlled
functions. While machine tool builders do a pretty good
job of setting defaults for G codes, they aren’t
perfect. It is possible that you won’t agree with their
initial settings.
For example, one
machining-center-using company I know of uses a right
angle head for almost all jobs they run on a vertical
machining center. This device points the cutting tool in
Y minus direction (instead of Z minus), so almost all
machining is done in the YZ plane instead of the XY
plane.
Though this is the case, the company found that
the initialized state of plane selection was G17 (XY
plane). With a little digging, they found the parameter
that controls this function and change it so that the XZ
plane is initialized. The appropriate plane selection,
of course, is important for circular motion, cutter
radius compensation, canned cycles, and other important
CNC functions.
Whenever you don’t agree with the
choices made by the machine tool builder for initialized
states, it is likely that a parameters will be involved
with changing them. Admittedly, finding the appropriate
parameter with most Fanuc controls can be challenging.
My suggestion is that you begin by looking at the G
code’s section of the Fanuc programming manual. The
parameter related to the initialized state of plane
selection, for example, is mentioned in a note at the
end of the plane selection section of the Fanuc
programming manual.
Top
of page
|
|
Safety First:
Eliminate distractions that cause lapses in attention
Setting up and running CNC machine
tools requires setup people and operators to focus on
the tasks at hand. A high degree of concentration is
often required to keep from making mistakes that can
cause wasted time, damage to machines, and/or injured
people.
Most companies have come up with
rules that attempt to limit such distractions. A few
obvious examples include rules that limit the use of
cell phones, music playing systems, and any other
activities (like eating and drinking) that impede
concentration, coordination, hearing, or vision. While
distractions caused by many activities and devices are
pretty obvious, others are not.
Consider, for example, certain work
related distractions. Just about any time a person must
break out of their train of though to do anything opens
the door to forgetting where they left off when it comes
time to continue. Think about times when operators and
(especially) setup people must stop what they are doing
to answer questions, take a phone call, or go and get a
needed component. Though the distraction may be related
to company business, it is still a distraction – and can
cause the same problems as distractions that are not
related to work.
I remember one company in which I was
accompanying the lead setup person during a walk from a
machine he was setting up to the tool crib – a walk of
about 100 feet. During this walk, he was stopped five
times. Another setup person needed advice. Two operators
had questions about their machines. An inspector needed
to tell him about a job that was having problems. And,
almost comically, the shop manager wanted to know when
his machine would be in production. A walk that should
have taken about a minute took almost a half hour. The
fact that he remembered what it was he was going to the
tool crib for in the first place was admirable.
My suggestion in this regard is to
set up a working environment that minimizes the
potential for interruptions – especially when the task
being accomplished is especially critical – like a hot
job – or in any way dangerous. Don’t let people be
interrupted until the completion of the task.

Top of page
|
|
|
|
|
|
The Optional Stop newsletter
is published quarterly by CNC Concepts, Inc. and is distributed
free of charge to people subscribing to our (email) distribution
list and to those downloading it from our website (www.cncci.com).
Information is aimed at CNC users and instructors teaching live
CNC classes. All techniques given in this newsletter are
intended to help CNC people. However, CNC Concepts, Inc. can
accept no responsibility for the use or misuse of the techniques
given.
To subscribe:
Simply email us (newsletter@cncci.com) and let us know
you'd like to be added to our distribution list.
To
unsubscribe: Respond to this email, typing REMOVE in
the subject. Please accept our apologies if we have
disturbed you.
|
|
|
|