Shape Your World
Chris Lopez is a CAMWorks Application Engineer with soluble oil for blood. A fourth-generation machinist, his experience on the shop floor brings context to GoEngineer’s technical team. When not cutting chips and scrapping parts, Chris can usually be found at the nearest hackerspace, stretching … More »
Computer Numerical Control Basics for Non-Machinists
January 6th, 2015 by Chris Lopez
During my travels as a CAMWorks Application Engineer, I’ve instructed many training classes to diverse groups of machinists, designers and engineers. Frequently while teaching, I notice a striking challenge in terms of context for those lacking adequate machine shop experience. This can be difficult during training, considering how much artistry and background is required to skillfully work with CNC machinery. While CNC’s can be unforgiving dangerous machines in the wrong hands; there is really not much magic to understanding the essentials. CNC is similar to driving a car, or more accurately, using a giant 3-Dimensional, computerized Etch-A-Sketch, except with giant spinning blades and twenty horsepower motors.
CNC combines a few layers of abstraction that can make the machine shop seem like a foreboding land of unicorns, dragons, and grey-bearded wizards. While there is good reasoning to retain that perception, and as long as a CNC machine is understood and respected, a basic understanding of the said wizardry can go a long way to making better parts, much faster than your 3D printer could ever dream of. In other words, before operating any new heavy machinery, please thoroughly review the operating manual. CNC machines can be man-eaters, if used carelessly. The first layer of abstraction is hardware: the CNC machine itself, tooling, fixturing, materials, alloys, coolant, etc. “How much of a cut can I make with this tool?” is a good question to start with.Generally, you want the largest, shortest tool possible to do the job. Large tools make heavier cuts, and short tools are more rigid. The key to effective machining is Rigidity. That’s the reason metalworking machinery, and the diversity therein, is so huge – all that rigidity in a 5 ton casting is needed to cut titanium away at 500 MPH. Keep in mind your tool geometry, especially in terms ofDesign for Manufacturing. For example, “Does this corner really need such a small radius? How am I ever going to fit a tool in that contour?” Cutting speed and feed is an important parameter relating to tool selection, material type, rigidity, and end use of product. Speed is how much linear distance passes the cutting edge, a function of cutter diameter and RPM. This is usually expressed in terms of Surface Feet per Minute. Feed is how far the tool advances into the material (in terms of Inches Per Minute, or Inches Per Revolution for turning). Both of these numbers factor into what I’d call the single most important parameter of machining – Chip load or how much material each tooth of the cutter removes per revolution. Guidelines for feed and speed recommendations are available from your tooling manufacturer, or from a quick Google search. There’s also a Feed and Speed library that comes pre-installed with CAMWorks to give you a conservative baseline feed and speed value automatically.Feed rate and Depth of Cut are parameters that change based on setup, tool geometry, material quality, and sometimes the position of the Moon and Jupiter. Making changes to speed and feed is where the artistry and experience of your operators is most beneficial, to have them listen to the music of the cut, to read the chips and make changes to cutting parameters accordingly. Start slow and conservative, ramping up speed and feed until chatter or tool breakage occurs and then back off a little bit. Counterintuitively, sometimes it helps to cut material faster and deeper in order to break chips better or to more fully utilize the cutting tool’s geometry. For more information about maximizing cutting routines, take a look at the Volumill add-in for CAMWorks.The second layer of abstraction for understanding CNC is code. Most CNC machines operate using a dialect of G-code. G-code, as a standalone language and is messy, abstract, and non-standardized. In order to make sense of ANY CNC program, the G code must be legible and readable to a human. With a few basic pointers, G-code can be interpreted by humans with relative ease as long as you know what to look for. There’s only a few places in the code where there are interesting things happening. At the beginning of a program, there are “preparatory codes” and “safety codes”, clearing out any memory and registers, as well as setting the work planes and unit system. At the beginning of the program, you might see a line that says, “G00 G17 G20 G40 G49 G80 G90”, which is usually interpreted in FANUC format as: “Rapid motion / XY plane selection / inch units / cutter compensation cancel / cutter length cancel / canned cycle cancel / absolute positioning”, basically setting the defaults for the following program. Not all of these codes are needed, but they do have an important function, especially for advanced use. Any time you see a command “Tx M06”, that’s a tool change. As a measure of good practice, this is usually preceded by a M01 line, for an optional stop before the tool change (just make sure that the optional stop button is active on the control) During a tool change, the tool needs to: retract to a safe position (G28 Z0.), turn the coolant off (M09), index the spindle, index the tool changer, swap tools (M06), turn on the spindle and coolant (S2000 M03; M08), call diameter and height values (G41 Dx; G43 Hx), and go!The most important command in the code is G54, which stands for “Work Offset #1”, usually found after tool changes. This value designates where in 3D space the program origin is located, or where X0 Y0 Z0 is located in Cartesian coordinates. Some machines call out the origin in different ways, sometimes using an E word on Fadal machines, or sometimes using extended work coordinates like “G54.1 P101”. You can adjust these values in CAMWorks by double-clickingMill Part Setup in the Operation Tree. On programs with multiple work pieces, you can use multiple work offsets in “Assembly mode”. Everyone programs a little differently, but I generally like to set Z0 at the top surface of the part. That way, glancing over the code you can get an accurate idea of how deep a tool is based on the Z value on the line. Remember, certain commands are modal. You can also see at a glance what the cutter is doing. Any time you see a G1, G2, or G3 command at the beginning of a line, that indicates a feed move, where the cutter should be engaged in the work piece. When you see the code change to G0, that’s a rapid move, indicating that the tool is moving to a new location, generally while the tool is above the part. That will give you an idea of where the cutter is in space and in the program.While CAMWorks Virtual Machine can take much of the headache out of proving out a large G-code program, as a baseline, all code needs to be human readable, and more importantly, humanunderstandable in order to make good parts.
Hankering to cut some chips? GoEngineer provides a custom-tailored CAMWorks training course, and can help you put the pedal to the metal, without all the meddling.