What is G04 (Dwell)?
What is G04 (Dwell)?
Delay order by FANUC standards
In CNC programming, according to FANUC standards, the G04 command is a G-Code for Dwell or Delay. It is responsible for instructing the machine to wait for a specified period of time before starting the next line of the program.
In other words, when the program arrives at the G04 line, it will delay the execution of the next block at a specified time. When the time is up, it will continue automatically. No new start command is required.
---
G04 command writing format
FANUC supports multiple G04 writes, depending on the type of control system and machine manufacturer.
Examples of patterns found in the FANUC manual include
G04 X _
G04 U _
G04 P _
By
X can be timed and put a decimal point.
U can schedule and insert a decimal point (found in some lathe systems).
P is used as an integer deadline. It is not possible to enter a decimal point.
However, the actual time units of X, U, and P may differ according to the Increment System, control parameters, and machine manufacturer specifications, so the manual of the machine in use should always be referenced.
---
Working Principles of G04
Once the G04 command has been read by the machine,
1.The machine will complete the command in the previous block.
2.Enter the Dwell range at the specified time.
3. When the time is up, start working on the next block.
If the previous block is a motion, the machine will start counting the time after the motion is complete.
---
Program preview
Example 1 uses X.
G01 Z-20.0 F100.
G04 X2.5
G00 Z5.0
The machine would feed down to the Z-20.0 position, then delay 2.5 seconds (according to the system's assignment) and then lift the tool up.
---
Example 2 uses U.
G01 Z-20.0 F100.
G04 U2.5
G00 Z5.0
The principle works like the first example, but uses Address U, which is supported in some of FANUC's lathe systems.
---
Example 3 uses P.
G01 Z-20.0 F100.
G04 P1000
G00 Z5.0
P uses an integer timetable. The time unit depends on the system, the increase, and the parameters of the machine.
---
What is G04 used to do in real work?
Although G04 is a simple command, it is more common in industrial applications, e.g.
Wait for the hydraulic pressure to create complete pressure.
Wait for the chuck or handle device to finish working.
Waiting for the cooling water to start working.
Wait for the spindle to rotate fixed before starting to cut.
Delay in the drilling process. To help the debris come off or keep the hole bottom skin quality according to the manufacturing process.
The actual application depends on the characteristics of the machinery and production process of each factory.
---
Caution
G04 should not be used to solve problems caused by improper machine settings or program design, because increasing unnecessary wait times will lengthen Cycle Time and reduce productivity.
If it is necessary to check the elapsed time, or create logical conditions, the Fanuc Custom Macro B and associated System Variable should be used instead of the G04 as a timer.
---
Summary
G04 is a Dwell command based on the FANUC standard. It is used for delay within CNC programs so that the operation of the next block starts after a certain time has elapsed. The write format can use an Address such as X, U or P, with the details of the time unit and its support depending on the model of the control system and the specifications of the machine manufacturer.
Despite being a basic command, G04 is one of the G-Codes that plays an important role in controlling the order of operation of machines and should be used appropriately to achieve both process accuracy and manufacturing efficiency.






















































