<p>It seems like you might be wanting to look at the steps per mm line.</p>

<pre><code>#define DEFAULT_AXIS_STEPS_PER_UNIT
</code></pre>

<p>This line is where you calibrate the number of steps per mm. To calibrate, mark a point along an axis, then move that axis something like 100&nbsp;mm. If it didn't move 100&nbsp;mm exactly, make a change</p>

<pre><code>(how far it moved)       (how far it should have moved)
------------------   =   ------------------------------
(current steps/mm)         (new steps/mm) --&gt; find this
</code></pre>

CC BY-SA 4.0
2018-07-12T01:15:06.667Z
2018-07-12T06:48:59.380Z
2018-07-12T06:48:59.380Z
Curt Hayes
<p>You have the  lines to adjust the feed rate.
The first one (line 742) is relevant to the maximum feed rate XY while homing (not during printing). I think this is not an issue in your particular case and you may leave it as it is.</p>

<p>The second one (line 753) is the feed rate while printing for XY. Particularly the numbers in the brackets refers to ( X, Y, Z, E). If your printer is moving it may affect XY more than Z and E. So you may try to adjust the first two numbers.</p>

<p>Due to the very specific situation is impossible to give you a feed rate based on calculation because you are dealing with external accelerations caused by the mobile situation. You will need to try and adjust it until you get right.</p>

<p>Another setting that may also help you to compensate the external acceleration, if any, is the acceleration of those two axes.You should find two lines like these:</p>

<pre>
#define DEFAULT_MAX_ACCELERATION      {1500,1500,50,250}    
#define DEFAULT_ACCELERATION          1500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
</pre>

<p>However the acceleration of the axes may impact on the quality of the printing.</p>

CC BY-SA 4.0
2016-10-30T10:04:26.547Z
2018-07-12T05:59:04.050Z
2018-07-12T05:59:04.050Z
FeliceM
<p>You can change the <em>maximum</em> allowable feedrate in Configuration.h, but the actual feedrate that is used isn't determined by your firmware. The feedrate is specified in the G-Code file. A command like</p>

<pre><code>G0 X10.0 Y15.0 Z3.0 F9000
</code></pre>

<p>indicates a move to (10,15,3) at a feedrate of 9000 mm/min. If F is not specified, the last used feedrate is used.</p>

<p>You just have to provide the appropriate G-code commands with the feedrate you want in them. There's no reason to modify the firmware to get a different feedrate.</p>

CC BY-SA 3.0
2016-10-30T21:10:39.673Z
So then would the feedrate need to be the same for all x,y and z axes? Also are you familiar with which part of the Marlin_main.cpp is responsible for reading the commands from the G-Code file?
make it happen
CC BY-SA 3.0
2016-10-30T21:16:49.060Z
No, the feedrate for the individual axes is calculated so that the total feedrate is 9000mm/s (e.g. euclidian distance between points divided by time for move equals feedrate). If you move from 0,0 to 2,1 the feedrate for X will be two times higher than the feedrate for Y. I'm not sure what you're trying to achieve, but changing the firmware probably isn't the right option. If you insist, you should probably be looking at the `prepare_move` function.
Tom van der Zanden
CC BY-SA 3.0
2016-10-30T21:17:45.613Z
You can't set the feedrate for the axes independently because then one axis might reach its destination before another does. You want a move from X,Y to X',Y' to result in a straight line. Therefore the feedrates depend on each other.
Tom van der Zanden
CC BY-SA 3.0
2016-10-30T18:44:52.023Z
2016-10-30T18:44:52.023Z
Tom van der Zanden
<p>I'm using the Marlin firmware (1.1.0-RC7 - 31 July 2016) for a 3d printer. Currently the printing is not perfect due to slight inaccuracies in movements along the x and y axis. I'm trying to change the feedrate for speed along the xy axis whilst the printer is in operation to make sure the printer stops on time and prints accurately.</p>

<p>I have some code for controlling the feedrate but the problem is that I'm not sure where I am supposed make these adjustments. In the configuration.h file I see this code: (lines 742 and 753 )</p>

<pre><code>/*line 742*/ #define HOMING_FEEDRATE_XY (50*60) 
/*line 753*/ #define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25}  // (mm/sec)
</code></pre>

<p>I'm probably misunderstanding something but it seems like this sets the feedrate to a default value which is the same as the maximum. </p>

<p>If the feedrate changes during printing I'm guessing it would be done in Marlin_main.cpp but I'm not sure which part it actually changes. Can someone point me in the right direction here?  </p>

CC BY-SA 3.0
2016-10-31T11:47:33.560Z
The feed rate is set by the g-code you provide, why not just set the printing feed rate lower?  The only thing you are going to change in the firmware without modify it is the max and homing feed rates.
tjb1
<marlin><speed>
Marlin Adjusting feedrate
make it happen
# Marlin Adjusting feedrate

(Asked by: username_0 on 2016-10-30)

I'm using the Marlin firmware (1.1.0-RC7 - 31 July 2016) for a 3d printer. Currently the printing is not perfect due to slight inaccuracies in movements along the x and y axis. I'm trying to change the feedrate for speed along the xy axis whilst the printer is in operation to make sure the printer stops on time and prints accurately.
I have some code for controlling the feedrate but the problem is that I'm not sure where I am supposed make these adjustments. In the configuration.h file I see this code: (lines 742 and 753 )
/*line 742*/ #define HOMING_FEEDRATE_XY (50*60) 
/*line 753*/ #define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25}  // (mm/sec)

I'm probably misunderstanding something but it seems like this sets the feedrate to a default value which is the same as the maximum. 
If the feedrate changes during printing I'm guessing it would be done in Marlin_main.cpp but I'm not sure which part it actually changes. Can someone point me in the right direction here?

**Tags:** marlin, speed
> **Comments:**
> **username_1**: The feed rate is set by the g-code you provide, why not just set the printing feed rate lower?  The only thing you are going to change in the firmware without modify it is the max and homing feed rates.  

---

## 3 answers

### Answer by username_4 on 2016-10-30. Score: 3 | Accepted answer

You can change the maximum allowable feedrate in Configuration.h, but the actual feedrate that is used isn't determined by your firmware. The feedrate is specified in the G-Code file. A command like
G0 X10.0 Y15.0 Z3.0 F9000

indicates a move to (10,15,3) at a feedrate of 9000 mm/min. If F is not specified, the last used feedrate is used.
You just have to provide the appropriate G-code commands with the feedrate you want in them. There's no reason to modify the firmware to get a different feedrate.

> **Comments:**
> **username_0**: So then would the feedrate need to be the same for all x,y and z axes? Also are you familiar with which part of the Marlin_main.cpp is responsible for reading the commands from the G-Code file?  
> **username_4**: No, the feedrate for the individual axes is calculated so that the total feedrate is 9000mm/s (e.g. euclidian distance between points divided by time for move equals feedrate). If you move from 0,0 to 2,1 the feedrate for X will be two times higher than the feedrate for Y. I'm not sure what you're trying to achieve, but changing the firmware probably isn't the right option. If you insist, you should probably be looking at the `prepare_move` function.  
> **username_4**: You can't set the feedrate for the axes independently because then one axis might reach its destination before another does. You want a move from X,Y to X',Y' to result in a straight line. Therefore the feedrates depend on each other.  

---

### Answer by username_2 on 2018-07-12. Score: 2

It seems like you might be wanting to look at the steps per mm line.
#define DEFAULT_AXIS_STEPS_PER_UNIT

This line is where you calibrate the number of steps per mm. To calibrate, mark a point along an axis, then move that axis something like 100 mm. If it didn't move 100 mm exactly, make a change
(how far it moved)       (how far it should have moved)
------------------   =   ------------------------------
(current steps/mm)         (new steps/mm) --> find this


---

### Answer by username_3 on 2016-10-30. Score: 1

You have the  lines to adjust the feed rate.
The first one (line 742) is relevant to the maximum feed rate XY while homing (not during printing). I think this is not an issue in your particular case and you may leave it as it is.
The second one (line 753) is the feed rate while printing for XY. Particularly the numbers in the brackets refers to ( X, Y, Z, E). If your printer is moving it may affect XY more than Z and E. So you may try to adjust the first two numbers.
Due to the very specific situation is impossible to give you a feed rate based on calculation because you are dealing with external accelerations caused by the mobile situation. You will need to try and adjust it until you get right.
Another setting that may also help you to compensate the external acceleration, if any, is the acceleration of those two axes.You should find two lines like these:

#define DEFAULT_MAX_ACCELERATION      {1500,1500,50,250}    
#define DEFAULT_ACCELERATION          1500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves

However the acceleration of the axes may impact on the quality of the printing.


---

