Banner

Issue 69
Fall 2006
Copyright 2006

In this issue:
  1. On-line courses update: Which course do I take first?
  2. Product corner: Another basic machining practice eBook - Shop math for CNC
  3. Instructor note: Teaching CNC with the key concepts approach - part eleven
  4. Macro maven: Getting cutting conditions into your part family custom macros
  5. G-code primer: Using G53 on machining centers
  6. Parameter preference: Loading multiple programs from one file

The Optional Stop 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.

Quick links to our website:

Of special interest on our website:
ME Consultant Pro
{short description of image}
Ad for machine shop calculator
{short description of image}
eBooks ad Click to get more information about this ebook Click to get more information about this ebook
Ad for CNC manuals Link to CNC turing center programming and operation manual Link to CNC machining center programming and operation manual
Machining center programming and operation CD-rom course

On-Line Courses Update: Which course do I take first?

We offer six online CNC classes:

  • Machining center programming
  • Machining center setup and operation
  • Turning center programming
  • Turning center setup and operation
  • Advanced techniques with basis CNC features
  • Parametric programming for CNC machining and turning centers

The most common question we receive from potential students is "Which class should I take first?" The order by which you take our online CNC classes depends upon your current experiences in manufacturing. If you're interested in our online classes, here is a set of scenarios that should help you decide how to proceed.

I have no previous machine shop experience and I'm not currently working for a CNC-using company

Note that even our basic CNC courses assume you have some machine shop experience. Frankly speaking, you should seek out a technical school in your area to gain the prerequisites you need to begin working with CNC machine tools. If you are simply interested in determining whether you'd enjoy working with CNC - or if you're just wanting to gain a general understanding of what CNC is all about, we'd recommend taking one of the basic programming courses: Machining Center Programming or Turning Center Programming.

I have very little (or no) previous machine shop experience, but I've been hired by a CNC-using company to run CNC machines

It's amazing how many companies will hire inexperienced people to run CNC machine tools. With little or no training, these companies expect their new people to run their CNCs. If you find yourself in this position, we recommend that you begin by taking the Machining Center Setup And Operation or Turning Center Setup And Operation class - whichever class matches the machine type you're currently running. Once you're comfortable with the material in the setup and operation class, we recommend taking the Machining Center Programming or Turning Center Programming class (again, the one that matches the machine type you are running). You should also seek out a technical school in your area to gain an understanding of basic machining practice principles.

I am a manual machinist but have not worked with CNC machine tools

In this case, we recommend starting with the Machining Center Programming or Turning Center Programming class, whichever you are more interested in. These classes present many of the features and concepts related to CNC - and since you have previous shop experience, you'll easily understand all of the presentations in these classes. When you're finished, we recommend taking the Machining Center Setup And Operation or Turning Center Setup And Operation class (again, for whichever machine you're interested in).

I have operated CNC machines but never setup or programmed them

In this case, we recommend starting with the Machining Center Setup And Operation or Turning Center Setup And Operation class class, whichever applies to the kind of machine you're working with. This will help you understand the tasks related to setup. Next, take the Machining Center Programming or Turning Center Programming class for the kind of machine you're working with.

I have setup and operated CNC machines but never programmed them

In this case, we recommend starting with the Machining Center Programming or Turning Center Programming class, whichever you are more interested in. These classes present many of the features and concepts related to CNC - and since you have previous shop experience, you'll easily understand all of the presentations in these classes.

I have worked with one type of CNC machine but not the other

Maybe you've worked with CNC machining centers but never with CNC turning centers - or vise-versa. In this case, we'd recommend beginning with the Machining Center Programming or Turning Center Programming class - the one related to the machine type you are not familiar with. Next, take the Machining Center Setup And Operation or Turning Center Setup And Operation class (again, for whichever machine you haven't worked with). This, of course, also applies to having completed the classes we offer for one machine type. You'll likely be interested in learning about the other.

I work in manufacturing but I don't work with CNC

Lots of manufacturing people should have a working knowledge of CNC. These people include manufacturing engineers, process engineers, quality control people, and production control people. Truly, just about everyone in manufacturing should have an understanding of CNC. If you're in this position, we recommend taking the Machining Center Programming or Turning Center Programming class (or both), depending upon what kinds of CNC machine tools your company owns. This will provide you with a good understanding of CNC - and give you an appreciation for what CNC people must do. You'll also be able to communicate more intelligently with the people in the CNC environment.

I've mastered the basics, but I want to know more

If you are currently programming CNC machines (and possibly setting up and operating them), you're ready for our more advanced courses. We'd recommend starting with Advanced CNC Techniques With Basic Features. This class provides many techniques not commonly shown in basic courses (including ours).

I've mastered the basics and I want to know more about parametric programming

Our Parametric Programming class will expose you to the applications for parametric programming and will show how to use it.

End of article (M01)

Top of page

Product corner: Another basic machining practice eBook now available: Shop math for CNC

We're now introducing the third in our series of basic machining practice eBooks (the first two are Machining Operations Performed On Machining Centers and Machining Operations Performed On Turning Centers). This newest eBook, entitled Shop Math For CNC, covers another important topic-of-interest to aspiring CNC people.

This eBook is application-based, meaning we stress the CNC-related applications for the math functions shown. Indeed, you'll learn as much about the CNC-related applications as about the math involved. For example, when discussing the basic arithmetic operators (add, subtract, multiply, and divide), we stress the use of these functions as they are used for interpreting tolerances and making offset adjustments on CNC machines.

Like our other affordable eBooks, the price for Shop Math For CNC is $29.00 - and once your order is processed, you can download it to save shipping charges and get quick delivery.

The previous link brings you to our CNC books page. Scroll down the page to Basic machining practice eBooks to find Shop Math For CNC.

End of article (M01)

Top of page

Instructor note: Teaching CNC with the Key Concepts approach - part eleven

Part eleven - Key concept number Ten: You must know how to safely verify programs

Here are some links that allow you to review other parts of this article:

  • Part one: Introduction to the key concepts approach
  • Part two: Key concept number one - know your machine
  • Part three: Key concept number two - preparation for programming
  • Part four: Key concept number three - Understanding the motion types
  • Part five: Key concept number four - You must understand the compensation types
  • Part Six: Key concept number five - You must provide structure to your programs
  • Part Seven: Key concept number Six - Special programming features
  • Part Eight: Key concept number Seven - Know your machine from an operator's viewpoint
  • Part Nine: Key concept number Eight - You must understand the three modes of operation
  • Part Ten: Key concept number Nine - You must understand the key operation procedures

This is the last part of Teaching CNC with the Key Concepts Approach. Along with other information we provide on our website, we hope you've found this material to be helpful.

The final Key Concept draws together much of what has been presented in this class. Students must know how to verify new programs as well as programs that have been run before. They must also, of course, be able to machine acceptable workpieces.

Though companies vary in this regard, we’re assuming that it is quite important to make the first workpiece being machined a good one. They must, of course, be able to find and correct mistakes as they are found. And mistakes can be related to the program or to the setup that has been made. This means they must be able to recognize the cause of problems being encountered – and again – this requires a good understanding of what has been presented so far.

To this end, provide a series of procedures for verifying CNC programs (dry run, air cutting normal run, and cautiously running the first workpiece). These procedures are not overly specific – and are somewhat complex. And again, they require students to understand many of the points you’ve made so far.

Don't have them try to memorize each procedure - it doesn't work. Students quickly become confused and frustrated. Admittedly, there are some procedures that are so often used that students will soon have them memorized. But don't assume they can remember how to perform even the simplest procedures for very long. So prepare a written set of procedures for:

  • Single block dry run
  • Free flowing dry run
  • Actually running the first workpiece (using trial machining for critical tools)
  • Rerunning tools

Though you have introduced - and probably discussed in detail - the topic of trial machining, you might want to review it here. Point out that they must go through the program tool by tool and:

  • Ensure that Optional Stop is turned on (so the machine will stop at the end of each tool)
  • Consider what the tool will be doing
  • If it will be machining a tight tolerance, they must:
    • Adjust the tool's offset in such a way that excess material will be left on the surfaced machined by the tool
    • Let the tool cut under the influence of the trial machining offset
    • Measure what the tool has done and re-adjust the offset accordingly
    • Rerun the tool

Be sure students understand the importance of going through the program step by step. If they use this method, the first workpiece they machine will be a good one.

I give an example of not following this recommendation: Say there are two tools in a turning center program - a rough turning tool and a finish turning tool. The rough turning tool machines the workpiece 0.01 undersize. But since the setup person is not closely monitoring the operation and allowing the whole program to run, the undersize condition will not be noticed. The finish turning tool comes in an misses the workpiece all together. When the cycle ends, the workpiece will be 0.01 undersize. I'll ask students at this point "What do you think the setup person will do?" Of course, they'll increase the offset for the finishing tool and proceed to scrap their second workpiece.

Point out that offset setting can be very difficult after the fact. When a completed and scrap workpiece is in hand, it can be very difficult to determine which offset/s must be changed in order to make the next workpiece a good one. Did the facing tool take off too much stock or did the cutoff tool machine the part too short? Did a boring bar go too deep or did the facing tool not machine enough stock?

You can see more specific recommendations for this topic in our Lesson Plans manuals. We won't duplicate the suggestions here. Here are two links to the Lesson Plans Manuals.

Here are two links that bring you to our CNC curriculum page and our CNC educators page. Use these two links to learn more about how you can use our key concepts approach in your own classes.

End of article (M01)

Top of page

Macro maven: Getting cutting conditions into your part family custom macros

If you've ever written a part family custom macro, you know that - just like any other CNC program - the part family custom macro must have cutting conditions. These cutting conditions can include (among others) speeds, feeds, depths-of-cut, and finishing stock.

Even if your part family is being machined from a very predictable material, it can still be cumbersome to include hard-and-fixed values in your custom macro for cutting conditions. If the material isn't very predictable, it is likely that you'll need many (if not all) of the cutting conditions to be specified as variables. And if parts in your family can be made from different materials, dealing with cutting conditions can become a nightmare.

In this article, we present a method of handling cutting conditions for custom macro part families in a relatively easy manner. One command in your part family will setup all cutting conditions - and in this command you'll modify the value of any cutting condition/s that must be changed for a given part in the family.

Let's first consider a simple example. Say you are developing a turning center part family custom macro and that all you're concerned about is dealing with several different materials. The cutting conditions, of course will be different for each material. Consider these two programs:

  • O2001 (Cutting conditions for mild steel)
  • #110=500.0 (Speed in SFM for rough face & turn)
  • #111=0.012 (Feed in IPR for rough face & turn)
  • #112=0.125 (Depth of cut for rough face & turn)
  • #113=80.0 (Speed in SFM for drilling)
  • #114=0.008 (Feed in IPR for drilling)
  • #115=400.0 (Speed in SFM for rough boring)
  • #116=0.008 (Feed in IPR for rough boring)
  • #117=0.080 (Depth of cut for rough boring)
  • #118=500.0 (Speed in SFM for finish boring)
  • #119=0.005 (Feed in IPR for finish boring)
  • #120=600.0 (Speed in SFM for finish turning)
  • #121=0.007 (Feed in IPR for finish turning) #122=400.0 (Speed in SFM for cut off tool)
  • #123=0.005 (Feed in IPR for cut off tool)
  • M99 (end of sub program)
  • O2002 (Cutting conditions for stainless steel)
  • #110=300.0 (Speed in SFM for rough face & turn)
  • #111=0.010 (Feed in IPR for rough face & turn)
  • #112=0.100 (Depth of cut for rough face & turn)
  • #113=60.0 (Speed in SFM for drilling)
  • #114=0.007 (Feed in IPR for drilling)
  • #115=2750.0 (Speed in SFM for rough boring)
  • #116=0.006 (Feed in IPR for rough boring)
  • #117=0.050 (Depth of cut for rough boring)
  • #118=350.0 (Speed in SFM for finish boring)
  • #119=0.004 (Feed in IPR for finish boring)
  • #120=400.0 (Speed in SFM for finish turning)
  • #121=0.005 (Feed in IPR for finish turning)
  • #122=275.0 (Speed in SFM for cut off tool)
  • #123=0.004 (Feed in IPR for cut off tool)
  • M99 (End of sub program)

Notice that program O2001 sets up cutting conditions for mild steel and program O2002 sets up cutting conditions for stainless steel. We're simply storing the value for each cutting condition in a common variable that will be available to the main program (the one that does the machining). We've set up for two materials, but of course you can have as many material macros as you have materials. Consider the beginning to this machining program:

  • O0001 (Custom macro to machine part family)
  • M98 P2001 (Machining mild steel today)
  • T0101
  • G96 S#110 M03 (500 sfm will be selected)
  • G00 X2.2 Z0.005 (Move to facing position)
  • G01 X-0.062 F#111 (0.012 ipr will be used)
  • .
  • .
  • .

In this example, we're simply using the material file as a subprogram and calling it with an M98. All of the common variables (#110 through #123) are being set when the subprogram is executed.

This technique works nicely if the materials being machined are predictable and consistent. And as long as you have no need to modify cutting conditions from day to day, this is the technique we'd recommend.

But if you must be able to modify cutting conditions, you won't want to do so in the material programs. Instead, you'll want a way to do so from within the main (machining) program. Consider this new version of the material custom macro (we're only showing one - but of course you can have as many material programs as you have materials to machine).

  • O2001 (Cutting conditions parametric program)
  • IF[#1 NE #0] GOTO 1 (Test if A is assigned)
  • #1=500.0 (If not set corresponding local variable to default value)
  • N1 IF[#2 NE #0] GOTO 2 (Test if B is assigned)
  • #2=0.012 (If not set corresponding local variable to default value)
  • N2 IF[#3 NE #0] GOTO 3 (Test if C is assigned)
  • #3=0.125 (If not set corresponding local variable to default value)
  • 3 IF[#7 NE #0] GOTO 4 (Test if D is assigned)
  • #7=80.0 (If not set corresponding local variable to default value)
  • N4 IF[#8 NE #0] GOTO 5 (Test if E is assigned)
  • #8=0.008 (If not set corresponding local variable to default value)
  • N5 IF[#9 NE #0] GOTO 6 (Test if F is assigned)
  • #9=400.0 (If not set corresponding local variable to default value)
  • N6 IF[#11 NE #0] GOTO 7 (Test if H is assigned)
  • #11=0.008 (If not set corresponding local variable to default value)
  • N7 IF[#4 NE #0] GOTO 8 (Test if I is assigned)
  • #4=0.080 (If not set corresponding local variable to default value)
  • N8 IF[#5 NE #0] GOTO 9 (Test if J is assigned)
  • #5=500.0 (If not set corresponding local variable to default value)
  • N9 IF[#6 NE #0] GOTO 10 (Test if K is assigned)
  • #6=0.005 (If not set corresponding local variable to default value)
  • N10 IF[#13 NE #0] GOTO 11 (Test if M is assigned)
  • #13=500.0 (If not set corresponding local variable to default value)
  • N11 IF[#17 NE #0] GOTO 12 (Test if Q is assigned)
  • #17=0.007 (If not set corresponding local variable to default value)
  • N12 IF[#18 NE #0] GOTO 13 (Test if R is assigned)
  • #18=400.0 (If not set corresponding local variable to default value)
  • N13 IF[#19 NE #0] GOTO 14 (Test if S is assigned)
  • #19=0.005 (If not set corresponding local variable to default value)
  • N14 #110=#1 (Store value for use in parametric program)
  • #111=#2 (Store value for use in parametric program)
  • #112=#3 (Store value for use in parametric program)
  • #113=#7 (Store value for use in parametric program)
  • #114=#8 (Store value for use in parametric program)
  • #115=#9 (Store value for use in parametric program)
  • #116=#11 (Store value for use in parametric program)
  • #117=#4 (Store value for use in parametric program)
  • #118=#5 (Store value for use in parametric program)
  • #119=#6 (Store value for use in parametric program)
  • #120=#13 (Store value for use in parametric program)
  • #121=#17 (Store value for use in parametric program)
  • #122=#18 (Store value for use in parametric program) #
  • 123=#19 (Store value for use in parametric program) M99 (End of custom macro)

This program is doing much the same thing as the previous programs, but we're adding the ability to modify cutting conditions from the main program. Consider this modified main program:

  • O0001 (Custom macro to machine part family)
  • G65 P2001 A450.0 (Modify speed for rough face and turn)
  • T0101
  • G96 S#110 M03 (500 sfm will be selected)
  • G00 X2.2 Z0.005 (Move to facing position)
  • G01 X-0.062 F#111 (0.012 ipr will be used)
  • .
  • .
  • .

Now we're calling the custom macro with a G65 command. every cutting condition can be modified, but we've just done so for the rough face and turn tool. The letter address A, if it is included in the G65 command, specifies the speed for rough facing and turning. Since we've included it in the G65 command, the value of #110 will be set to our value and not the default value.

End of article (M01)

Top of page

G-code primer: Using G53 - machine coordinate system

You know that G90 specifies the absolute mode. Any coordinates specified after G90 will use the program zero point as the origin for the motion. This is the most common method of specifying coordinates in your program - from program zero.

G91, as you also know, specifies incremental mode. Any coordinates specified after G91 will use the machine's current position as the origin for the motion. This can sometimes be helpful, but most programmers like to program exclusively in the absolute mode.

There are times when neither of these two positioning modes are appropriate. Consider, for example, any time you want to make a motion relative to the machine's zero return (reference) position. Doing so in the absolute mode will require that you know the program zero assignment values (fixture offset values on a mill or geometry offset values on a lathe).

Fanuc has provided the G53 command for this very reason. G53 is a non-modal (one-shot) G code. And you must know that it automatically invokes the rapid mode for any motions made with a G53 (but note that after the G53 command, the machine will revert to its most recent motion mode). Here are some applications for G53.

Another way to do a zero return

You know that G28 is the zero return command. While most programmers do use G28 to make the machine go to its zero return position (possibly because older machines don't have G53, and because the axis origin lights will not come on), G53 can be used for the same purpose. The machining center command:

  • N040 G53 X0 Y0 Z0

will make the machine rapid directly to its zero return position in all three axes.

Note that the coordinates (X0, Y0, and Z0) use the machine's zero return position as the origin. While this may make sense for doing a simple zero return, you must understand that with most machines, the zero return position is placed very close to the plus over travel limit in each axis. This means that most coordinates that are within the machine's range of travel will be negative when they are specified from the machine's coordinate system (with the zero return position as the point of origin).

Using a manual pallet changer

When used with vertical machining centers, manual pallet changers often require that the X and/or Y axes be properly aligned in order for the pallet change to occur. And again, the X and Y coordinates needed for making a pallet change will be very difficult to specify in the absolute mode (and they would change from program to program).

But these positions are consistent in the machine coordinate system. Say, for example, the X axis must be centered for a pallet change to occur. If the X axis is 30.0 inches long, the command

  • G53 X-15.0

will rapid the machine to the pallet change position in its X axis- regardless of the machine's current position in the absolute mode.

End of article (M01)

Top of page

Parameter preference: Loading multiple programs from one file

In most cases, a setup person must load but one program at a time. This program contains all the information necessary to machine the workpiece they are setting up. There are times, however, when more than one program is related to a job. Consider, for example, the programmer that uses several subprograms in conjunction with a main program to minimize the program's overall length and simplify programming.

Most machine tool builders set up their machines so that when an M02, M30, or M99 is detected in a program being loaded, the machine will terminate the program loading process. And again, this is just fine if you are only loading one program. But if you must load several programs, the programs must be divided into separate files and the program loading procedure must be repeated for each program. This can be somewhat tedious.

A parameter controls when the machine will terminate the program loading process - and as stated - most machine tool builders set the parameter to make the machine stop reading at M02, M30, or M99. But you can modify this parameter so that it will continue loading programs until an end of file delimiter character is detected. For Fanuc controls, the end of file delimiter character is a percent sign (%).

As with almost all parameters, the parameter number that controls this function will vary from one control model to another. For a 16 series Fanuc control, it happens to be parameter number 3201, bit number six. If this bit is set to a zero (0) - as most machine tool builders set it - the machine will terminate the program loading process when an M02, M30, or M99 is detected. But if you set this bit to a one (1), the machine will continue loading programs until it detects the end of file delimiter character (%).

This allows you to store all the programs (main and sub) associated with a job in one file. The format must look like this:

  • %
  • O0001 (Main program)
  • .
  • .
  • .
  • M30
  • O1001 (Subprogram one)
  • .
  • .
  • .
  • M99
  • O1002 (Subprogram two)
  • .
  • .
  • .
  • M99
  • O1003 (Subprogram three)
  • .
  • .
  • .
  • M99
  • %

The order of programs (main versus sub) have no special meaning - they can be in any order. What is important is that all the programs are contained in one file and that the percent sign begins and ends the file.

What about saving multiple programs?

The technique just shown may not be very helpful if you did not have the additional ability to save multiple programs back to your DNC system in one file. What good would it do you to have all the programs related to a job in one file on your computer if the first time you had to re-save them from the machine they had to be split up into multiple files?

During the program saving (output) process, most Fanuc controls allow you to specify multiple programs. The trick is that you must separate them with a comma (,). To save programs O0001, O1001, O1002, and O1003, for example, place the mode switch to edit, press the program key, type

  • O0001, O1001, O1002, O1003

and press the soft key under punch.

End of article (M01)

Top of page