- Tim on Hybrid Machining: Combining Additive and Subtractive in One Machine
- Rick Linnabary on The CNCCookbook Software Giveaway is Ending Soon!
- Michael on Standard Work and Takt Time: Lean Manufacturing Principles Part 5
- Bob Warfield on The CNCCookbook Software Giveaway is Ending Soon!
- Brad on The CNCCookbook Software Giveaway is Ending Soon!
If you’re wondering why it’s been a while since there’s been a new G-Wizard Calculator or G-Code Editor (and Simulator) release, it’s because I’ve been buried under a mountain of code working feverishly (yeah, I had the flu too, BTW) on canned lathe cycles for the G-Wizard G-Code Editor. These little beauties are almost like having a mini-CAM program buried in your CNC Controller. In fact, I know a number of machinists who don’t bother too much with Lathe CAM because they have tools like this to simplify their jobs. The good news is the canned lathe cycles can save you a lot of work, the bad news is they’re devilishly complicated to implement in a controller, or in a simulator like GWE. You really do wind up doing some CAM-like things that can force you to break the mold on a few ideas and reimplement to support what’s required.
What is G71? It’s a rough turning and boring cycle. Imagine being able to provide a profile, depth of cut, and a few other parameters, and have the controller figure out how to make the passes needed to deliver that profile. That’s more or less what G71 does, hence it’s kind of like CAM. In this case, you specify your profile using g-code instead of a DXF or other CAD file, so it isn’t quite as easy as CAM. OTOH, if you have CAM for your milling, you could concievably use it to generate g-code that could be pressed into service as a profile in a G71 program.
Here is a screen shot of GWE getting a G71 profile down for the first time:
First crude attempt at a G71. Not quite right, but close!
The program is a modification of one I found on Heinz’s web site (a regular on Practical Machinist who does CNC training for folks and has training DVD’s available too):
N1 G50 S2500(Max speed)
N3 G96 S600 M3(Speed in SFM for 1018 Steel)
N4 G0 X4.0 Z.1 M8(Rapid to OD of part, .1″ away from face, turn coolant on)
N5 G71 U.15 R.05
N6 G71 P7 Q10 U.05 W.005 F.015
N7 G0 X2.0
N8 G1 Z-0.5
N9 X3.0 Z-1
N11 G0 X6.0 Z6.0 M9(Rapid back to a position clear of the part, turn coolant off)
N12 M30( End of program)
You can see G71 has a “two block” format here. Some older controls use a single block to specify G71. GWE will support both formats, but for now, I am focused on the more modern Fanuc double block format. The profile is identified by the “P” and “Q” parameters to G71, which specify the first and last block number (“N” number) for the g-code that draws the profile. N7 through N10 in this case since I have P7 and Q10 on block N6. The initial “U” on N5 specifies the depth of cut as 0.150″. The “R” specifies a retract amount of 0.015″ between passes. The second U and W on N6 specify finish allowances to leave–this is a roughing cycle. You use a G70 on exactly the same profile to make the finish pass.
Pretty ingenious, these controller designers. G71 is a hard working cycle that many lathe programmers tell me they use more than almost anything else. It can be pressed into service both for rough turning (OD) and boring (ID) work.
I still have work to do to finish up G71 before I can release it, but I’m much closer and have now added the foundation to GWE to support all the other lathe canned cycles as well. BTW, when programmers say they’re “close”, it usually means they’re about 1/2 done. Let’s hope that isn’t too optimistic as I want to turn this new toy lose in the wilds for my beta testers to play with before too much longer!
If you have some G71 programs kicking around and you’re willing to share, by all means email them over. They’re usually short, and the more the merrier. I’ll run them through GWE and make sure I have things working right.
BTW, a couple of other G71-related odds and ends. Mach3 doesn’t support these canned cycles, which is a shame given how useful they are. Also, a number of controllers have various limitations. There are things such as “Type 1″ and “Type 2″ that allow for pocketing, for example, and I already mentioned the single block format of older controllers. There’s also some interesting alternative interpretations. Vanilla Fanuc wants to stair step the roughing pass, while some others will follow the contour while roughing, which makes the finishing turn out nicer on many machines.
Here’s the long and the short of it: I have to implement all those various options for compatibility. But I am also planning to make it possible to convert a cycle to its resultant G00 and G01/02/03 moves. That means you’ll be able to write a program with canned lathe cycles in GWE, and push a button to get a program that folds the cycles into vanilla g-code. So, Mach3 users will be able to access the canned cycles and folks with controllers that don’t do pockets will be able to write cycles that access pockets and so on. You’ll even be able to turn stair stepping into profile following if you want.
There’s a lot of reasons to want a good G-Code Editor/Simulator besides writing g-code by hand. Using one to make your programs work better with your controller in some way or another as I’m describing is another use. Join the GWE beta test to stay abreast of developments. It’s free!