<p>I am using Marlin firmware with a RAMPS board on an Anet A8 printer. </p>

<p>The bed size for the printer is 220 x 220 mm and that is stated in the <code>configuration.h</code> file. When using mesh bed leveling, the nozzle jumps to the first corner on the bed perfectly after setting the x-min to 5.0 but the next two points are off the end of the bed. Here are my settings: </p>

<pre><code>// Travel limits after homing (units are in mm)

 #define X_MIN_POS 5.0
 #define Y_MIN_POS 0.0
 #define Z_MIN_POS 0
 #define X_MAX_POS 220
 #define Y_MAX_POS 220
 #define Z_MAX_POS 240
</code></pre>

<p>What could be my issue? </p>

The problem is in the code.
Please use these:
```
```
// The size of the print bed
#define X_BED_SIZE 220
#define Y_BED_SIZE 220

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 5
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240
```
```
Your problem will be ok.