To subscribe: Simply email us (email@example.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.
New Format Gets Rave Reviews!
It seems we were needlessly worried about offending people by emailing this newsletter. The overwhelming response has been extremely positive. To everyone that responded: Thank you for letting us know what you think. We're very encouraged by your kind words.
We're always looking for ideas to publish. Many are drawn from our CNC Tech Talk forum. Questions needing answers always make great potential articles. If you have a tip for CNC users or educators that you would like to see published, be sure to let us know (simply respond, typing "Tip to be published" in the subject).
Again, thanks to everyone that took the time to respond. We sincerely hope you continue to enjoy this newsletter.
Instructor note: Teaching CNC with the Key Concepts approach - part two
Part two - Key concept number one: Know your machine from a programmer's viewpoint
In part one , we introduced the key concepts approach. You know that this approach allows you to organize all topics into logical and manageable segments, it minimizes the number of critical new ideas a student must master, it facilitates review, and it allows you to easily work from general (and easy to understand) to specific (filling in the details). To see the Spring 2004 issue of The Optional Stop and review part one of this article, click here.
Here in part two we're going to describe how you can relate material pertaining to key concept number one. In this key concept, you'll be presenting what a student must know about the CNC machine tool they are going to be working with. You'll be doing so from the perspective of a CNC programmer. What must a CNC programmer know about the CNC machine/s they will be working with? In this article, most specific examples are given for a vertical machining center. But again, all discussions can be easily modified to address any form of CNC machine tool.
Here is a list of the general topics that we include in key concept number one:
As with every key concept, the general presentations must work for any kind of CNC machine. But specific presentations will apply only to the kind of CNC machine tool/s you are describing in your class.
Basic machining practices
Indeed, this is the single most important topic a CNC programmer must master to be proficient. But it is probably a topic that is beyond the scope of most CNC classes (including ours). Most educators will consider the understanding of basic machining practices to be a prerequisite to a CNC class, as do we. Though this is the case, basic machining practice makes a great topic to begin with. Since your students will/should have some basic machining practice experience, you'll be able to start on a topic they already understand. This allows you to work from the known to the unknown, while letting students begin with a high degree of confidence.
I'll often say something like: "Machinists make the best CNC programmers." And "If you understand basic machining practices, you already know what you want the machine to do. It will be a relatively simple matter of learning how to tell the machine what it is you want it to do."
It is truly mandatory that a CNC programmer understand basic machining practices as they relate to the kind of CNC machine they will be programming. Without this understanding, the programmer will not even know what the machine is designed to do.
We recommend (quickly) reviewing those things about basic machining practice that are most important to CNC programmers, like the machining operations that can be performed on the machine, the cutting tools most commonly used, developing a sequence of machining operations (process), and cutting conditions. With machining centers, for example, you might review center-drilling, drilling, tapping, reaming, boring, and the various types of milling operations. With turning centers, you might review rough turning, rough boring, finish turning, finish boring, necking, and threading.
There are many machine configurations, even within a give category of machine type. Vertical machining centers, for example, are available in knee-style, bed-style, and bridge-style designs. The same goes for horizontal machining centers and (even more so) for turning centers. These variations, while sometimes subtle, will require different presentations. As always, be sure to begin in a general fashion, presenting the commonalities among machine types, at least with those machines addressed by your class.
In my machining center classes, for example, I'll begin by introducing both vertical and horizontal machining centers, and explain the reasoning behind each type (vertical and horizontal spindle).
While CNC programmers do not have to be machine designers, it helps if they can identify the major components of the machine/s they work with. With machining centers, for example, describe - and be sure students can identify - major components like the bed, column, headstock, spindle, ways, cross slide, table, automatic tool changer, and pallet changer. For turning centers, major components commonly include (slant) bed, headstock, spindle, turret, and tailstock.
Axis directions and polarity
This leads nicely to the moving components on the machine. But to help avoid confusion later, be sure to point out early on that for different machine types, different components move.
With a bed-type vertical machining center (also called a C-frame machine), point out that the table can move in two directions: left/right and fore/aft. As viewed from the front, left/right is called the X axis and fore/aft is called the Y axis. While left/right is always X and fore/aft is always Y, point out that with some machine types, the table does not move to form these axes. With a bridge (gantry) type machine, the table remains stationary and the headstock will move to form the X and Y axes.
In the same fashion, point out that the headstock can move up/down (again, for bed type vertical machining centers) and that this is called the Z axis. And again, with some machines (like some knee style machines) the headstock remains stationary and he table will move to form the Z axis.
Point out that each axis has a polarity. And it helps to identify polarity if the programmer views motion as if the tool is moving in each axis. With vertical machining centers, tool motion to the right is the X plus direction. Tool motion to the lefty is the X minus direction. Tool motion away from you is the Y plus direction. Tool motion toward you is the Y minus direction. Tool motion up is the Z plus direction. Tool motion down is the Z minus direction.
Again, be sure students understand that the tool does not move along with each axis (for most machining centers). For those axes in which that the tool does not move, polarity can be confusing. With a bed type vertical machining center, the table moves to form the X and Y axes (the tool remains stationary in X and Y). Table movement to the left is the X plus direction. Table movement to the right is X minus. This tends to be a major cause of confusion between programmers and operators since operators must know which way the machine will move when the plus/minus buttons are pressed.
Another thing all CNC programmers must know about the machine tool they program is the functions of the machine that are programmable. Again, point out that there are variations from machine to machine. Start with the commonalities. Most machining centers allow spindle, feedrate coolant, and tool changing to be programmed, so I start with them. I also introduce (but only introduce) the programming words related to each programmable function). If I know a given machine they will be working with has an additional programmable function (like a pallet changer), I'll describe it as well.
I also like to prepare students for variations. Again, some machines have more programmable features than others. Since most programmable features are handled with M codes, and since I've introduced a few M codes in the previous discussions, I'll tell students to always look in the machine tool builder's manual to find the list of M codes for any machine they will be programming. This will show them most of the machine's programmable functions.
If students become confused with the various programming words you've introduced, fall back. Point out that it is more important (at this early point in the class) to know what is programmable than it is to know the details of how each programmable function is handled.
Another major topic of key concept number one is program zero (which is also called part zero, work zero, and the program's origin). Students must understand that program zero is a reference position for the program. All coordinates (positions) within the program will be specified from this location.
I explain that in the early days of NC (well before computers were incorporated), a programmers had to know how many revolutions of the drive motor for an axis were needed in order to make the axis move a determined amount. This was extremely difficult. Thanks to program zero (and the rectangular coordinate system), today's programmers need not be concerned with these tedious calculations.
Instead, the programmer will be specifying coordinates relative to the program zero point. And if program zero is chosen wisely, coordinates can often be taken right from the blueprint.
Explain that the programmer determines the location of program zero. And in most cases, it will be placed at the same position on the workpiece from which all dimensions begin on the blueprint. I'll also point out that this position in each axis is also the location surface from which the setup person will locate the workpiece in the workholding device.
With program zero chosen, again, all coordinates in the program will be taken from this point. Be sure to point out the polarity for coordinates. Anything to the right of program zero is plus in X; anything to the left is minus. Anything in front of program zero in Y is plus; anything behind is minus. Anything above program zero in Z is plus, anything below is minus.
Also point our that whenever positions are specified from program zero, it is called the absolute mode of programming (G90). While I minimize my discussion of incremental programming at this early point in the class, I at least like to introduce the incremental mode (G91). Point out that positions can be specified from the tool's current location, which is called incremental programming.
This may be enough about program zero for now. But eventually, you'll have to explain how program zero is assigned. I like to say that "Just because you want program zero to be in a particular location doesn't mean the machine is going to know where this position is located once the setup is made. A conscious effort must be made to assign program zero."
When students are comfortable with the concept of program zero, explain how it is assigned for the machine type you're teaching (with fixture offsets on machining centers). I do so in the crudest (yet easiest to understand) method first: using an edge finder (with machining centers) to manually measure the distances between the machine's reference position (zero return) and the program zero point in each axis.
For the Z axis, this means you'll have to decide which method of using tool length compensation you'll be teaching (in key concept number four). We recommend using the tool's length as the offset value for tool length compensation. In this case, program zero assignment requires the setup person to measure the distance from the spindle nose (at the machine's reference position) to program zero in Z.
These (again, crude) measurements require manual manipulation of the machine and the use of the machine's position display page. It also requires the entry of measured values into fixture offsets. Go out to a machine in your lab and demonstrate how this is done.
Visualizing the execution of a CNC program
Again, point out that machinists tend to make the best CNC programmers. But even machinists may have difficulty sitting at a table or desk and writing a CNC program. Point out that a programmer must be able to "see" all functions and motions of the machine in their mind. I use an analogy to help explain this. I'll say something like "Consider developing a set of travel instructions to get a person from the local airport to your company. If you cannot visualize the path from the airport to the company in your mind, you cannot develop the travel instructions. Worse, if you think you can visualize the path but you're wrong, the person following your instructions will get lost". It's the same with a CNC program. If the programmer cannot visualize a tool path, they cannot write the program for the tool. Worse, if they think they can, but they're wrong, the tool is not going to move in the proper manner.
Introduction to word types used in programming
Finally, I like to at least introduce the various letter addresses used in programming, like N, G, X, Y, Z, R, S, F, M, and T. While you cannot expect students to memorize them, at least give them some kind of quick reference handout they can use to remember them as the class continues.
I'll also make some important programming-structure-related points at this point. I'll describe the meaning of modal, initialized, and non-modal (one-shot) words, the used of decimal point programming, and any limitations relative to how many words (like G codes) can be included in a single command.
Conclusion to key concept number one
Admittedly, this is the longest of the key concepts (you might want to point this out as you begin). And it is mandatory that students understand these points since you'll be building upon them as you continue with the class. Each session should begin with a review that allows you to reinforce students' understanding of these important points.
In part three of this article (next issue of The Optional Stop), we'll look at key concept number two: Preparation for programming.
Time saver: How To Quickly Mount Jaws In The Correct Serrations
Turning center setup people eventually master the placement of jaws on three-jaw chucks. But novices tend to spend a great deal of time using trial and error methods. The master jaws of most three-jaw chucks have tiny serrations into which the jaws (hard or soft) must be mounted. And unless you have a quick jaw-change chuck, two socket head cap screws are used to mount each jaw (six screws total). The same master jaw serration must be used for all three of the jaws.
The setup person won't know if one of the jaws is misplaced until after all three jaws are mounted. If a jaw is misplaced, all of the jaws must be removed and the entire process of mounting jaws must be repeated.
Many setup people count serrations to determine which serration each jaw must be mounted in. But of course, the setup person must first determine the diameter of the serration into which jaws must be placed. This is yet another source of mistakes that leads to repeating the entire jaw-mounting process.
The diameter at which to mount jaws
Since most hydraulic three-jaw chucks have a stroke of 0.25 or more, and since serrations are commonly 0.062 or less apart, three is a little flexibility when it comes to which master jaw serration is used (as long as all three jaws are mounted in the same serration). Most chuck manufacturers recommend having the chuck clamp on the workpiece close to the middle of the master jaw stroke. For this reason, knowing the jaw stroke is important for determining the diameter at which you want to mount jaws.
Say, for example, you have a chuck with a 0.25 inch stroke (0.5 diameter increase/decrease). And you're going to mount jaws with the chuck in its closed position (master jaws toward chuck center). Each jaw must be placed in the master jaw in such a way that its workpiece-contacting surface is 0.25 smaller (in diameter) than the diameter the jaws will be clamping on. This allows for half the jaw stroke. When the jaws are actually clamped on a workpiece, they will contact the workpiece in the middle of the chuck's stroke.
Again, this is for a chuck having a 0.25 stroke. For a chuck with a 0.375 stroke (0.75 diameter increase/decrease), you must mount each jaw in the master jaw in such a way that its workpiece-contacting surface is 0.375 smaller (in diameter) than the diameter the jaws will be clamping on.
If you want to clamp on a 3.0 inch diameter (again o.d. clamping) with a chuck having a 0.25 inch jaw stroke, first close the jaws (with no workpiece, of course). The jaw contact surface must be at a 2.75 diameter (again 0.25 smaller than the workpiece clamping diameter). With the workpiece-contacting surface of each jaw at this diameter, when you open the chuck, the jaw contact surfaces will be at a 3.25 diameter, which will allow the workpiece to be loaded. When you close the chuck on a workpiece, the jaws will contact the workpiece at the 3.0 diameter, and half way through their stroke.
Again, trying to figure out which serration to use that allows all of this can be very difficult, especially when you consider that there is no relationship between the contact surface of the jaw and the end of the jaw. But there is a simple way (actually two ways) to quickly determine where to mount jaws. Each requires that you determine the diameter at which the jaw contact surface will be when the chuck is completely closed as just described. For both o.d. and i.d. clamping, this diameter will be half the jaw stroke (in diameter) smaller than the workpiece diameter to be clamped - assuming you mount jaws while the chuck is in its closed position (master jaws toward chuck center).
Using a long boring bar
One simple and inexpensive way (though a little cumbersome) to easily mount each jaw in the same (and correct) serration is to use a boring bar as a pointer. The longer the boring bar, the more room you'll have to work. In essence, you'll be using the boring bar tip as a pointing device, synchronizing it with the X axis position display of the display screen.
One way to synchronize the boring bar with the position display is to bring the boring bar to a known diameter and then set the X axis display to this known diameter (most machines require that you do so on the "relative" page that shows U and W). Since most three-jaw chucks have a through-hole, it makes a great "known diameter". Simply measure the diameter of the through hole and keep it for future reference.
Say for your machine, there is a 1.500 diameter hole in the chuck. First bring the boring bar tip to this hole diameter. Then set the X axis display to X1.500. From this point, whenever you move the X axis, the X axis display will follow along, showing you the diameter at the boring bar's tip.
A better long term way (that eliminates the time it takes to bring the boring bar tip to the hole every time) involves determining the diameter of the boring bar when the machine is at the zero return position in X. This is the same as the boring bar's program zero assignment value (geometry offset) used for a program. After setting the boring bar to the known diameter as described above, send the machine to its zero return position in X. With the machine at the X axis zero return position, the display will show the diameter of the boring bar tip. Write this value down. Whenever you need to mount jaws (using this boring bar), simply send the machine to its X axis zero return position and then set the position display to this value.
Actually mounting jaws
After determining the diameter at which you need the jaw contact surfaces to be when the chuck is closed (again, this is the workpiece diameter minus half the jaw stroke in diameter), and after you have calibrated the boring bar tip to the position display using one of the methods shown above, move the boring bar in X until the X axis display is showing diameter you've calculated. Without moving X again, bring the boring bar in close to the chuck using the Z axis handwheel. This can be a little cumbersome, and again, the longer the boring bar, the more room you'll have to work.
Manually rotate the chuck (by hand) to bring one of the master jaws into close proximity to the boring bar tip ("up" for most slant bed machines). Place the jaw on the master jaw using the boring bar tip to target the jaw. You need the jaw's contact surface to be close to the boring bar tip. Now mount the jaw. Repeat this for the other two jaws.
Again, the only negative to this method has to do with the cramped space you have in which to work. You'll probably have to move the Z axis (again, don't move X) back to mount the jaw. And then forward to target the next jaw. We offer a device that eliminates this problem called the laser jaw setter. Please click the link to come to our website if you want to learn more about it.
A note about soft jaws
These techniques work great for hard jaws. But if you're going to be machining soft jaws once they are placed in the chuck, you'll need to do one more calculation. You must determine the diameter at which to place the current clamping surface of each jaw, allowing for the amount of material you will be machining from each jaw.
First, do the calculation shown above to determine where the finished jaw surface will be. Next, determine how much material you will be removing from the jaw. You don't have to be perfect, but approximate how much material you'll be taking off each jaw. As you look at a jaw that has been used before (but for a different job), say you think that about 0.100 inch must come off each jaw (0.200 diameter) in order to clean up the jaw for the new diameter it will be clamping on.
Finally, (for o.d. clamping), subtract this amount (0.200 in our case) from the diameter you previously calculated. In our example for the three inch outside diameter that requires the jaws (finished) contact surfaces to be placed at a 2.75 diameter, you will place the current contact surface of each jaw at a 2.55 diameter. Once mounted, and when you have clamped on a diameter about half way through the stroke (as you must whenever machining soft jaws), this will allow about 0.100 of material to be removed from each jaw to bring the jaw clamping surfaces to the desired clamping diameter (3.000 in our case).
Note that for i.d. clamping, you must increase the jaw placement diameter by twice the amount of stock you expect to remove from each jaw.
While it may take some practice to master the techniques shown in this article, this will dramatically simplify the task of jaw mounting. And whether you use a boring bar or our laser jaw setter to target jaw placement, you will remove the guesswork from this task.
G-code primer: Applications For G53
For Fanuc and Fanuc-compatible controls, G53 will allow you to make (rapid) motions in the machine coordinate system. The origin for the machine coordinate system is the zero return position for each axis. Note that G53 is a non-modal (one-shot) G code, meaning it only takes effect in the command that includes the G53. The command
for example, will cause the machine to rapid to its zero return position in the X and Y axes.
With most machines, the zero return position is placed very close to the plus over-travel limit in each axis. This means that actual coordinates in the G53 command will normally be negative.
Here are a few applications for G53.
Another way to send the machine to its zero return position
As described in the last issue of The Optional Stop (Spring 2004), the zero return command is a rather difficult command to understand and somewhat cumbersome to use. Many programmers prefer to use G53 to send the machine to its zero return position. The command
will rapid the X, Y and Z axes to the zero return position (simultaneously).
A safe index position
For turning applications, you can specify a common safe index position for each tool. If for example, you determine that the turret can safely index when it is 5.000 inches to the left of (Z-) and 4.0 inches below (X -) the zero return position, you can give this command at the end of each tool to send the machine to the safe index position:
A pallet change position for manual pallet changers
Some machining centers are equipped with manual pallet changers. Like automatic pallet changers, these pallet changers require that the machine's X and Y axes be in a particular position before the pallet change can occur. But unfortunately, the pallet change position for manual pallet changers is usually in an arbitrary position (not the G28 position).
If, for example, you determine that the pallet change position is 10.2746 to the left of (X minus) the zero return position in X and at the zero return position in Y, the command
will send the machine to its pallet change position.
Commanding tailstock motion on turning centers
Some (though not many) turning centers make their tailstocks move by dragging it along with the Z axis. This means you must first move the Z axis to the tailstock's current position, engage the tailstock. Then you can make the Z axis motion to move the tailstock. Using G53 can dramatically simplify keeping track of the tailstock's current position.
Truly, any time you find it convenient to command motion relative to the zero return position is a good time to use G53. It helps you avoid having to know the distance/s from the program zero point in a program to the zero return position.
Parameter Preference: How Does Your Machine Rapid?
Parameters control countless things about the way your CNC machine tools behave. In each Parameter Preference segment, we will expose a parameter that has an important impact on how your machines run. But first, a disclaimer. Parameters vary from one Fanuc control model to another - as do the actual functions they control. Always check in your Fanuc Operators manual and/or Maintenance manual to confirm the parameter number and settings we show. Never blindly change a parameter! If there is any doubt about what the parameter does, contact your machine tool builder to learn more.
Rapid motion (also called positioning) is one of the most basic motion types. It is specified, of course, by G00 and will cause the machine to move as quickly as it can to the commanded position. But when more than one axis is commanded, how the machine moves is selected with a parameter setting.
Look at the drawing that follows:
Notice that there are two ways that the tool can get from the start point to the end point. Fanuc calls them linear and non-linear. With a linear motion, the control will cause the tool to move along a straight line from the start point to the end point (just like G01).
With a non-linear motion, all axes will be free to move as fast as they can from the start point to the end point. If the motion does not require the same distance in one axis as the other, or if the rapid rate is different for one of the axes, one axis (in our case, Y) will arrive at the end point first. The machine will continue in any other axes until all axes arrive at the end point.
The vast majority of machines that I have seen have the parameter set for non-linear motion, which may be a little faster than linear motion. But non-linear motion requires the programmer to be extra cautious when generating rapid motions close to obstructions. So you might prefer to have your machines set for linear motion. Again, a parameter controls which motion method is used.
Finding the parameter
Frankly speaking, Fanuc does not always make it very easy to find parameters - or to understand their meaning. And remember, parameters vary from one control model to another. Whenever looking for a parameter, or if you're questioning whether a parameter is related to a given machine function, I recommend first looking in the Fanuc Operators Manual in the section that describes the feature in question.
In our case, I'm looking in the Fanuc 15M Operators Manual in the section that describes G00. As is common with Fanuc, the description is a little cryptic. It goes like this:
The tool path can be selected from either of the following by parameter LRP (data number 1400):
A drawing similar to the one above is then provided that shows the difference between linear and non-linear rapid motion.
In the first paragraph, the parameter is being specified (LRP in data number 1400). So next, we must find the list of parameters for the control in question (in our case, the 15M).
When looking at parameter number 1400 in the parameter documentation for a 15M control, I find that parameter LRP is bit number four (the fifth bit from the right of this eight-bit binary-type parameter). Note that the abbreviation (LRP in our case) usually stands for something, but Fanuc never specifies what. I'm assuming it stands for linear rapid positioning.
According to the documentation if this bit of parameter number 1400 is set to a one (1), the machine will perform linear positioning. If it is set to a zero (0), the machine will perform non-linear positioning. So if you want your machine to position with linear motion, set this parameter to a one. If you want non-linear positioning, set it to a zero.
Manager's corner Two CNC Proficiency tests
Managers and Human Resources people are the ones responsible for hiring CNC people. Many have asked us is there are any test available to help gauge the proficiency of applicants - either those applying from outside the company or those being transferred/promoted from within the company. These two tests do just that. There is one for machining centers and another for turning centers.
As stated, these are proficiency tests, not aptitude tests. We're confirming that the person being interviewed has the CNC experience they claim to have. We're not testing to see if a person will have the ability to work with CNC. If, of course, the applicant admits that they have no previous CNC experience, these test should not be used.
Here is a link to our website and the page that includes the two tests. Note that they are in Adobe Acrobat (pdf) format, so you must have Adobe Acrobat Reader installed on your computer to view/print them.
Safety Tip: You Say You Can't Find A Way To Dry Run?
Some machine tool builders make it easier than others to take control of the motion rate for axis motions. This is especially important during each tool's first approach movement when the tool will be approaching to within but a small distance from the workpiece (usually 0.1 inch or 2.5 mm). During this approach movement which is commonly programmed with a G00 rapid command, you must be able to slow the motion rate to a crawl in order to confirm that the tool will truly stop when it is supposed to.
Most machine tool builders supply a "rapid override" function. But with most machines, you can only slow rapid motions to about 10% of rapid. For a machine that has a rapid rate of 800 inches per minute (not an exceptionally fast rapid rate for today's machines), that's still 80 ipm! This is too fast for verification purposes.
Fortunately, most machine tool builders provide another way to take control of all motions (including rapid and cutting motions) called dry run. When dry run is turned on with these machines, a multi-position switch like feedrate override or jog feedrate will be used to control motion rate.
To safely approach with a given tool using dry run, first turn on dry run and single block and turn the multi-position switch (again feedrate override or jog feedrate) down to its lowest setting. Press the cycle start button repeatedly until the machine starts moving. Turn up the multi-position switch until you feel comfortable with the motion rate. Keep a finger ready to press the feed hold button to stop motion if you get worried. It also helps to monitor the distance-to-go page of the display screen (commonly part of the program-check display page).
With this method, if the tool is within a half inch of the surface to approach and you get nervous, you can press the feed hold button. Look at the distance-to-go page. If it shows more than a half inch to go, the tool will crash into the workpiece if you let it finish the motion.
Once the tool is in position, turn off the dry run switch. If the program has been run before, you can probably also turn off the single block switch. When you press the cycle start button, the tool will be allowed to machine the workpiece.
Programming a fast feed approach
We've seen some machines that do not behave in this manner. We've even seen machines that do not provide the dry run function at all. Again, you must have a way to slow motions to a crawl as the tool gets close to the workpiece. If you cannot find a way to do so, here's a programming technique that will help.
First, rapid the tool to within a safe distance of the surface to approach (like 1.5 to 2.0 inches). Then, program the balance of the approach movement (commonly to within 0.1 inch of the surface) with a G01 command including a fast feedrate of, say, 50.0 ipm. Here's an example that brings the tool within 0.1 inch of the Z0 surface.
With this technique, you'll be able to safely control motion to within 2.0 inches of the surface with the rapid override switch. For the balance of the approach (line N090 in our example), you can use the feedrate override switch to control motion rate. If your feedrate override switch allows slowing to 10%, you'll be able to slow motion to 5.0 inches per minute. And in production, this motion will be made relatively quickly (at 50 ipm in our example).