The Optional Stop newsletter
Home | More Issues | Contact Us
From our website:
On-Line Classes
CD-Rom Courses
CNC Books
CNC Jobs
CNC Schools
CNC Tips
Educator's Page
Tech Talk Forum

September 19, 2007

Dear Subscribers,

Our CNC jobs page has been experiencing unusually high response lately.  If you are a person looking for a job, be sure to check out the open positions.  If you work for a company that needs people, be sure to check out the applicant page.  And of course, you can always post a free listing to let others know you're looking.

We have had some complaints from posters about spam they receive soon after posting their listings on our jobs page.  First of all, we are not the people sending this spam!  There are many automated "spiders" that search web sites looking for email addresses.  They feed their findings to the spammers.

If you will be posting a listing, we recommend that you don't use your regular email address.  Instead, use a temporary email address just for the purpose of finding a job/person.  You can get it from many websites - like and

Hope you enjoy this issue of The Optional Stop!

Mike Lynch

Product Corner: Self-study manual offers a cost-effective self-paced course
Instructor Note: Do you introduce parametric programming in your CNC classes?
Manager's Insight:  What percentage of time are your machines in production?
G Code Primer: Try not to think incrementally
Macro Maven: Bar puller macro with bar replacing alarm included
Parameter Preference: Changing initialized states
Safety Note: Understand spindle limiting on turning centers

Product Corner: Self-study manual offers cost-effective self paced course

We’ve been offering these manuals for just about as long as we’ve been in business. They are the same manuals included with our video courses and CD-rom courses. They are also the ones used with our CNC curriculums. Again, we’ve always made these manuals available separately – and when combined with the corresponding workbook / answer book combo, they make excellent and inexpensive self-study courses.  Our two most popular self-study manuals are:

Each is tutorial in nature yet comprehensive. We assume that the reader knows nothing about CNC prior to reading them and present the three tasks that must be mastered (again, programming, setup, and completing a production run) from the ground up. We do assume that the reader has some basic machining practice experience (blueprint reading, shop math, knowledge of shop tools, etc.), but nothing about their previous CNC skills.

While a few exercises are included in each of these manuals, to completely confirm comprehension we recommend purchasing the appropriate workbook / answer book combination. Each manual is divided into lessons (twenty-three lessons in the machining center manual, twenty-eight in the turning center manual), and after each lesson there is an exercise to do in the workbook. Some exercises include programming activities. Answers, of course, are provided in the answer book.

We also thoroughly cover each topic. When a person finishes, they will have a very good understanding of what it takes to program, setup, and run a CNC machine.

Cost for each manual is $70.00 (again, one for machining centers and another for turning centers). Each workbook / answer book combination sells for $49.90. Total cost per set is $119.90 plus shipping. And again, there is one set available for machining centers and another for turning centers.


Top of page

Instructor Note: Do you introduce parametric programming in your CNC classes?

As you probably know, parametric programming provides computer-programming-like capabilities at G code level. Variable, arithmetic, and program flow control are but three of the features available when the CNC control has parametric programming. (Learn more about parametric programming here.) There are also many CNC-related parametric programming features that help make it such a powerful programming tool – a tool that all CNC students should, at the very least, be introduced to.

At some point in your CNC class – most preferably a programming class – you should spend a little time explaining what parametric programming is and describing its applications. While students may not have to be well versed with its use, they should be able to recognize good applications when they see them.

As you also probably know, the most popular version of parametric programming is custom macro B. This version is used by Fanuc and any control manufacturer that claims to be Fanuc-compatible. For this reason, I’d recommend that any specific examples you show be in custom macro B format. But do explain that every control manufacturer has a version of parametric programming that allows the same techniques used with custom macro B. Okuma calls it user task 2. Fadal calls it macro. The point is: Some version of parametric programming will be available (possibly as an optional feature) regardless of what CNC machine and control are being used.

I like to introduce parametric programming during the discussion of special programming features – which is included in our “key concept” number ten. Since it can be quite similar to sub-programming, we include a brief introduction to parametric programming at this point in our CNC curriculums and student manuals. Again, we simply introduce its features and applications. Only a page or so is provided for this purpose in our manual. You may want to do more – showing a real life example/demonstration on one of your lab machines.

Admittedly, it may be difficult to get too specific about parametric programming during a basic CNC programming class – as parametric programming can get pretty complex. But even if you keep your presentations pretty general in nature, students should be able to see the benefits of this very important feature.

If you don’t feel well enough acquainted with parametric programming to introduce or teach it, there is plenty of free information on our website to help you understand. Look on our CNC Tips page for several real-life examples. We also offer a self-study manual and a CD-rom course that completely covers parametric programming in detail. And we can provide you with a curriculum including instructor and student materials that will allow you to teach a parametric programming class – should you decide to provide a separate class on this subject.


Top of page

Manager's Insight: What percentage of time are your machines in production?

I’ve done quite a bit of in-plant consulting and training over the years. While walking shop floors, and as you can imagine, I’m always very interested in the CNC processes taking place. As long as it doesn’t bother the people running the machines, I’m always looking over someone’s shoulder to see what’s going on and peering into machines to see the cutting operations being performed.

I’ve noticed something pretty consistent from one company to the next. CNC machines never seem to be in production for as much of the time as management and engineering staff seem to think they are. At some point during my visit, I’ll always ask for some general percentages of setup time compared to production run time. And during production run time, how much time the machines are actually running (as opposed to being down for part loading, tool maintenance, adjustments, etc.).

I hear some pretty conflicting things from management and engineering people. According to management in one company I recently visited (data taken from computer printouts), setup time was about 12 percent and production run time (machines actually running) was about 78 percent. I was quite impressed with the efficiency they had achieved. Yet the next time I toured the facility, over half the machines were sitting idle!  During the week of my visit I kept making my way through the shop at various times (and over the course of two shifts), and never were more than half the machines actually running.

This didn’t sound right to me so I questioned whether something special was happening during my visit. Maybe more people than normal had called in sick. Maybe there were a lot of people taking vacation days. Maybe there wasn’t enough work for the machines while I was there. Whatever. But I was assured that things around the plant were quite normal.

Admittedly, my stay was relatively short – surely I was getting just a snapshot of what was probably happening in the company over the long haul. But as I said, I’ve found the estimated production running time to be consistently high in many of the companies I’ve visited.

One of the first tasks to undertake when considering making any improvement, of course, is objectively assessing the current state of affairs. Machine downtime should be an obvious target for improvement, but if you are not getting a true picture of what is happening on the shop floor – for whatever reason – you may not even recognize the need to improve.

My suggestion is to question and test your production run-time numbers. Simply do what I did. After determining what the accepted run-time percentages are, go out into the shop and determine what percentage of machines are sitting idle at any given time. If you find discrepancies, it should be taken as a signal that there may be some errors in your data collection and reporting system. They shouldn’t be too difficult to spot.


Top of page

G Code Primer: Try not to think incrementally

I’ve had over five hundred students come through my on-line courses to date. In my programming classes, there is one common misunderstanding that a great percentage of students share. They tend to think incrementally. By this I mean when programming a cutting motion, they ask themselves the wrong question. The question they should be asking is “To what position do I want to move the cutting tool?” This position is always relative to the program zero point location. And of course, when you specify positions relative to program zero, you are working in the absolute mode.

But instead, they ask themselves “How far do I want to move the tool?” This is thinking incrementally. While there are good applications for the incremental mode, the vast majority of motions should be programmed in the absolute mode. Indeed, I urge entry-level programmers to work exclusively in the absolute mode while they write their first few programs.

With machining centers, G90 specifies absolute mode while G91 specifies incremental mode. With many turning centers, X and Z words specify absolute motions while U and W words specify incremental motions (U causes incremental X axis motions and W causes incremental Z axis motions).

The method by which absolute and incremental modes are specified, however, is hardly the cause of the thinking-incrementally problem. Instead, the confusion usually stems from the way prints are dimensioned. Consider, for example, two holes that are specified as 2.5 inches apart from one another. Maybe one of the holes is dimensioned directly from the program zero point – and the programmer won’t have a problem correctly specifying its location. With the tool currently above the first hole, and since the print dimension shows the 2.5 inch distance between the holes, many entry-level programmers will mistakenly specify the motion to the next hole with 2.5 inches. Again, this is thinking incrementally.

Some programmers will temporarily shift to the incremental mode and specify the motion to the second hole – and this will actually work – but we don’t recommend it. This is not one of the good applications for incremental mode that we mentioned earlier. Instead, we recommend keeping the machine in the absolute mode and specifying the position of the second hole just as you do for the first hole – from the program zero point. This means calculating the position of the second hole relative to program zero – probably requiring the addition of the 2.5 inch between-the-holes dimension to some other value.

So – what are good applications for the incremental mode? One is related to sub-programming. When a series of commands must be repeated, it is usually a good application for sub-programming. Say five identical pockets must be milled. The same motions needed to machine the first pocket will be used to machine each of the others. But if the subprogram is written in the absolute move, the same pocket will be machined five times.

One way to overcome this problem is to write the subprogram in the incremental mode. After moving to the starting point of the pocket in the absolute mode, the incremental subprogram can be called. (Note that there is another way to handle this application that does not require writing incremental commands. It involves the G52 temporary shift of origin command.)

Though we’ve strayed a bit from the focus of this short article, our main point is that most program should be written exclusively in the absolute mode. The sooner an entry level programmer can stop thinking incrementally, the sooner they will become a proficient programmer.


Top of page

Macro Maven: Bar puller macro with bar replacing alarm included

Submitted by: Manuel Martinez of Horst Engineering & Mfg

This is a custom Macro I created for our operators to load a bar into the spindle and then let the machine to run by it self in repeat mode until completion of the bar. I hope your readers find it helpful.

When you use a bar puller, there will be no “end of bar” confirmation signal as there is with a properly interfaced bar feeding system. So you must be very careful not to let too many cycles run. This macro keeps track of how many parts have been run and will stop the machine prior to the bar becoming too short.

Bar pullers and machine codes vary, of course, and this macro shows one specific technique for the bar puller and machine we use. But if you understand how it works, you should be able to adapt this program to your own machine and puller.

The operator (or the programmer if preferred) just needs to know how to calculate the macro variables value and then they can exactly adjust it to each job you're running.

The callout on the main program must be as follows:

  • %


  • N10G20
    N11 (FEED OUT )

  • N12G97M5




  • N15G65P9992Q53.0W0.64

  • N16M98P1

  • N17M01

  • N18(NEXT TOOL)

  • N

  • .

  • .

  • .


  • .

  • .

  • .

  • .

  • /N125M00

  • (********************)


  • (********************)

  • N125#500=#500+1(***PARTS COUNTER***)


  • N160M98P1

  • N125M30

  • %

The Macro Variables works as follows:

Q: Quantity of pieces per bar. Say you're using a 3 foot long bar, for example, cutting 0.5 inch long pieces with a 0.12 inch wide cutoff tool, and leaving 0.02 for finish facing stock. And you want to leave a 2.0 remnant at the end of the bar to safely ensure that the chuck will be clamping properly even on the last workpiece. In this case, you can machine 53 pieces and have a two inch long remnant (36 inches minus 2 inches [34] divided by 0.64 is 53.125).

W: Material length to feed. This is the workpiece length plus the cutoff tool width plus the amount of finish facing stock (0.5 plus 0.12 plus 0.02 or 0.64 in the example just shown).

If you made you use the same length of bar each time (36.0 inches in our example), you can just replace the bar when the machine shows your operator he needs to and the machine can run unattended for the length of the bar.

For the bar puller in my example, the bar puller offsets must be set as follows:

X=0 must be set as if it was a drill, aligned to spindle's center.

Z=0 must be set by eye on the part's face as any regular tool.

The way I use it, will require that you always leave the material .350 inch out of the collet after you use your cutoff. If you leave less, the bar puller will crash the spindle face. Again, this is our specific technique – if you use different methods the macro must be changed to suit your needs.

  • %


  • IF[#500LT17]GOTO1

  • #500=0


  • N1G0G40G98

  • G0X4.Z.25

  • G01Z-[.3+ #23] F50.

  • X0.


  • W#23F20. (FEED MATERIAL)


  • X4.0 F50.0

  • Z.25

  • M98P1

  • M99

  • %


Top of page

Parameter Preference: Changing initialized states

When you power up a CNC machine tool, certain modes are initialized – that is – automatically selected. With many machines, for example, the machine will come on in the rapid (G00) mode. If the first motion command after power up is given without a G code to specify the motion type (G00, G01, G02, G03), the machine will move in the way the motion type has been initialized – rapid motion in our example.

It is important to know that certain initialized modes are set by parameter – and they can be changed. In the case of the motion type initialization, you may not want the machine initializing in the rapid mode, especially if your people make a lot of MDI commands. You may, instead, want the machine initializing in the linear interpolation (G01) mode. This will be safer – if a person forgets to include a motion type in the first MDI command (right after power up), the machine will not rapid.

For a 16 series control (16T or 16M), bit number zero (right-most bit) of parameter number 3402 controls which of G00 or G01 will be initialized after power up. Though the documentation in my manual was not specific, if I remember correctly, when this bit is set to a zero (0), rapid mode is initialized. If it is set to a one (1), linear interpolation mode is initialized.

You must check in your machine documentation (or test) to confirm this. And of course, each control model has a different set of parameter numbers – and you must find the appropriate one (look for the notes just after the list of G codes in your operation manual) for your particular control/s.

Again, other initialized states can also be adjusted in this manner. The initialized state of absolute mode and incremental mode (G90 and G91), plane selection (G17, G18, and G19), rapid and initial plane with canned cycles (G98 and G99), and stored stroke limit (G22 and G23) are among the functions you can control in this manner.

One more note. With most machines, the RESET button will return the machine to its initialized states (another parameter controls whether or not this will happen). This means that when you press the RESET button, the machine will return to its initialized state.


Top of page

Safety Note: Understand spindle speed limiting on turning centers

Today’s CNC turning centers allow very fast spindle speeds. It is not uncommon for a machine having an eight inch diameter hydraulic chuck to provide 6,000 rpm or more. Since these machines allow spindle speed to be programmed with a feature called constant surface speed, it is not obvious just how fast the spindle will run for a given machining operation. With constant surface speed, of course, you specify speed in surface feet per minute (in the inch mode) or meters per minute (in the metric mode).

You can apply a formula to determine rpm for a given operation:

  • rpm equals 3.82 times speed in sfm divided by the diameter being machined

Note that if you will be facing a workpiece to center – a very common operation for turned workpieces – the spindle will run up to its maximum rpm in the current spindle range. This is because you are sending the cutting tool to spindle center – a diameter of zero. And even if you specify a speed of one surface foot per minute, the spindle will run up to its maximum speed.

When you have small, completely concentric and round workpieces, this is seldom a problem. The workpiece will run true in the spindle and maximum rpm can be achieved without vibration. But when you are running larger workpieces, and especially when the workpiece is not perfectly round and balanced (castings and forgings are notorious for this problem), it’s likely that the machine will not be able to achieve its maximum rpm with out – at the very least – some vibration. Worse, the vibration may be severe enough to cause problems with machining. At worst, the out-of-balance condition may cause the work holding device (chuck) to fail – and the workpiece will be released at a very fast rpm. Few machine doors and windows can hold in such a workpiece, and this of course makes for a very dangerous situation.

For this reason, control manufactures provide you with a way to program the maximum spindle speed. With Fanuc and Fanuc-compatible controls it is done with a G50 command. If the control executes this command

  • G50 S1500

it will not allow the spindle to rotate faster than 1,500 rpm – even if constant surface speed is being used. Said another way, if you are facing a workpiece to center with constant surface speed, the spindle will stop accelerating when it reaches 1,500 rpm. It will be as if the machine’s maximum rpm is 1,500.

Determining how fast the spindle can run without vibration can be difficult. Even within a lot of workpieces, it is possible that some parts will experience vibration at lower speeds than others. Because this is such an important safety issue, we recommend erring on the side of caution (slow). That is, set up your maximum speed for the worst possible workpiece condition.

One way to determine maximum rpm is to physically test it (frankly, this is the only way we know of). Place the workpiece in the spindle and start the spindle in manual data input (MD) mode at a very slow rpm. Then, in small increments, increase the rpm until you either achieve the machine’s maximum or vibration starts to occur. You should repeat this test with several workpieces. When a maximum rpm is determined, we recommend decreasing it by another 10% or so, just to ensure safety.

The spindle range surprise

Remember that many turning centers have multiple spindle ranges. This can cause some real problems for out-of-balance workpieces. Consider, for example, a turning center that has two spindle ranges. The low range runs from 0 – 2,000 rpm. The high range runs from 0 – 6,000 rpm.

When roughing the workpiece, the programmer uses the low spindle range to get the power needed for machining. And of course, the spindle will be automatically limited to 2,000 rpm. So if a face-to-center operation is done, the spindle will not accelerate past 2,000 rpm. But when they do the finishing operations, the programmer will switch to the high range. If a face-to-center operation is done, the spindle will accelerate to 6,000 rpm.

When you do your test to determine maximum spindle speed, you should do it in the high spindle range. Doing it in the low range will render false results. The spindle may peak-out in the low spindle range prior to vibration. But in reality, it cannot achieve the machine’s true maximum rpm without creating a dangerous condition.

Is efficiency an issue?

One last point. There may be times, especially when quantities are high, when you will want to fine tune your spindle limiter in the program. The situation may exist when a workpiece is terribly out-of-round in its rough state (requiring a severe spindle limitation), but after roughing, will be in a more balanced state. So after roughing in this case, you will be able to increase the maximum spindle rpm to allow more efficient machining.


Top of page

Sofware ad
Machining center training materials
Parametric programming ad

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 ( 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.