By David Hayden, webmaster | June 13, 2010 at 01:14 PM EDT |
No Comments
You are driving down the road and you notice an annoying rattle. Someone has put something in the back seat, just out of reach and it won’t stop rattling. You nearly wreck the car flailing your arm around the back seat trying to get a hold of the noise maker so you can hear the traffic report.. . . but alas, it is just out of reach.
It’s days later and you are sitting at work noodling over a blueprint when a conversation breaks out right next to you. It is your boss and his boss talking about golf of all things.
If they would only stop so you could finish your calculation!
While it won’t do much for the rattle or the annoying conversation, the G04 will certainly give your machine reason to pause.
The G04 is a very simple dwell command that suspends all axis motion for the exact amount of time you specify.
Code Data
Code: G04
Modal: No
Group: None, non-modal command
Action: Suspends all axis motion for a prescribed amount of time.
ANSI Std: Yes
Requirements: X or P word to tell how long to dwell
Options: None
Conflicting G Codes Any other G code in Group 05
Description
Look CNC machines don’t make money if they are not moving. . . why in the world would I want to make mine just sit for a few seconds?
There are a number of reasons.
I am not even sure if these reasons are valid any more because CNC equipment has improved so much over the years, but here are some of the ways G04 had been useful to me in the past:
- To stop axis movement for a second or two until the coolant was up to pressure
- To insure the spindle was up to speed before entering a cut, particularly useful on older lathes when moving from large diameters to smaller diameters where greater speed was need to maintain SFPM.
- To insure the tailstock or other hydraulic features were fully up to pressure before the axis started moving.
Do NOT ever use G04 for this!
Never use G04 to build in time for an operator to manually change tools or parts, clear chips or anything where the operator will be hurt when the machine starts moving.
How to Use G04
G04 is a non-modal command so it must appear on the line where you want the machine to pause. Once the pause time has expired the machine will continue processing the remainder of the program.
To tell the machine how long to dwell you have two options.
- Use the X word to tell the machine how long to dwell in seconds. For example G04 X5 will tel the machine to suspend axis movement for 5 seconds
- Use the P word to tell the machine how long to dwell in milliseconds. For example G04 P1000 will tell the machine to suspend axis motion for 1 second
Some G04 Examples
-
G04 X1 M08 – dwells for 1 second while coolant comes on.
-
G04 P1500 M03 – dwells for 1.5 seconds while the spindle gets up to speed
-
G04 p500 – dwells the tool for .5 seconds
So wouldn’t it be nice if you could just shout G04 and the rattles and distractions in you life would stop for a few seconds? You might try it sometime, but better you use it exclusively to talk to your CNC machine.