Introduction – GRBL Feed Rate
Congratulations on getting your CNC machine running. By now you should have adjusted a few of the GRBL settings. If not then before setting your GRBL feed rate, I recommend you set the steps per mm at the very least. Click the following link for a guide that will walk you through the process for the x,y and z axis Steps per mm ($100, $101, $102). GRBL settings 101
Now that your machine moves to the location you want, it’s time to see if we can get the machine there faster. The following guide outlines the process of setting your GRBL feed rate.
Why Does Feed Rate Matter?
Many times, your machine will have to rapid to a location before or between cuts. Depending on what you are cutting and how big that part is, this can add up to a significant amount of time. Especially if your max GRBL feed rate settings are not optimized. In my case, I was able to more than double the safe speed of my machine. This meant that the machine moved to the cutting positions faster and didn’t waste time slowly moving to the next cut. I saw a significant drop in cycle time, the amount of time it takes to cut a given part.
Again these settings deal with the machine limits. The actual cutting feed rates in your gcode program are set in your CAM software. These settings represent the upper limit of what the machine will do even if the gcode program tells the machine to move faster.
GRBL Feed Rate Settings
We are interested in maximizing the following the GRBL feed rate parameters. These are accessed through the command interface portion of Universal GCode Sender (UGCS).
$110=635.000 – X – Max Rate (mm/min)
$111=635.000 – Y – Max Rate (mm/min)
$112=635.000 – Z – Max Rate (mm/min)
Not to worry, we don’t need any fancy math to define these settings. We will use a series of tests and iterate to find the optimal GRBL feed rate settings.
For a complete list of GRBL Settings, download the GRBL Settings Pocket Guide
Maximum Speed – GRBL Definition
Max Rate – Sets the maximum speed for a given axis. The machine will not move faster than the values set here. This is the feed rate the machine will use when you type a G00 command.
Understand You Baseline
The first thing we want to do is capture the baseline settings. This way, we can go back to these if we make a mistake while updating one of the new settings.
1. Power on your machine
2. Open Universal Gcode Sender (UGCS) and view your current settings by typing $$ in the Command box under the Command tab.
You should get a list that looks something like the following.
**** Connected to COM3 @ 115200 baud ****
Grbl 0.9j [‘$’ for help]
>>> $$
$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=3 (dir port invert mask:00000011)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.010 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=1 (report inches, bool)
$20=0 (soft limits, bool)
$21=0 (hard limits, bool)
$22=0 (homing cycle, bool)
$23=0 (homing dir invert mask:00000000)
$24=25.000 (homing feed, mm/min)
$25=500.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$100=314.960 (x, step/mm)
$101=314.960 (y, step/mm)
$102=78.740 (z, step/mm)
$110=800.000 (x max rate, mm/min)
$111=800.000 (y max rate, mm/min)
$112=350.000 (z max rate, mm/min)
$120=10.000 (x accel, mm/sec^2)
$121=10.000 (y accel, mm/sec^2)
$122=10.000 (z accel, mm/sec^2)
$130=200.000 (x max travel, mm)
$131=200.000 (y max travel, mm)
$132=200.000 (z max travel, mm)
ok
3. Highlight lines $0 through $132 and copy the information (use “Ctrl C”). Next, open “Notepad” or your preferred text editor and paste the settings into a new file. Save the file as “GRLB_Settings_Baseline.txt”.
We are interested in settings $110, $111 & $112. Note, those show above are my final settings. The initial GRBL feed rate values were significantly lower.
X Axis Max Speed
1. Review the value in $110
2. Add about 100 to the value and send the new setting by typing $110=”new value” (Note, just enter a number without the “”.) For example, my first iteration was $110=200.000
3. Next jog the machine to the far left of the allowable travel. This gives us as much room as possible to test our new speed setting. Use the keyboard or jog buttons under the ”Machine Control” tab.
4. Next select the Command tab.
5. Type the following gcode command “G00 X4” This will tell the machine to move 4 inches in the positive X direction at the maximum feed rate.
CAUTION – Be sure your machine has at least 4 inches of travel in the X axis. If not, then adjust the command in step 5 and reduce the travel by using a number that is slightly smaller than the allowable travel of your machine in the the X direction.
6. Press enter then watch and listen to your machine as it moves.
7. Does the machine run smoothly? If so, you can go back to step 2 and repeat the process. This will help you sneak up on the upper speed limits of your hardware setup. Does the machine struggle and sound like it’s tearing itself apart? That means you have found the upper limit of the speed. Move onto step 8. Also, if the machine moves as fast as your are comfortable with then move on to step 8.
8. Take the last setting you entered into the machine and multiply by .9, this is your final speed setting value for the X axis. Enter this final value in the $110 setting variable by typing $110=”final value” in the Command box under the command tab.
9. Do one last check using this new value. Jog the machine as far in the negative X direction as possible. Then under the Command Tab type “G00 X4” The machine should move smoothly without any grinding. If that is the case, move on to set the Y axis feed rate.
Y Axis Max Speed
1. Adjust the max speed in the Y direction by starting with the value you found for the X axis. Enter that by typing $111=”value”
2. Jog the machine to the forward most position of the allowable travel using the keyboard or jog buttons under the ”Machine Control” tab. This gives us as much room as possible to test our new speed setting.
3. In the Command box under the Command tab Type the following gcode “G00 Y3” This will tell the machine to move 3 inches in the Y direction. (Note, I used 3 inches because of the travel limits on my machine. If you have a larger machine, you may want to use more of the available travel. If you have a smaller machine, be sure to use a smaller value.)
4. Press enter then watch and listen to your machine as it moves.
5. Does the machine run smoothly? If so, you can go back to step 1 and add 100 to the value then repeat the process. This will help you sneak up on the GRBL feed rate upper limit of your hardware setup. Does the machine struggle and sound like it’s tearing itself apart? That means you have found the GRBL feed rate upper limit. Move onto step 6.
6. Take the last setting you entered into the machine and multiply by .9, this is your final speed setting value for the Y axis. Enter this final value in the $111 setting variable by typing $111=”final value” in the Command box under the command tab. In my case, I found 800.000 to be the GRBL feed rate upper limit for my machine.
7. Do one last check using this new value. Jog the machine as far in the negative Y direction as possible. Then under the Command Tab type “G00 Y3” The machine should move smoothly without any grinding. If that is the case, move to the Z axis.
Z Axis Max Speed
1. Review the value in $112
2. Add about 50 to the value and send the new setting by typing $112=”new value” (Note, just enter a number without the “”.) For example, my first iteration was $112=200.000
3. Jog the machine to the lowest Z axis position using the keyboard or jog buttons under the ”Machine Control” tab. This gives us as much room as possible to test our new speed setting.
4. Using the Command box under the Command tab Type the following gcode command “G00 Z4” This will tell the machine to move 4 inches in the positive Z direction (up). (Note, here we want to move the Z axis up against gravity. This way we know that the max speed will work in both the Z positive (up) and Z negative (down) directions.)
5. Press enter then watch and listen to your machine as it moves.
6. Does the machine run smoothly? If so, you can go back to step 2 and repeat the process. This will help you sneak up on the upper speed limits of your hardware setup. Does the machine struggle and sound like it’s tearing itself apart? That means you have found the upper limit of the speed. Move onto step 7.
7. Take the last setting you entered into the machine and multiply by .9, this is your final speed setting value for the Z axis. Enter this final value in the $112 setting variable by typing $112=”final value” in the Command box under the command tab.
Conclusion
A few simple tweaks can really make life easier in the long run. By maximizing your GRBL feed rate settings, you will save time with every part you make. Saving a few seconds in your machining operations might not seem like much initially, but over time they really add up. I haven’t seen any problems with my gShield with my higher GRBL feed rate settings . I encourage you to try tweaking some of your settings. What do you have to lose? If it doesn’t work just go back to the last setting that did work.
The process outlined above is a guide to find the maximum GRLB feed rate settings that your physical hardware will allow. If you are just starting out, you may want to consider using 25% of these maximum values to start. As you grow more comfortable with your machine, you can increase the GRBL feed rate settings until you are back up to the maximum values found above.
If you have any questions, feel free to contact me at Tim@DIYMachining.com
Thanks for reading. Until next time… Tim
how can I get feed rate less than one ,I want my feed rate to be 0.18
ZUHAIB – I appreciate the question. To control the feed rate in your gcode, you use the G01 command and specify a feed rate with f. For example, if I want to move the x axis 5 inches at a feed rate of 10 inches per min I would enter the following command “G01 X5 F10” without the quotation marks. Now, I have not tried a feed rate of .18? Are you running in inches or mm? Nonetheless, your code would look something like this again, remove the quotation marks “G01 X4 F.18”
error: Undefined feed rate
in grbl controller software.
I try every step to correct it no movement on motor.
i use arduino uno and cnc shield
i make axidraw clone machine.
plz plz help my final year project date is comming next weel.
Gurdeep, Sounds like you are using a G01 command with out a feed rate value. G01 expects a feed rate. Try something like G01 X2 F5. This tells the machine to move 2 units in the positive x direction at a feed rate of 5 units/minute.
Thanks for this! I have 200 key chains to etch. They were taking 11 minutes each. Now, after these tweeks, it’s down to 4.5 minutes. You saved me 21 hours. Thanks!
Joshua, WOW that’s excellent! Glad to hear you will save that much time! Keep up the great work.
I think 21 hrs minimum of $10 an HR maybe 210+ in savings. Possibly worth a 100 tip. Lol that’s amazing. Thanks for the time you put in educating us.
Hi David, glad you find the site useful! I am working on a Start Here page to index all of the posts so they are easier to find.
Emco 9v stepper motor moves z axis downwards but can’t lift it.
We have converted emco f1 with Arduino and raspberry pi3 b+ setup
F50
Hi Sandeep, great to hear from you. Have you tried running the stepper motor when it’s not mechanically connected to the z-axis? Can you move it both directions in this case? I am concerned that the stepper motor does not have enough torque to raise the head of the machine. You may need to get a larger stepper motor or add some mechanical assist to help reduce the force required to raise the head of the machine. Think gas springs or counter weights.
How to change speed when moving in single line?
sample: G1 X100 Y100 Z10 F1200 > this line working, so I want change speed movement high and low movement F1000 or F2000 or F200,
no more lines. finish program x100 and y100
It’s possible?
Good question… To my knowledge, there is no way to vary the feed rate (speed) in a single line of gcode. You would need to break up the move into three lines of gcode. Each line would need to have a different feed rate. You could use the following example…
G1 X33.3 Y33.3 Z3.3 F1000
G1 X66.6 Y66.6 Z6.6 F2000
G1 X100 Y100 Z10 F200
Does that answer your question?
If you are talking about changing the GRBL settings, then yes you can adjust the acceleration/deceleration and maximum feed rate for the machine. These settings are stored in the Ardunio flash memory and do not change with each gcode program.
hello TIM
is there any limits for axis max rates and accelerations?
is higher speeds harmful for motors?
because of when i highering the speeds, the motors noise and sound lowers and this the best way that i found!!!
very thanks my dear friend
Hi Milad, the maximum rates and accelerations are based on your machine setup. That is what type of components you used for your machine. I cannot give a specific value since it will be different for each machine. I have not found the higher speeds to be harmful to the motors. Keep in mind when you increase the max rates, bad things happen faster! Like if you accidentally press the wrong jog button and break a tool. Thank you for the feedback.
i like to use the feedrate setup for a home made honing machine to hone cilinders to size , i got the idea from seeing this :
https://www.youtube.com/watch?v=7fctqivBqlk
, i need to set the stroke per minute against the rpm of the motor driving the hone and get a crosshatch thats near or little less then 60 degrees
a small added problem if the bore is bigger or smaller the crosshatch angle changes as the hone travels a larger distance against the wall of a bigger diameter bore compared to a smaller one . i wonder if that can be (auto)calculated through the arduino as well by inputting the boresize of the cilinder
Hi Ronald, that’s a very cool hone. I am not sure the setting the max feedrate in the GRBL settings would be the best option. While you can certainly use an Arduino with gShield running GRBL, I would write some custom gcode and change the feedrate in the gcode program that gets streamed to the Arduino running GRBL. This would allow you to have a unique gcode program for the various cylinder bore diameters and strokes. You could easily use a stepper motor to rotate the hone as well as provide the +/- Z motion. You could also write some custom Arduino code to calculate the motion in terms of step/dir outputs using the cylinder bore and stroke. In this option, you wouldn’t need GRBL, just a pair of stepper motor drivers, one to spin the hone and the other to produce the +/- Z axis motion. Feel free to reach out at Tim@DiyMachining.com if you want to explore this in more detail.