Enter a drawing to win a SideStop work stop and receive our free weekly newsletter.Enter Now!
Precise Timing and Speed:
Dwell, Exact Stop, and Anti-Backlash Moves using G04, G09, G60, G61
G04 Dwell: For Precise Timing
G04 is called the Dwell command because it makes the machine stop what it's doing or dwell for a specified length of time. It's helpful to be able to dwell during a cutting operation, and also to facilitate various non-cutting operations of the machine.
For lathe operations, the chief application of a G04 Dwell is to break chips, especially when drilling, counterboring, grooving, or parting-off. You may also find them useful in general turning or boring operations to eliminate the tooling marks left on the part by end thrust of the cutting tool.
On mills, the most common use is to force the machine to catch up. For example, you might put a G04 Dwell at the end of a long straight run that ends with a corner to make sure the machine accurately follows the path. This is sometimes necessary on older machines, though usually not on recent VMC's. If the machine can accurately follow the path without dwells, it's better not to use them as any dwell will leave visible marks on the part.
Non-cutting operations are even more common as dwells are used to wait for some operation to complete before going on. In a pinch, you might use a dwell to wait for your coolant to come up to pressure right after it's turned on, for example, though it is better for cycle times if your coolant system can get to pressure without dwells. Another example is some older machines may require a dwell to give the spindle time to get up to the commanded speed.
The argument for dwell is typically the "P" word (think "Pause"), although "X" and "U" is also commonly used. You'll have to check which format your machine uses. The address specified with the appropriate dwell word specifies the delay is either milliseconds (1000 milliseconds = 1 second) or seconds. Some controls also allow the Dwell to be programmed in spindle revolutions instead of a time, which is handy, especially for chip breaking applications. We don't need more than a revolution or two pause to break chips so it's easy to tell how long that is without trying to calculate an appropriate pause.
For clarity, and particularly if your machine uses "X" or "U" for dwell, put the dwell command on its own line. Here is a 500 millisecond (1/2 second) dwell between two moves:
Remember that Dwells are always unproductive time. They're time when the machine isn't doing anything but is waiting for something to catch up. Try to keep dwell times as short as possible and always look for other ways to achieve your result with a dwell.
Lastly, some controls like Fanuc allow G04 without an associated word. This tells the Dwell command simply to wait until the machine is caught up with everything it is doing.
G09/G61: Exact Stop Check
Exact stop check is useful for improving the accuracy of your g-code programs. It causes the machine to wait until the cutter is finished and exactly on position before continuing. It often triggers the trajectory planner in the controller to be more careful about ensuring moves are exactly on target.
Why is such a thing needed, and why doesn't the control always operate in Exact Stop check Mode?
Consider that tight high speed manuevers may exceed the acceleration capabilities of the machine, forcing it to fall behind and start trying to play catch-up via the servo feedback loop. Exact stop check simply makes the machine close the error (distance from commanded position to actual position) to zero before continuing. The disadvantage is that it may make the program slower for no good reason. We don't necessarily need the machine to be exactly on target when roughing, for example. The role of the finish pass is to clean up the inaccuracies of the roughing pass. Think of Exact Stop Check as being something that's in your tool kit to pull out if you know you have a problem, either because you're seeing a problem in the parts, or because you know from experience that you're going to see problems.
Exact stop check is available in two forms. G09 is a one-shot command whereas G60 is a modal command. When you specify G61, it is as though an exact stop check happens at the end of each move the machine makes. Use the G64 command to cancel a G61. G09 needs no cancelling as it is automatically cancelled when the program goes to the next block.
G60: Single Direction Move (Anti-Backlash)
Speaking of having problem-solving solutions in our toolkit, let's talk about Single Direction Moves. Every machine has some backlash, the question is, "How much and what do we do about it?" A typical CNC that is operating in good repair has so little backlash that it doesn't really matter for most operations. Still, there is some backlash there, and there are some operations that need to be extremely accurate, so we want to be able to perform them without the error of the backlash. That's a time when we pull G60 out of our toolkit and try Single Direction Moves.
Backlash only shows up when we reverse direction. Manual machinists are used to operation on machines that have loads of backlash--so much that climb milling can be dangerous on such machines. Yet they manage to do extremely accurate work. The reason is that they know to approach the cut from only one direction after all the backlash has been taken out. If they must reverse direction, they pull back far enough that they can feed back past any backlash before engaging in the cut. This is basically what G60 does for CNC.
What sorts of operations require this kind of precision?
Well, consider probing operations using an electronic touch probe. Clearly we want their measurements to be as accurate as possible. Probing is typically done in one direction at a time anyway, so using a Single Direction Move is a natural.
The G60 operates by taking an XYZ coordinate, so moves look something like this:
That little code snippets move to Y0Y0 with rapids, then makes a G60 move to the right 1 inch followed by a return to 0, and finishes with a move upward 1 inch. We have to specify the G60 on each line because G60 is a one-shot g-code rather than a modal g-code.
1. Look up or determine what the time units and word/address formats are for your machine's G04 command.
2. Try writing a program that has a lot of sharp corners and high speed moves and then add a G61 to compare the results.
3. Experiment with some Single Direction Moves to improve accuracy in your programming.
No credit card required--just your name and email.
Next Article: Work Offsets: The G-Code Coordinate Pipeline
Do you want to be a better CNC'er?
Get Better Tool Life, Surface Finish, and Material Removal Rates.