Fanuc / Haas (milling)
G94 G01 X120. F450G94 is the power up state of almost every milling machine, although the default mode is a machine parameter. G95 exists in milling, but it only works if the spindle has an encoder and is turning.
We use technical and security cookies and, only if you accept, analytics with no cross-site tracking. More in the Cookie policy and Privacy policy.
We use first-party cookies and technical storage to make the site work, Google reCAPTCHA security technology and, only if you accept, Vercel analytics (no cookies, no cross-site tracking). You can accept or reject analytics; both options are equivalent and you can change your choice at any time. More info: Cookie policy, Privacy policy, Legal notice and Terms and conditions.
G94 and G95 decide what unit the control reads the program F in: under G94 the feed is per minute (mm/min) and under G95 it is per spindle revolution (mm/rev). What changes is how the number is read, not the number: the same F0.25 means 0.25 mm over a whole minute under G94 and 0.25 mm on every turn of the spindle under G95. Milling nearly always works in G94 and turning in G95, because feed per revolution is what sets chip thickness and surface finish.
For reference only: syntax changes with the control, the post-processor and the machine parameters. Check the official manual and run a simulation before cutting. Legal notice.
Fanuc / Haas (milling)
G94 G01 X120. F450G94 is the power up state of almost every milling machine, although the default mode is a machine parameter. G95 exists in milling, but it only works if the spindle has an encoder and is turning.
Fanuc lathe, B and C code systems
G95 G01 X40. Z-30. F0.25In these code systems feed per revolution is G95 and feed per minute G94, the same as in milling. It is the usual combination with G96 or G97 for the spindle.
Fanuc / Haas lathe, A code system
G99 G01 X40. Z-30. F0.25Watch out for this one, because it is the commonest slip: in the A code system of Fanuc lathes and on Haas lathes, feed per revolution is G99 and feed per minute G98, not G94/G95. Check on the status screen which one is active before assuming anything.
Siemens 840D / 828D
G95 F0.25 S1200 M3G94 in mm/min and G95 in mm/rev, with the same logic as Fanuc. Siemens adds G96 (constant surface speed, which always works with feed per revolution) and feed per tooth functions in milling depending on the control version.
Heidenhain TNC (Klartext)
L X+120 F450In Klartext the F is natively in mm/min. To work in millimeters per revolution you have to switch it on with M136, and M137 cancels it. Availability depends on the control version and on the machine.
| Letter | What it sets | Unit |
|---|---|---|
| F | Programmed feedrate. It is the same number in both modes: what changes is the unit the control reads it in. | mm/min under G94, mm/rev under G95 |
| S | Spindle speed. Under G95 it is part of the real feedrate: the millimeters per minute that come out are F times the rpm, so changing S changes the speed of the axes. | rpm (m/min if G96 is active on a lathe) |
| G94 / G95 | Modal selector: they take no arguments. They stay active until the other one replaces them, and the state after a reset or an M30 depends on a machine parameter. | modal, no units |
Turning a 50 mm steel bar on a Fanuc lathe with the B code system, where feed per revolution is G95. First it turns the diameter down with an insert and then it drills on center with a drill mounted in the turret. Seeing both feeds together makes the difference clear: F0.3 at 1200 rpm is a real 360 mm/min.
O0095 (CILINDRADO Y TALADRADO EN G95) | ( Program header. ) |
G21 G18 G40 | ( Millimeters, the XZ lathe plane and no tool nose radius compensation. ) |
G50 S2200 | ( Spindle speed limit, in case constant surface speed is switched on later. ) |
T0101 (PLAQUITA DE DESBASTE) | ( Tool 1 with its offset 1. ) |
G97 S1200 M03 | ( Direct rpm for this example: 1200 rev/min clockwise. ) |
G95 G00 X52. Z2. | ( Switches to feed per revolution and approaches in rapid. G95 does not affect G00 moves: the rapid always runs at machine speed. ) |
G01 X50. F0.15 | ( Gentle radial entry: 0.15 mm for every turn of the spindle, that is 180 mm/min at 1200 rpm. ) |
G01 Z-60. F0.3 | ( Turning pass: 0.3 mm per revolution. That number is what governs chip thickness and finish, and it does not change even if the rpm do. ) |
G00 X52. | ( Pulls the insert off the wall. ) |
G00 X200. Z100. | ( Retract to the turret index position. ) |
T0303 (BROCA DE Ø12) | ( Tool 3 with its offset. ) |
G97 S900 M03 | ( Direct rpm for the drill: drilling on center you never use constant surface speed. ) |
G00 X0. Z3. | ( Drill on the axis of rotation, 3 mm off the face. ) |
G95 G01 Z-35. F0.12 | ( Drilling at 0.12 mm per revolution: 108 mm/min at 900 rpm. Under G94 that same F0.12 would be 0.12 mm/min and the drill would sit there rubbing until it burned. ) |
G00 Z5. | ( Pulls the drill out of the hole in rapid. ) |
G94 G00 X200. Z100. M05 | ( Back to feed per minute to leave the control in a known state, retract and spindle stop. ) |
M30 | ( End of program. ) |
In turning the tool takes a helical pass around the part: what it advances on each turn is exactly the lead of that helix, and that lead sets chip thickness, surface finish and the load on the edge. Programming in mm/rev means the insert manufacturer gives you a number you can copy straight across, and that if you change the rpm the cut stays the same. In milling the reference is feed per tooth, so the control works in mm/min and you do the arithmetic yourself.
Under G95 the real feedrate depends on the rpm, so the two spindle modes make themselves felt: with G97 the rpm are fixed and so is the feed in mm/min; with G96 the control changes the rpm with the diameter and the feed in mm/min changes with them, but the feed per revolution holds, which is exactly the point. Bear in mind too that the spindle override alters the real feedrate under G95 and does not under G94. In threading with G32, G76 or G92, the F is the pitch and the control synchronizes even if you are in G94.
Programming a mill in mm/rev is unusual but it exists, and it is there so chip thickness does not change when the operator touches the spindle override or when the control adapts the speed. It needs an encoder on the spindle and the spindle turning: with the spindle stopped the axes do not feed. In deep hole peck drilling it is used as well, because it lets you give the feed in millimeters per revolution exactly as the drill catalogue prints it. Outside those cases, a mill is programmed in G94 and that is that.
The unit of the F. Under G94 the feedrate is millimeters per minute: the tool covers that distance in a minute whether the spindle turns or not. Under G95 it is millimeters for every turn of the spindle, so the feed in mm/min comes from multiplying the F by the rpm. The number you write is the same; what changes is what it means.
By multiplying by the rpm: mm/min equals mm/rev times rpm. F0.25 at 1200 rpm is 300 mm/min. The other way round, if you work in G94 and want to know the real feed per revolution, divide: 450 mm/min at 1800 rpm is 0.25 mm per revolution.
Because it is in the A code system, which is the factory setting on many Fanuc lathes and on Haas lathes. There, feed per revolution is G99 and feed per minute is G98. The code system is in the machine documentation and it is not changed without knowing what you are doing, because it affects the whole program.
Yes, if the spindle has an encoder, but it only makes sense in particular cases such as deep hole drilling or work where you want chip thickness to hold when the override is moved. The normal thing in milling is G94, and it is also what post processors put out by default.
Threading with G32, G76 or G92 on a lathe, and rigid tapping with G84 in milling, run synchronized with the spindle even if the control is in G94: in those cycles the F is the pitch, or the pitch times the rpm, depending on the active mode. What matters is knowing which one is active, because the number you have to write changes completely.
CNC IDE: editing with G/M tooltips, line inspector, conversion between controls and 2D/3D toolpath.
CNC Alarms and Solutions Guide. Enter the error code or symptom to find the cause and how to repair it at the machine.
Estimate CNC turning and milling cycle time from G-code. Calculate parts per hour with a breakdown of cutting, rapids, canned cycles and tool changes.