Homing with dual endstops on either X or Y error after moving 450mm

Typically this error occurs because you have not setup the print bed size in the Marlin firmware to match the size of your machine. The 450mm is not a value I’ve seen before, but I don’t have access to the LowRider firmware at the moment to check what it has as defaults. In configuration.h it is these two lines:

// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200

If you are further away from the origin than whatever these two values are set to when you begin to home, then Marlin throws an error and quits. No g-code exists that sets these values, so unfortunately this change needs to be made in the firmware and the firmware flashed.

1 Like

Ah good idea, I will check the source tomorrow. Thanks!

I may be missing something, but this is what I’m finding in configuration.h
// The size of the print bed
#define X_BED_SIZE 300
#define Y_BED_SIZE 300

I don’t understand the 450mm. Given the values you find in configuration.h, your homing should fail after only 300mm of travel. Regardless, these two values should be changed to match your table size in mm. The 450mm makes me think you have not set your mm per steps correctly. Move your X and Y a specified distance through g-code. Measure the result. The steps per mm can be changed through an M92 g-code, but since you are editing the firmware anyway, it can also be changed in configuration.h here (assuming you’ve never used M92 and saved the result):

 * Default Axis Steps Per Unit (steps/mm)
 * Override with M92
 *                                      X, Y, Z, E0 [, E1[, E2...]]
#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 400, 100 }

Hi Robert, thanks again. My mm/steps are good, I have drawn x’s with the machine in an 825mm square for squaring and the X and Y are dead on. I was wondering if it’s a timeout. Could it be that the time it takes to travel 450mm during homing is the limit and not the distance traveled that is the error?

I seriously doubt it it is a timeout issue. The first step is to change these values and see what happens. Note that trying to home outside of the table size will definitely cause Marlin to stop and throw an error.

1 Like

Good idea. I’ll set them to match my table and try again.

I had the same issue and I resolved it the way @robertbu suggested.

1 Like

Thanks, good to know! I’ll report back with my results.

Edit: how rude, didn’t say thanks. Thank you @robertbu !

Ok new to me, platform.io and vscode. Kind of neat, and I found a vim emulator extension. :wink:
My notes taken during process:

> M666
Dual Endstop Adjustment (mm): Y2:5.50 Z2:1.00

Modiifed Configuration.h
// davem changed from 300,300 to match lowrider dims
#define X_BED_SIZE 850
#define Y_BED_SIZE 2050

Used vscode and platformio to change bed size. Did a build. Tried an upload over usb and thought I saw an error, also board didn’t seem to reset. Maybe it did. Found firmware.bin that was created, put it on microsd and flashed it. Verified firmware.cur file on microsd. Checked M666, still showing same offsets. Odd, that survived the flash. Tried homing from beyond 450,450 works fine!

Checked M666, still showing same offsets.

Not sure of what values you are referring, but any values that you have set and written to EEPROM (M500) with g-code will still be there after you flash the firmware (unless your firmware is way out of date). If you need get rid of them an M502 (Factory Reset) should do the job.

Aha, I thought flashing would clear the offsets I had in there for squaring using M666. Great that they survived. :slight_smile:


1 Like

Vim is for kids, go Emacs :slight_smile: Not so much an editor, more an OS…

Lol many sleeps ago a programmer tried to hook me on Emacs. While vi felt comfortable after a few minutes, Emacs didn’t fit me well. I didn’t give it much of a chance I’ll admit, but I’ve been happily using vi for 28 years and always type j’s and k’s and colons and slashes when I’m using a different editor. :smiley:

I actually learnt vi when I was doing UNIX kernel development when 64KB was enough for a multi user system, this was all green screen.

I then learnt Emacs, to be honest, its not difficult to learn, 25-30 years is easily enough. I still learn new things, only yesterday I looked up how to do large scale block indentation, which for an old developer is kinda embarrasing, but I’d never needed it in decades (or more likely I learnt it, and in my dotage forget it).

My muscle memory still works fine for vi and for some things I always use vi, e.g. vi /etc/hosts. No idea why (might be to do with the line end at end of the hosts file), things like global substition and replace are very, very easy on vi, more complex on Emacs. On the flip side, git is dead simple on Emacs.

I have had to use cat, ed, sed and awk as editors before now for barely functioning Sun boxes which wouldn’t even load vi. Now thats a toe curling adventure.

All the best


1 Like

Ryan, can I have permission to boot someone off the forums?


Vim is amazing. Emacs hurts my fingers just thinking about it. Too many key chords.

  1. There is a command line for that.
  2. The vim plugins for git are very full featured.

I use vim so much I have tridactyl browser plugin and with a ctrl+i, it will open the input box in vim and let me edit longs posts in these forums in vim. I’m doing it right now! jk:wq



Those that can, do, those that can’t, use vim. :wink:

Vim is OK for simple usage I suppose, bit basic IMHO, it doesn’t have it’s own memory manager, scheduler, pager and client/server so that clearly limits its potential usage. There is a view that Emacs will actualy become sentinent in the next few versions.

BTW Emacs used to stand for Eight Megabytes And Constantly Swapping. That was when my Sparcstation had 16MB Ram (and that was considered a lot).

Have fun, I’m back to reading academic PDF’s about scanline fills for complex polygons with holes.


I started typing a pretty scathing response, but then I remembered that I don’t care that much and you do whatever makes you happy.

I recommend new software engineers use vscode. I just don’t feel compelled enough to convince others to use vim. But I would never leave it.