G64 is a G-code command that instructs a CNC machine to move in a constant velocity mode. This means that the machine will try to maintain a smooth and continuous motion along the programmed path, without stopping or slowing down at the corners or sharp angles. This mode is useful for cutting complex shapes or contours that require a high-quality surface finish.
Usage format
The format of the G64 command is:
G64 [P~] [Q~]
where:
P~
is an optional parameter that specifies the maximum deviation from the programmed path. The smaller the value, the closer the machine will follow the exact path. The default value is 0.01 mm or 0.0004 inch.Q~
is an optional parameter that specifies the maximum jerk or acceleration change. The smaller the value, the smoother the machine will accelerate or decelerate. The default value is 0.1 m/s3 or 0.328 ft/s3.
Explanation
The G64 command is usually placed at the beginning of the program, before any motion commands. It can also be used to switch from another mode, such as G61 (exact stop mode) or G63 (fast mode). The G64 mode will remain active until another mode is selected or the program ends.
The G64 mode allows the machine to move faster and more efficiently, as it does not have to stop or slow down at every corner or angle. However, this also means that the machine may not follow the exact programmed path, but rather a smoothed or approximated one. The degree of deviation depends on the values of the P and Q parameters, as well as the geometry and speed of the path.
The P parameter controls the maximum distance that the machine can deviate from the programmed path. For example, if P is set to 0.1 mm, the machine can move up to 0.1 mm away from the exact path, as long as it maintains a constant velocity. The Q parameter controls the maximum jerk or acceleration change that the machine can undergo. For example, if Q is set to 0.01 m/s3, the machine can change its acceleration by up to 0.01 m/s3, as long as it maintains a constant velocity.
The values of the P and Q parameters should be chosen carefully, depending on the desired accuracy and quality of the cut. If the values are too large, the machine may deviate too much from the programmed path, resulting in a poor surface finish or dimensional errors. If the values are too small, the machine may slow down too much or make sudden movements, resulting in a longer cutting time or excessive wear and tear.
Example
Here is an example of a CNC program that uses the G64 command to cut a circular pocket with a radius of 10 mm and a depth of 5 mm. The program assumes that the machine is in millimeter mode (G21) and uses a 5 mm end mill.
G21 ; Set millimeter mode
G64 P0.05 Q0.05 ; Set constant velocity mode with P and Q parameters
G90 ; Set absolute mode
G0 X0 Y0 Z5 ; Rapid move to the center of the pocket
G1 Z-5 F100 ; Linear move to the bottom of the pocket
G2 X10 Y0 I10 J0 F200 ; Circular move to cut the pocket
G0 Z5 ; Rapid move to the clearance plane
M30 ; End of program