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
Back Issues

June 25, 2012

Dear Subscribers,

Welcome to Issue 91 of The Optional Stop.  I hope you enjoy it. 

Call me slow, but I only recently discovered HTEC, the subject of this issues Instructor Note.  This organization, founded by HAAS Automation, is dedicated to helping manufacturing instructors.  If you teach CNC, read my short article and if you haven't already, be sure to learn more about this excellent resource.

I'll be attending the 2012 HTEC Annual Conference in Troy, New York as both an exhibitor and speaker from July 16-19.  I hope to see you there!

As always, we've included a range of topics in this issue.  Again, enjoy! 


Mike Lynch

Product Corner: Lots of training alternatives
Instructor Note: Is your school an HTEC member?
Manager's Insight: Where is your company’s main constraint?
G Code Primer: Coming up with coordinates needed in programs
Macro Maven: What else do you need to count?
Parameter Preference: Creating your own parameters
Safety First: Generating alarms for dangerous situations

Product Corner: Lots of training alternatives

If you have been browsing our website, you have probably noticed that we have training materials available for three different types of CNC machine tools and in four different types of media. Admittedly, this gets confusing – but bear with us – there is some method to our madness. We’ve based our offerings on four criteria: machine type, media type, affordability, and your current experience level.

Machine types

You probably know that CNC technology (motion control) can be applied to just about any kind of industrial equipment. Our materials will help you master three popular CNC machine types.

  • CNC machining centers (also referred to as CNC milling and drilling machines)

  • CNC turning centers (also referred to as CNC lathes)

  • CNC routers (also referred to as woodworking CNC machining centers)

While our materials are specific to these three machine types, they may also help you learn the concepts needed for other CNC machine types. Many of the concepts required to master CNC wire EDM machines, CNC plasma cutters, CNC laser cutting machines, and CNC punch presses are covered in our materials related to CNC machining centers.

Training media type and affordability

Again, our materials vary with regard to price – and below we list them in order from least to most expensive. Content is quite similar from one type of media to the next –it is the presentation method that varies the most.

Self-study manuals – Our manuals are written in tutorial fashion (as opposed to reference manuals), using a building blocks approach to help you grow your knowledge about CNC. While, of course, you must read them to gain an understanding of CNC, everything included in other media types are covered in our self-study manuals. Many of our self-study manuals include practice exercises right in the text to help you confirm your understanding of content. Self-study manuals range in price from $60.00 to $70.00. Workbooks and answer books are available for some self-study manuals at an additional cost.

On-line classes – With our on-line classes, you print the course text (manual) as you go through the class. Each lesson includes a portion of this manual. In addition to the text you read during the class, each lesson includes a PowerPoint slide presentation that provides another method of learning. While these slide presentations are silent (no audio), there are many fly-in-text-boxes that appear on key slides. After you study each lesson, there is a test to take. Some of the lessons also include assignments (like writing programs). Tests and assignments are graded by Mike Lynch. Email support is available if you have questions during the class. A certificate is available (at an additional cost) that confirms your successful completion of the class. On-line classes range in price from $89.00 to $119.00 (with certificate).

CD-rom courses – These courses come with a (6-hour) CD-rom, manual, workbook, and answer book. The manual is also sold separately – and is one of our self-study manuals. The slide presentations on the CD-rom include audio to explain the content, and are very easy to navigate. After each lesson, there is an exercise (and possibly a programming activity) to be done in the workbook. You check your own answers in the answer book. Phone and email assistance is available if you have questions while working on the course. CD-rom courses range in price from $189.00 to $399.00

A note to educators: If you want self-paced training material, we recommend our CD-rom courses. They are very affordable and can be used over and over again. Additional manuals and workbooks can be purchased at any time. If you are teaching instructor led classes, we recommend our CNC curriculums. They use the same student materials as the CD-rom courses do, and include lesson plans and PowerPoint slide presentations to use as your visuals and keep you on track. They truly minimize the preparation you must do in order to get ready to teach a CNC class.



Top of page

Instructor Note: Is your school an HTEC member?

Founded by Haas Automation, HTEC serves the Haas Technical Education Center network. This fantastic organization is comprised of at least 154 high schools, 187 vocational schools & career centers, 407 community colleges and 238 colleges and universities. These schools use over 2350 Haas CNC machines in their programs.

There is no other organization like HTEC. The goal is to bring CNC educators together to share teaching methods for manufacturing (mostly CNC) related topics.

Here is HTEC’s mission statement:

Our Mission: Excellence in Manufacturing Education

The mission of the Haas Technical Education Center Network is to promote and advance manufacturing and productivity through excellence in manufacturing education.

Our vision is to develop, deliver, and disseminate collectively the best educational methods and techniques for advanced manufacturing education in the world.

HTEC is made up of member schools and partners. Partners (like CNC Concepts, Inc.) are suppliers that in some way serve the manufacturing education community.

To bring educators together, HTEC conducts regional and national conferences. Educators from member schools get together to exchange ideas with one another. HTEC partners often attend these conferences, setting up table-to exhibits to show off their wares.

Here is a series of links to the HTEC web pages that educators should find interesting:

If your school is not already a member of HTEC, look into getting involved with this excellent organization. It’s free, and you’ll get the opportunity to network with others in your position from your region, from other parts of the United States, and even from around the world.



Top of page

Manager's Insight: Where is your company’s main constraint?

A constraint is a bottleneck that in some way holds up production. One area of your company is delayed while waiting for another. A milling operation may be held up because of problems with a machine in the lathe department, making the machine in lathe department the constraint. Assemblers may not be able to complete products on time because workpieces coming from a given CNC machine are behind schedule, making the CNC machine the constraint. Constraints are very common. All companies have them and should work to eliminate them.

There will always be, however, one constraint that is the most serious. This is the constraint that limits the overall output of your company, and is called the main constraint. Eliminating this constraint will increase your company’s output.

In one of the examples above, the CNC machine that holds up assembly may be the main constraint. Eliminating it will allow faster assembly component workpieces, letting the company ship more products.
Note that when you eliminate one main constraint, there will always be another. That is, there will always be something that limits your company’s overall output. As long as you are satisfied with the output coming from your company, this shouldn’t be a problem. But if you need to produce more, identifying and eliminating main constraints must be your approach.

Even if you don’t currently have need to produce more, it is important to at least identify current main constraint – and to know what could be done to eliminate. The day may come when your company increase it’s output. And you’ll be ready.


Top of page

G Code Primer: Coming up with coordinates needed in programs

Almost all CNC-using companies own some kind of computer aided manufacturing (CAM) system. These systems, of course, eliminate the need for coordinate calculations. A drawing file (drawn with a computer aided design [CAD] system) is imported to the CAM system and the coordinates needed for the G code program will be automatically calculated.

The more complex the shape being machined – and/or the more complex the machining operation/s being performed, the more helpful a CAM system will be in this regard. Indeed, there are G code level programs for which coordinate calculations could not be manually calculated. For example, the coordinates needed for motions that machine just about any three dimensional shape would be next to impossible to calculate manually.

On the other end of the spectrum, however, there are programs for which calculating coordinates is very easy. When simple hole-machining operations must be done, for example, and when relatively simple X/Y contours must be milled, a manual programmer can easily calculate needed coordinates. Indeed, a good manual programmer can often outperform even a good CAM system programmer for simple work.

The more difficult coordinates are to come up with, the tougher it will be for a manual programmer. But rather than immediately jump to a complex (and expensive) CAM system at the first sign of more complex work, there is another alternative to consider.

All computer aided design (CAD) systems will allow users to view the coordinates it generates for entities being drawn. For even a complex X/Y contour, this means a person can view coordinates for starting and ending points for all lines, circles, and arcs that make up the contour. These, of course, are the coordinates needed for G code level (manual) programming. So if you can draw a workpiece contour in a CAD system, you can determine the coordinates needed in your G code program.

And you don’t need an expensive CAD system to do this. Indeed, there are even free apps for this purpose (like Google Sketch). Here is a link to a website that shows a few:

To this list I would add DeltaCad. It’s easy to use and also inexpensive.

In addition to helping you determine coordinates, all current CAD systems let you export drawing files using a universal format, like the .dxf file format (standing for drawing exchange format).

Many CNC text editors allow you to convert .dxf files to G code. For example, the tool path plotter software program called NCPlot has this ability.

A search of the Internet with search criteria “DXF to G code” will even turn up some freeware programs that will take your drawing file and convert it to G code.

Admittedly, there are many applications that require the capabilities of a full blown CAM system. But for work that is on the borderline, using an inexpensive (or existing) CAD system to draw the contours in need of machining can quickly get you the coordinates you need to write the G code program. And having a .dxf to G code converter will further quicken the process.


Top of page

Macro Maven: What else do you need to count?

Counting cycles can be helpful in several ways. Past articles in The Optional Stop have shown two great applications. One will serve as a part counter. The other works nicely to help with tool life management issues.

With the part counter, we place a G65 command at the end of the cutting program to activate the part counting macro. One thing we didn’t previously show is how to make the custom macro work when more than one workpiece is machined per cycle. Consider this revised macro.

  • O0001 (Main program)

  • .

  • .

  • .

  • N500 G65 P1000 C300.0 M4.0

  • N505 M30

In this case, C represents the number of parts to be made. M represents the number of parts being produced per cycle. Here is the new custom macro.

  • O1000

  • #500 = #500 + #13 (Step counter by the number of parts per cycle)

  • IF [#500 LT #3] GOTO 99

  • #500 = 0 (Reset counter when finished)

  • #3000 = 101 (PART COUNT ACHIEVED)

  • N99 M99

When used for tool life management, the custom macro can count cycles for the purpose of stopping the machine whenever a critical tool (or series of tools) gets dull. We have even shown how this can be used with multiple tools.

So when else might you need to count cycles and stop the machine at appropriate times?

How about when the production run must be stopped for sampling inspections? Maybe you have a customer that requires 100% inspection to be done on a workpiece after every one-hundred parts are run.
How about with certain critical preventive maintenance tasks? Maybe chips are piling up on the machine’s table and after every fifty parts the operator must brush away the chips or else they will interfere with machining operations. Or maybe some kind of inspection must be done on the machine at certain intervals to ensure that the machine keeps running properly.

How about when you need to remind operators to do something every so often? It may be something unrelated to the CNC cycle, but you don’t want them to forget to do it. Possibly they are running a second, automatic machine that requires reloading of multiple workpieces every so often. Counting cycles on the CNC machine and generating an alarm at appropriate intervals will remind the operator to perform the required task.

While you don’t want to do something that will interfere with the CNC machine’s performance, this technique of counting cycles has more applications than simple part counting. Consider other applications for this helpful technique.




Top of page

Parameter Preference: Creating your own parameters

Parameters are used by control manufacturers to allow machine tool builders – and end users – to specify many things about the individual CNC machine that is attached to the control. Many parameters, like those related to pitch error compensation, are related to functions that are beyond the control of (or interest of) the typical CNC user. Others, like those related to creating user defined G and M codes, are of interest to end users. Some, like those related to circular motion and cutter radius compensation commands, even specify how the control will respond to certain programming commands, and end users should at least know about them.

Parameters of interest to CNC users have been the focus of this newsletter on many occasions. We’ve tried to point out times when you may have one set improperly – or when you might want to change one in order to get your machine to behave more to your liking. Here we’d like to go a step further and give you some ideas for “creating” parameters on your own.

While you won’t be reworking a control to add parameter registers – or rewiring anything to provide new functions, you can emulate a parameter register using a permanent common variable (commonly in the #500 series) or any unused offset register. #500 series permanent common variable values can be entered through the keyboard and display screen, just like offsets. You can even label some of them with a short (eight character) message to indicate its meaning using the SETVN command. Consider this command.

  • SETVN = 504 (4TH AXIS)

When executed, this command will place the word 4TH AXIS next to the register for permanent common variable number 504.

Having a place to put your parameter value is, of course, only part of making a parameter work. You will also need a way to have the machine interpret the parameter value and behave differently based upon its setting. Custom macro B commands can be used for this purpose, since the allow conditional branching (IF statement). You can test the value of the home-made parameter with an IF statement and make the program execute differently based upon its setting.

The example I offer is related to placing a large fixture or rotary axis on a vertical machining center. When the and heavy fixture is on the machine, you may want the machine to behave differently than when it is not. You may, for example, want to ensure that tool changes do not occur directly over the fixture to avoid the possibility for collisions during tool changes. Or you may want to set a safe index clearance position in the Z axis, making the cutter automatically go to this position when an index is commanded.

It may also be helpful, if not necessary, to use user defined G and M codes for the purpose of keeping from having to modify programs. In the case of the tool change interference concern, we can modify the function of M06 so that the machine executes a special custom macro whenever M06 is executed in a machining program. Here is an example.

  • O9001 (Custom macro executed when M06 is read)

  • G91 G28 Z0 (Go to tool change position in Z)
    IF [#504 EQ 0] GOTO 80

  • G91 G28 X0 (If fixture is on table, move to X axis zero return position before tool change)

  • GOTO 99

  • N80 M06 (Perform normal function of M06)

  • M99

To use this custom macro, the setup person or operator will place a zero (0) or one (1) in permanent common variable #504 during setup. A value of zero tells the machine that the large fixture is not on the table. A value of one tells the machine that the fixture is on the table.

After the M06 user defined M code is created using parameter settings (see the custom macro section of your manual to see how this is done), whenever an M06 command is executed in the cutting program, the machine will execute program O9001.

The IF statement checks the current value of permanent common variable #504. If it is a zero, the machine will simple return the Z axis to its tool change position and make the tool change. If it is a one (or any other value), the machine will also send the X axis to its zero return position prior to making the tool change. We’re assuming, of course, that the fixture will be clear of the automatic tool changing device when the machine is at its X axis zero return position.

M01Top of page

Safety First: Generating alarms for dangerous situations

Custom macro B allows a programmer to place the machine in an alarm condition using system variable #3000. Consider this command.

  • #3000 = 100 (OFFSET TOO BIG)

If the machine executes this command, it will go into alarm state and place this message on the display screen.


The alarm number corresponds to the number next to #3000, and for most control models, must range between 100 and 255.

In addition to being able to generate alarms, a CNC programmer also has access to lots of CNC functions that may be involved with incorrect settings. The values of all offset registers, current axis positions, and current modal states (G code values and the most recent values of many other letter addresses like H, R, D, T, etc.) are among the many things that can be tested within custom macros.

Having this ability to generate alarms has some great implications. We can use it to error trap lots of dangerous situations. Think of times when operators have had crashes on your machines in order to come up with some situations you may be able to error trap.

Has someone incorrectly entered offset values when making sizing adjustments, possibly typing 0.1 instead of 0.01? Has someone ever incorrectly entered a tool length compensation or fixture offset value? Has someone started a cycle with the axes out of position?

Say a machine must be at its zero return position when the program is executed. If it is not, something bad will happen. Consider these commands:

  • O0001 (Program number)

  • IF [#5021 EQ 0] GOTO 5

  • #3000 = 101 (X NOT HOME)

  • N5 IF [#5022 EQ 0] GOTO 10

  • #3000 = 102 (Y NOT HOME)

  • N10 IF [#5023 EQ 0] GOTO 15

  • #3000 = 103 (X NOT HOME)

  • N15. . .

  • .

  • .

  • .

System variables #5021, #5022, and #5023 monitor current position relative to the zero return position in the X, Y, and Z axes respectively. If one is not zero, the machine is not at the zero return position in that axis.
Again, think of times when a machine has crashed. If a mistake caused the crash, it is likely that you can error trap it using these techniques so it will not happen again. With a little ingenuity, just about any mistake can be error trapped.


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.

ThirtyThirty hotel
Powered by Best Free Counters