Banner

Issue 70
Winter 2006
Copyright 2007

In this issue:
  1. On-line courses update: Here's how it works...
  2. G-code primer: Some special features of G76 (threading command)
  3. Instructor note: Mastering the presentation of CNC skill sets
  4. G code primer: Which fixture offset should I use?
  5. Macro maven: Using the machine's current absolute position in a custom macro
  6. Parameter preference: Limiting offset changes on turning centers

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: Our on-line classes - Here's how it works...

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 format for our on-line courses is quite consistent for all courses. We're using the on-line training platform from UniversalClass.com. If you haven't already done so, check out this site. It is truly amazing. There are countless classes you can take that relate to just about any conceivable topic (though few are related to CNC or manufacturing). UniversalClass.com provides a robust virtual classroom environment, one that will allow us to relate all course material with ease. And since our classes are on-going and self-paced, you can start immediately - as soon as you enroll!

Here's what you'll be doing during the class. Activities include:

  • Viewing PowerPoint presentations - Every lesson includes a colorful and animated, self-navigating PowerPoint presentation. These presentations (.ppt files) will provide you with graphic visuals and help you understand the most complex course topics. You'll control the pace for these presentations each step of the way. And you can view them as many times as you must in order to fully understand the content! Special note: In order to view the course visuals, you must download Microsoft PowerPoint Viewer and install it on your computer.
  • Reading lesson text - Every lesson contains a comprehensive Adobe Acrobat (.pdf) file that you can view and print. This provides you with a permanent reference for course materials during the class and long after the class is over. If you print everything, you'll have a manual that contains over 200 pages! Special note: In order to view and print lesson text, you must download Adobe Reader and install it on your computer (if you don't already have this reader).
  • Reading supplements (also .pdf files) - For some lessons, there will be supplemental information that will explain CNC features that are beyond the scope of the class. This will give you a way to learn about many additional CNC functions.
  • Taking class polls - For some lessons, you'll be asked to give your opinion about a topic of interest. And you'll see what other students in the class think.
  • Taking on-line tests (graded)- After you study each lesson, and when you think you're ready, you'll take a test for the lesson. Tests include true/false, multiple choice, and fill in the blank questions. This is one of two ways we confirm your understanding of the material in the lesson. Grading is automatic and you'll see your results immediately. Mike Lynch reviews your tests and will provide pointers and suggestions in areas that may be causing you trouble.
  • Doing practice exercises - In some lessons, you'll be asked to do a practice exercise (answers provided right in the exercise) to help prepare you for the programming assignment. Practice exercises are not graded.
  • Doing programming assignments (graded)- for many of the lessons, you'll be asked to do a programming assignment. This is the second way that we confirm your understanding of material. You actually submit your programming assignments for Mike Lynch to grade. Results will be posted for you to see on-line. And again, Mr. Lynch will be offering reinforcement to help you stay on track.
  • Participating in the class forum - UniverClass.com provides a special forum for this class. Though it is not actually part of the class material, it will allow you to ask questions and share ideas with others in the class, as well as with Mike.
  • Asking questions - Whenever you're confused, Mike encourages you to email him with your questions.

Remember, these courses are self-paced. You'll be progressing through the course as quickly or slowly as you like. You control the pace. Once you enroll in the class, you'll begin (of course) with lesson one. We want you to get the most out of this course, so we require that you complete all activities in one lesson one before you'll be allowed to continue with the next.

End of article (M01)

Top of page

G code primer: Some special feature of G76 (the threading command)

Fanuc's threading command is pretty powerful - and very helpful. It will allow you to completely machine a thread with one command in your program, regardless of how many passes the threading tool must make. The G76 command is given after the threading tool approaches the diameter to be threaded - away from the diameter in Z and above or below the diameter in X (above for outside diameter threads and below for inside diameter threads).

Though the actual words given for G76 will vary even among Fanuc controls, the functions they control include:

  • Major/minor diameter of the thread (major for ID threads and minor for OD threads) - This is done with the X word for all Fanuc control models.
  • End point for threading - This is done with the Z word.
  • Total thread depth - This is a radial value (again, actual thread depth) and is done with either the K word or P word depending upon control model.
  • Depth of first pass - This controls how many passes will be made. The machine will make shallower and shallower successive passes. The word that controls this could be a D word or Q word, depending on model.
  • Thread pitch - Done with the F word with all control models, this controls the feedrate for threading.
  • Tool angle - This specifies how the thread will be machined. If this value is specified, the control will machine on only the front side of the threading insert (as is normally desired). If this value is not specified, the tool will machine on both sides of the insert (plunging straight in). An A or P word specifies tool angle, depending upon model.

Again, the functions just described are pretty basic, and consistent from one thread to another. Here is an example command that machines an OD thread (approach position is above X value in threading command).:

  • O0016 (Program number)
  • N005 T0505 M41 (Select external threading tool and low spindle range)
  • N010 G97 S500 M03 (Start spindle fwd at 500 rpm)
  • N015 G00 X5.7 Z-0.8 M08 (Rapid to convenient starting position, start coolant)
  • N020 G76 X5.392 Z-1.88 K0.054 D0100 A60 F0.0625 (Chase 5.5-16 thread)
  • N025 G00 X8.0 Z6.0 (Rapid to safe index position)
  • N030 M01 (Optional stop)
  • .
  • .
  • .

If you have been using the G76 command on a regular basis, so far we haven't told you anything new. But there are some special, lesser-known functions of G76 that we'd like to relate.

Taper threading

When machining a taper thread, of course, the tool must make a tapered move when threading. The amount of taper is specified with an I word or R word, depending upon control model. This word does not specify the taper angle. Instead, it specifies the distance and direction from the end point of the thread to the start point of the thread along the X axis. For OD threads, this value will be negative - for ID threads, it will be positive (assuming you are machining in the negative Z direction, as is normally the case).

To calculate the value of this word, you must know the taper angle, which is 3.718 degrees for National Standard threads. You multiply the tangent of the taper angle times the total distance in Z that the tool will be moving during each pass (including approach).

Multiple start threads

Some controls require that you specifies more than one G76 command when machining a multiples start thread (one for each thread start. This requires a Z axis movement between threading commands. The amount of movement is the pitch of the thread (total lead divided by the number or thread starts). For a four-start thread with a 0.5 inch overall lead, the pitch is 0.125.

In some cases, it may not be possible to move in Z between passes (consider a thread at the end of the workpiece that is supported by a tailstock). And the extra motion does take time, making for a somewhat inefficient cycle.

Newer controls have overcome these two limitations. A Q word in each G76 command specifies the angle of entry for the treading tool. For a four-start thread, an example set of Q words is Q0, Q90.0, Q180.0, and Q270.0.

Not always programmable

There are some thread functions you should know about that may not be programmable. They are only programmable for control models that use a two-line G76 command (many 0T controls use this method). For controls that use the one-line G76 command, a parameter controls the function. If you want to change its value, you must change a control parameter.

  • Number of spring passes - This function, which is controlled by a P word for those controls that allow it to be programmed, controls what happens after the thread has been machined to its final depth. If left out, or if the value is zero, the machine will simple stop threading, ending the cycle. But if this value is set to something greater than zero, the control will continue, with each successive pass being of zero depth. These passes, which are commonly referred to as spring passes, allow tool pressure to be relieved.
  • Chamfer amount - This function, which is controlled by a P word for those controls that allow it to be programmed, controls how the tool pulls away from the thread at the end of each pass. If set to zero (or left out of the command), the tool will move to the value specified by the Z word (end point of the thread) and pull straight away in the X axis. If this value is greater than zero, the tool will come to within this value of the thread's Z end point and begin angling out at a 45 degree angle. For most threads - especially those with a thread relief groove, it is best to leave this value at zero.
  • Minimum depth of cut - As stated, the machine will proceed to make shallower and shallower passes. This value provides a cutoff point, from which passes do not get any deeper. This function is controlled by a Q word for those controls that allow it to be programmed.
  • Final pass depth - This value is specified by an R word for those controls that allow it to be programmed.
End of article (M01)

Top of page

Instructor note: Mastering the presentation of CNC skill sets

Our CNC Curriculums help you teach how to master all three skills needed to become a proficient CNC user:

  • Programming - the task of developing a manual (G code level) program
  • Setup - the task of getting a CNC machine ready to run production
  • Operation - by operation, we mean two things: the general task of running the machine as well as the task of completing a production run once a setup has been made

When a student completes your CNC course, they will posses the basic skills needed to begin working with all three facets of CNC machine tool usage. We start with programming and work our way toward setup and operation. This method works best for students intending to master all three skills.

There are many presentations made during the programming portion of the course that apply to setup people and/or operators. For example, a programmer must understand that program zero it the location from which all coordinates in the program are taken. But a good programmer should also know how program zero is assigned. In many companies, program zero assignment is the responsibility of the setup person. But since a CNC programmer must be able to direct the CNC setup person (providing setup sheets and help to setup people at the machine), we include this presentation during our discussion of programming.

This is but one example. All through the programming discussions, we present implications related to setup and operation. When the student finishes the programming portion of your course, they will already know many of the principles related to setup and operation.

While our curriculums have been designed to teach all three skills, we know that you may want to keep some of your classes may be more basic. You may, for example, want to teach a class on setup and operation - or just operation. For this reason, our curriculums include some special help for these situations.

  • The lesson plans specify those topics in each lesson that are related only to setup and/or operation, making it easy to skip topics solely related to programming.
  • The slide presentations include special links to topics related only to setup and operation.
  • The lesson plans suggests labs and special exercises for people not interested in learning programming.

Here are two links to the Lesson Plans Manuals Again, note how much emphasis is placed on mastering each skill.

Along with our Key Concepts approach, these functions make it easy for a CNC instructor to teach all three skills in one class or to pick and choose those skills they want to cover.

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

G code primer: Which fixture offset should I use?

This is a question that recently appeared in the CNC Tech Talk forum on our website.

As you know, Fanuc controlled CNC machining centers use fixture offsets to assign program zero. You'll have at least six fixture offsets, though Fanuc provides an option to get more. For most applications, especially with machines that do not have a rotary device (indexer or rotary axis), six is more than enough.

When your machine has six fixture offsets, they are instated by a series of G codes, ranging from G54 for fixture offset number one through G59 for fixture offset number six.

In many applications, only one fixture offset is required - and if this is the case, we recommend using fixture offset number one (instated by G54). The reason why we recommend this that when you power up the machine, it automatically instates G54. That is, G54 is initialized. Should you forget to include a G54 in the program, the machine will still select the correct fixture offset.

End of article (M01)

Top of page

Macro maven: Using the machine's current absolute position in a custom macro

One of the application categories for custom macro is user created canned cycles. In this category, you're creating your own canned cycle. As you know, most control-based canned cycles (like G81 - drilling) can use the machine's current position for certain things within the canned cycle. With G81 for example, if you leave out the X and Y value (hole center position), the machine will assume that the hole will be drilled in the current XY position. With three special system variables, you too can access the machine's current absolute position and use it from within your custom macros.

  • #5001 - current absolute position in axis one (X for machining centers)
  • #5002 - current absolute position in axis two (Y for machining center)
  • #5003 - current absolute position in axis three (Z for machining centers)

Let's look at an example. Here is a custom macro for thread milling from issue 62 of The Optional Stop newsletter.

  • O1000 (Thread milling custom macro)
  • (SET DEFAULT MILLING STYLE TO CLIMB MILLING)
  • IF [#13 NE #0] GOTO 1
  • #13=0
  • (TEST FOR MISSING ARGUMENTS)
  • N1 IF [#24 EQ #0] GOTO 95 (X)
  • IF [#25 EQ #0] GOTO 95 (Y)
  • F [#26 EQ #0] GOTO 95 (Z)
  • IF [#18 EQ #0] GOTO 95 (R)
  • IF [#7 EQ #0] GOTO 95 (D)
  • IF [#20 EQ #0] GOTO 95 (T)
  • IF [#9 EQ #0] GOTO 95 (F)
  • IF [#1 EQ #0] GOTO 95 (A)
  • IF [#17 EQ #0] GOTO 95 (Q)
  • (A MUST BE BIGGER THAN HALF OF T)
  • IF [#1 GT [#20/2 +0.1]] GOTO 2
  • #3000=101(APPROACH RADIUS TOO SMALL)
  • (RAPID TO APPROACH POSITION)
  • N2 G00 X#24 Y[#25 + #7/2 - #1] Z#18
  • (FAST FEED TO STARTING Z POSITION)
  • G01 Z#26 F[#9 * 5] (TEST FOR CLIMB VS CONVENTIONAL)
  • IF [#13 EQ 0] GOTO 10
  • (CONVENTIONAL MILL SETTINGS)
  • #100=[0-1] * [#1 - #20/2]
  • #101=#1 - #20/2
  • #102=2 (Motion type G02)
  • #103=0-1 (Polarity for stepping Z is minus)
  • GOTO 11 (CLIMB MILL SETTINGS)
  • N10 #100=#1 - #20/2
  • #101=[0-1] * [#1 - #20/2]
  • #102=3 (Motion type G03)
  • #103=1 (Polarity for stepping Z is plus)
  • (MOTIONS TO MILL THREAD)
  • N11 G01 X[#24 + #100] F#9
  • #26=#26 + [#103 * #17/4] (Step Z by 1/4 pitch)
  • G#102 X#24 Y[#25 + #7/2 -#20/2] Z#26 R[#1 - #20/2]
  • #26=#26 + [#103 * #17/2] (Step Z by 1/2 pitch)
  • Y[#25 - #7/2 + #20/2] Z#26 R[#7/2 - #20/2]
  • #26=#26 + [#103 * #17/2] (Step Z by 1/2 pitch)
  • Y[#25 + #7/2 -#20/2] Z#26 R[#7/2 - #20/2]
  • #26=#26 + [#103 * 17/4] (Step Z by 1/4 pitch)
  • X[#24 + #101] Y[#25 + #7/2 - #1] Z#26 R[#1 - #20/2]
  • G00 X#24 Z#18
  • GOTO 99
  • N95 #3000=100 (INPUT VALUE MISSING)
  • N99 M99 (End of custom macro)

Again, how this custom macro works is presented in an earlier issue. Please see issue 62 if you want to learn more about it.

With this custom macro in its current form, X and Y are used in the G65 command to specify the hole center. They are currently mandatory variables - an alarm will sound if they are not specified in the G65 command.

Say you want the this custom macro to behave more like a G81 canned cycle. If X and Y are left out of the call statement, you want the custom macro to assume that the hole center in X and Y is at the machine's current XY position. Here is the custom macro again, modified to use #5001, #5002, and #5003 that will do this.

  • O1000 (Thread milling custom macro)
  • (ATTAIN CURRENT XY POSITION)
  • IF[#24 NE #0] GOTO 1
  • #24=#5001
  • N1 IF[#25 NE #0] GOTO 2
  • #25=#5002
  • (SET DEFAULT MILLING STYLE TO CLIMB MILLING)
  • N2 IF [#13 NE #0] GOTO 3
  • #13=0
  • (TEST FOR MISSING ARGUMENTS)
  • N3 IF [#24 EQ #0] GOTO 95 (X)
  • IF [#25 EQ #0] GOTO 95 (Y)
  • F [#26 EQ #0] GOTO 95 (Z)
  • IF [#18 EQ #0] GOTO 95 (R)
  • IF [#7 EQ #0] GOTO 95 (D)
  • IF [#20 EQ #0] GOTO 95 (T)
  • IF [#9 EQ #0] GOTO 95 (F)
  • IF [#1 EQ #0] GOTO 95 (A)
  • IF [#17 EQ #0] GOTO 95 (Q)
  • (A MUST BE BIGGER THAN HALF OF T)
  • IF [#1 GT [#20/2 +0.1]] GOTO 4
  • #3000=101(APPROACH RADIUS TOO SMALL)
  • (RAPID TO APPROACH POSITION)
  • N4 G00 X#24 Y[#25 + #7/2 - #1] Z#18
  • (FAST FEED TO STARTING Z POSITION)
  • G01 Z#26 F[#9 * 5]
  • (TEST FOR CLIMB VS CONVENTIONAL)
  • IF [#13 EQ 0] GOTO 10
  • (CONVENTIONAL MILL SETTINGS)
  • #100=[0-1] * [#1 - #20/2]
  • #101=#1 - #20/2
  • #102=2 (Motion type G02)
  • #103=0-1 (Polarity for stepping Z is minus)
  • GOTO 11
  • (CLIMB MILL SETTINGS)
  • N10 #100=#1 - #20/2
  • #101=[0-1] * [#1 - #20/2]
  • #102=3 (Motion type G03)
  • #103=1 (Polarity for stepping Z is plus)
  • (MOTIONS TO MILL THREAD)
  • N11 G01 X[#24 + #100] F#9
  • #26=#26 + [#103 * #17/4] (Step Z by 1/4 pitch)
  • G#102 X#24 Y[#25 + #7/2 -#20/2] Z#26 R[#1 - #20/2]
  • #26=#26 + [#103 * #17/2] (Step Z by 1/2 pitch)
  • Y[#25 - #7/2 + #20/2] Z#26 R[#7/2 - #20/2]
  • #26=#26 + [#103 * #17/2] (Step Z by 1/2 pitch)
  • Y[#25 + #7/2 -#20/2] Z#26 R[#7/2 - #20/2]
  • #26=#26 + [#103 * 17/4] (Step Z by 1/4 pitch)
  • X[#24 + #101] Y[#25 + #7/2 - #1] Z#26 R[#1 - #20/2]
  • G00 X#24 Z#18
  • GOTO 99
  • N95 #3000=100 (INPUT VALUE MISSING)
  • N99 M99 (End of custom macro)

The highlighted commands provide the desired function. If either or both of X and Y are left out of the call statement, the values of #24 and/or #25 will be set to the machine's current absolute position in X and/or Y.

End of article (M01)

Top of page

Parameter preference: Limiting offset changes on turning centers

A very common mistake when operating a CNC turning center is misplacing a decimal point. When changing offsets, such a mistake can be disastrous. If an operator means to type 0.001 and instead types, 0.1, at the very least, a workpiece will be scrapped. Worse, the machine could crash.

While there is no way to eliminate mistakes, you do have a way to minimize the amount of offset amount per entry. With most Fanuc controls, a parameter determines the maximum amount of offset entry. If a value greater than the offset amount is entered, with most machines, nothing happens. With newer machines, a message appears in the entry area to tell the operator that they entered too large a value.

Finding the parameter

As with all parameters, it can be difficult to find the parameter in question. Look in the list of parameter functions for parameters that control tool offset and start scanning. With a 16T control it happens to be parameter 5014, and its description is: Maximum value of incremental input for tool wear compensation. Again, the parameter number and description will vary from one Fanuc control model to another.

For this particular parameter, you'll be entering the actual value to which you want to limit offset entry. Note that most controls do not allow a decimal point in this value and the value must be specified with a fixed format. If you're working in the inch mode (G20), a value of 0200 specifies 0.020 inch, which is what we'd recommend that you set the parameter to. In the metric mode, a value of 500 specifies 0.50 mm. (Note that in the inch mode you work with a four-place fixed format - in metric mode you work with a three-place fixed format.

End of article (M01)

Top of page