G95 is a modal G-code that instructs the CNC machine to interpret feed commands as distance per revolution of the spindle. This means that the tool will move a specified distance for every complete turn of the spindle. G95 is commonly used on CNC lathes, where the feed rate depends on the spindle speed and the desired cutting depth.
Usage format
The syntax for using G95 is:
G95 F value
where F value is the distance that the tool will travel per revolution of the spindle. The distance can be in millimeters (mm) or inches (in), depending on the unit system of the machine. The value can be a constant or a variable.
Explanation
G95 is useful for controlling the feed rate of the tool in relation to the spindle speed. This can help achieve a consistent surface finish and avoid excessive tool wear. G95 can also simplify the programming of some operations, such as threading, where the feed rate is determined by the pitch of the thread.
To calculate the feed rate in distance per minute (DPM) or inches per minute (IPM) using G95, the following formula can be used:
Feed rate = Spindle speed x Distance per revolution
For example, if the spindle speed is 1000 RPM and the distance per revolution is 0.2 mm, the feed rate will be:
Feed rate = 1000 x 0.2 = 200 mm/min
Example
Here is an example of using G95 to program a turning operation on a CNC lathe:
G21 ; Set units to mm G95 ; Set feed mode to distance per revolution S800 M3 ; Set spindle speed to 800 RPM and turn it on G00 X50 Z2 ; Rapid move to the starting position G01 Z-20 F0.1 ; Linear move to the end position with a feed of 0.1 mm/rev G00 X100 ; Rapid move away from the workpiece M5 ; Stop the spindle M30 ; End of program
The above program will produce a cylindrical cut with a diameter of 50 mm and a length of 20 mm. The tool will move 0.1 mm for every revolution of the spindle, resulting in a feed rate of 80 mm/min. The surface finish will depend on the tool geometry, material, and cutting conditions.