Issue 64
Summer 2005
Copyright 2005

In this issue:
  1. Instructors! Notes about our CNC curriculums...
  2. Instructor note: Teaching CNC with the key concepts approach - part six
  3. Time saver: A simple way to organize often-needed hand tools
  4. G-code primer: What are three-digit G codes?
  5. Parameter preference: How do you protect important programs?
  6. Safety Tip: Does your machining center have an air blow system in the spindle?

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 ( 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 ( 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:
{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

Instructors! Notes about our CNC curriculums...

Here are a few points of interest to instructors that are using our CNC curriculums.

New lesson plans available soon

We're in the process of improving the instructions that come with our CNC curriculums - making it easier for you to get ready to teach. When finished, we'll make them available to you (free of charge) from our website. Our intention is to replace the large and bulky Instructor Notes Manual. For a quick preview, click the following link.

As you can see, we've consolidated what you'll need to teach each lesson (or introduce each key concept) into one concise sheet of paper per lesson:

  • Lesson name
  • Lesson number
  • Approximate time needed to present the lesson
  • Presentation links slide from the slide show (list of topics)
  • Lesson objective
  • Key points to make for each topic
  • Suggestions for if you are teaching only setup and/or operation (not programming)
  • Suggestions for what to do at the machine to stress the points made in the lesson
  • Suggestions for a lab exercise (if appropriate)
  • Suggested homework assignment
  • Suggestions for exercises to be done

The complete set of lesson plans for our machining center curriculum will be available by the end of June, 2005. The lesson plans for the turning center curriculum should be available by the end of July. This should be in time to use for your Fall sessions. We'll post them on our website in Adobe Acrobat (.pdf) format as soon as they are available. We'll also include a reminder in the next issue of The Optional Stop newsletter.

As always, your comments and suggestions are welcomed.

Thank you for your comments...

The third editions for our machining center and turning center student manuals seem to have met with your approval. We've received several compliments related to how they're so much better than the second editions. Again, thanks to everyone that called or emailed.

As mentioned above, we're in the process of creating concise lesson plans for each curriculum. Future projects include updating the workbooks for each curriculum. And you comments and suggestions will be appreciated.

Can our on-line classes help your CNC program?

I teach six on-line classes related to CNC. These classes are hosted by They include:

While my basic courses (programming and setup & operation) probably parallel your existing CNC classes, you may not have materials related to the two more advanced classes (advanced techniques and parametric programming).

These classes may be helpful in your own CNC program. For example, Hugh Wolcott of NWIRC (The Northwest Pennsylvania Industrial Resource Center) has been successfully using my Advanced Techniques with Basic Features on-line class in conjunction with his own advanced techniques class. Here is the link to his promotional materials for this class.

If you have an interest in using one of my classes within your program, please contact me by phone (847-639-8847) or email to discuss the details.

Email spam that seems to come from our schools page

As you know, we maintain a CNC schools page (from It's free - our intention is to help you promote your school's CNC-related courses. If you haven't already, be sure to take advantage of this helpful marketing tool.

We've received several complaints from instructors (and from people posting on our jobs page) that after posting they receive many spam emails. Please note that we don't spam - nor do we share your email addresses with anyone.

There are countless software programs that scan web pages on the Internet looking for email addresses. These spiders are automatic - and when they find an email address, they add it to somebody's spam list. If you post your email address on any website - or if you join any forums or newsgroups using your normal email address, you're vulnerable to spam predators.

For this reason, we recommend that you use a temporary or alias email address (not your normal one) whenever you post an email address on a website - including ours. You can easily set up a (free) email account with many websites, like and

End of article (M01)

Top of page

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

Part six - Key concept number five: You must provide structure to your CNC 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

Here in part six, we're going to discuss topics related to structuring CNC programs so students will be able to write programs on their own. Here here are the two general topics that we include in key concept five:

  • Providing structure to CNC programs
  • The four kinds of program format

In our CNC curriculums and CD-rom courses, these topics are presented in two lessons.

Providing structure to CNC programs

I like to begin by reminding students that there are only about 40-50 words used in CNC programming. While this may seem like a lot, ask students to think of learning a foreign language that contains only 50 words.

Also point out that students have seen several complete programs to this point in the class - indeed, if they have done any of the exercises included in our workbook, they have actually worked on some programs (filling in the blanks for needed words. They have probably noticed that there is quite a bit of consistency and structure in the programs shown. These programs use the structure we're going to present in this key concept.

Review the structure related topics introduced in previous key concepts, including the meaning of modal, initialized, decimal point programming, and G and M code limitations (three G codes and one M code per command). And remind students of their natural tendency to forget things as they program (making mistakes of omission). It is not uncommon to forget needed words when writing a program. Make sure they know that you'll be presenting a technique that will keep them from having to memorize anything - and will minimize the potential for making mistakes of omission. Provide them with the three reasons why programs must be structured in a strict manner:


Students must have a way to become familiar with the words and commands used to structure a program. I equate this to the road signs you see as you drive an automobile. It's unlikely that you can recite every road sign and its meaning from memory. But when you see a road sign, you easily remember its meaning.

Have students think about the structure used to write CNC programs as a set of road signs for programming. In this key concept, you'll be providing the format needed to write programs. Students can use this format as a crutch as they write their first few programs.


Point out that CNC programs must be written consistently - among tools in a given program, and among all programs. This will provide everyone using the programs to get familiar with programming style. More importantly, programmers must have a way of repeating past successes. If the structure of one program is satisfactory - that is, it satisfies all of the objectives the company wants - using the same structure in another program will ensure continued success. And the format used for consistently written programs will soon be memorized.

Re-running tools

Explain that this is the most important reason to provide structure to programs. There are many times when setup people and operators must run a tool by itself (when trial machining, during program verification, etc.). This means all commands needed by the first tool in the program must be included at the beginning of each tools.

How it's done...

In our curriculums, we provide four sets of program format: program startup format, tool ending format, tool startup format, and program ending format. Armed with these formats, entry level programmers will not have to memorize the various words and commands needed for their programs. Instead, they will copy the structure from a workable program - using it to create their own programs.

What about machine differences?

When teaching, of course, you'll provide formats for your particular machine/s. But be sure to point out that there are many differences among machine tools that affect the way programs must be formatted. Obvious ones include automatic tool changers for machining centers and tailstocks for lathes. Additionally, be sure to point out the most common M code differences from one machine to another.

The four kinds of program format

Again, these include program startup format, tool ending format, tool startup format, and program ending format.

With a workable set of formats developed for your machine/s, show and explain the formats. At this point it is very important that students understand the meaning of every word and command in the formats. This shouldn't provide much of a problem since students have worked on several exercises that have acquainted them with the most common words. But words like G28 and M01 must be explained in detail.

Using your formats, have students write their own program. Once finished, be sure to stress the ability to re-run tools. And make sure they can determine the restart command for each tool.

The formats

Here is a set of formats for a vertical machining center that uses fixture offsets to assigning program zero:

Program startup format

  • O0001 (program number)
  • N001 G17 G20 G23 (Select XY plane, inch mode, cancel stored stroke limit)
  • N002 G40 G50 G64 (Cancel cutter radius compensation, cancel scaling, select normal cutting mode)
  • N003 G67 G69 G80 (Cancel modal custom macro call, cancel rotation, cancel canned cycle)
  • N005 T01 M06 (Load first tool in spindle)
  • N010 G54 G90 S300 M03 T02 (Select fixture offset, absolute mode, turn spindle on fwd at desired RPM, get next tool ready)
  • N015 G00 X5.0 Y5.0 (Move to first XY position)
  • N020 G43 H01 Z0.1 (Instate tool length compensation, move to first Z position)
  • N025 M08 (Turn on the coolant)
  • N030 G01 . . . . F3.0 (In first cutting movement, be sure to include a feedrate)

Tool ending format

  • N075 M09 (Turn the coolant off)
  • N080 G91 G28 Z0 M19 (Return to tool change position, orient the spindle during motion)
  • N085 M01 (Optional stop)

Tool startup format

  • N135 T02 M06 (Ensure that the next station is still ready and make the tool change)
  • N140 G54 G90 S450 M03 T03 (Select fixture offset, select absolute mode, turn spindle on CW at desired RPM, get next tool ready)
  • N145 G00 X4.0 Y4.0 (Move to this tool's first XY position)
  • N150 G43 H02 Z0.1 (Instate tool length compensation, move to first Z position)
  • N155 M08 (Turn on the coolant)
  • N160 G01…. F4.0 (In first cutting movement, be sure to include a feedrate)

Program ending format

  • N310 M09 (Turn coolant off)
  • N315 G91 G28 Y0 Z0 M19 (Return to tool change position in Z, orient spindle during motion)
  • N320 G28 Y0 (Return to zero return position in Y)
  • N325 M30 (End of program)

Be sure to point out the consistencies. Tool startup format is quite similar to program startup format. Tool ending format is similar to program ending format. Once a beginning program has written a few programs, these formats will be memorized.

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

Time saver: A simple way to organize often-needed hand tools

Suggested by Tom Rivas of Staveley Services Materials Testing

I thought I would share something I did to help our operators. Small hex keys (Allen wrenches) have always been a problem. They were all over the place and at the same time nowhere to be found. So I bought a roll of self-adhesive magnetic tape and attached a length of it to each machine, right on the door. Now operators simply stick small (metallic) tools to the tape - and it's really easy to place them in order (small to large).

This was a small step, but it helped to organize a bit more - and the tools needed on a regular basis are always at arms length.

End of article (M01)

Top of page

G-code primer: What are three-digit G codes?

Suggested by Bill Hetner of Edmonton, Alberta

Question from Bill: I found the tips on your website to be very interesting. I am looking for information on G codes in the 100 series. Most sites I visit have the standards up to 100. I have, on occasion, seen and used ones in the 100's like G136 which is a bolt circle pattern. However, I don't know all of its parameters or how to properly reuse it for other applications...

As Bill says, G code up to 99 are reserved for exclusive use by the control manufacturer (Fanuc, for example). For a given control model, these G codes remain remarkably similar from one machine to another - even among machines made by different machine tool builders.

However, with Fanuc controls, there is a way to "invent" new G codes (and M codes) if the control is equipped with custom macro B. This has been the topic of past articles in The Optional Stop newsletter (see Issue 63, for example).

Several machine tool builders have created new G codes to make their machines more attractive to perspective customers. Those that have done so commonly use G codes numbered over 100 to avoid any conflict with the reserved G codes (under 100). These G codes are intended to simplify programming and commonly include applications like bolt hole pattern, circle milling, pocket milling, and face milling (all machining center applications but three-digit G codes can also be created for turning centers).

Unfortunately, you won't find these G codes documented in the Fanuc manuals (again, Fanuc didn't create them). Documentation for these G codes must be provided by the machine tool builder - so look in their programming manual/s to learn how they're used. Some machine tool builders provide a special supplementary manual exclusively for this purpose.

End of article (M01)

Top of page

Parameter preference: How do you protect important programs from accidental deletion?

You may have special programs (like custom macros) that remain in the machine on a permanent basis. Yet you may be worried that someone may accidentally delete them - possibly by typing O-9999 and then pressing the delete key.

As long as these programs are named in the 9000 series (like O9001, for example), you can prevent operators from deleting them. A special parameter is involved.

Finding the parameter

While finding parameters can be difficult with older Fanuc controls, newer controls make it a little easier. The parameter in question is usually named with the abbreviation NE9 (don't ask what it stands for - I don't know) - and it is included in the section named Parameters related to MDI/EDIT/CRT. With a 15 series control (15T or 15M), for example, parameter number 2201, bit number 0 (right most bit) controls this function.

To protect programs in the 9000 series

If the value of this parameter bit (again bit zero of parameter 2201 for a 15 series control) is set to zero (the normal setting), programs named in the 9000 series can be edited (including deleted). If you set this bit to one, programs in the 9000 series cannot be edited or deleted.

Do you want to hide these programs?

You can even make it so that programs named in the 9000 series cannot be displayed - effectively hiding them from setup people and operators. The parameter named ND9 is used to do so. For a 15 series control, parameter 2201, bit number 1 (second bit from right) controls this function. If set to zero (normal setting), programs named in the 9000 series can be displayed. If this bit is set to one, these programs cannot be displayed.

End of article (M01)

Top of page

Safety tip: Does your machining center have an air blow system in the spindle?

How often must you or your machining center operators manually remove cutting tools from the spindle? This may be necessary when tools dull during a production run in order to replace or sharpen them.

During a tool change, many machining centers provide a blast of air within the spindle taper to eliminate the possibility of chips or other debris getting into the spindle. If your machining center does, you must be quite careful and alert when you manually remove a tool from the spindle. When you press the unclamp button to remove the tool, the air blast may blow the tool right out of your hand!

Some machines have a switch mounted near the spindle (close to the unclamp button) that controls the air blowing system - at least for manual tool removal. If your machine has this switch (commonly labeled air blow), be sure to leave it off. This will minimize the potential for a nasty surprise when you manually remove tools from the spindle!

End of article (M01)

Top of page