top of page

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:

Basic machining practices

  • Machine configuration

  • Directions of motion (axes)

  • Programmable functions

  • Program zero (what it is, how to determine its location, and how it is assigned)

  • Visualizing program execution

  • Word types used in programming

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.


Machine configuration

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.


Programmable functions

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.


Program zero

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.

114 views0 comments

Comentarios


bottom of page