Welcome! Log In Create A New Profile

Advanced

Z Home at X=100 Y=100

Posted by Paul McCoy 
Z Home at X=100 Y=100
August 30, 2015 06:30PM
I would like to home the Z axis of my Prusa i3 printer with the nozzle in the middle of the bed. The printer is running Marlin firmware.
Any suggestion on where and what code to change, please?
Re: Z Home at X=100 Y=100
August 31, 2015 10:59AM
You can enable safe homing:

#define Z_SAFE_HOMING

This will require you to home x and y first, and they must not time out or it will not home. Generally you can use G28 to home all axes at once.
See comments in configuration.h.
Re: Z Home at X=100 Y=100
August 31, 2015 11:51AM
Hi imqqmi,

I have Z_SAFE_HOMING set already...what I would like to do is:
1. Home X axis
2. Move X axis to 100mm
3. Home Y axis
4. Move Y axis to 100mm
5. Home Z axis

Inserting the 2 moves is the challenge for me. What commands and where to insert them.

Thanks,
Paul
Re: Z Home at X=100 Y=100
September 01, 2015 04:52AM
Hi,

G30 P(1-4) ?

++JM
Re: Z Home at X=100 Y=100
September 01, 2015 04:29PM
Just break them down in single actions. G28 with an x y or z parameter homes the given axis only. G30 homes z at current xy position. G28 Z should also work if it's done within the time out period. You can find the gcode reference on reprap.org.

G28 X
G1 X100
G28 Y
G1 Y100
G30

That should do the trick.

Edited 1 time(s). Last edit at 09/01/2015 04:29PM by imqqmi.
VDX
Re: Z Home at X=100 Y=100
September 01, 2015 04:38PM
... you can combine the XY-moves - the difference is the diagonal move to the center:

G28 X Y
G1 X100 Y100

To get this running in Pronterface I'm writing the lines into a macro and add a custom button with a spelling name ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Z Home at X=100 Y=100
September 02, 2015 09:58AM
Thanks, all for the G code solutions.

What I guess I was not clear on is I would like to add this to the Marlin 'Auto Home' function under the Prepare menu. I run this printer almost exclusively using the SD card.

Thanks again,
Paul
Re: Z Home at X=100 Y=100
September 02, 2015 12:55PM
You can save the above gcode in a file and put it on the sd card. I don't know why you don't just add it to the start gcode in the slicer for every job. That would make it redundant in the menu.
I don't know exactly but if you know a little about c coding I gues you can take these steps:
- Add a menu entry, see the appropriate file and duplicate one item and make it point to your function
- create a function and put the gcode into the buffer and send it to the gcode processor, or find out how the other functions do it and copy and change the code
- recomplie and program the arduino

You could ask this in the marlin github, the devs there will definitely know how to do it. It may be useful to be able to add menu items executing custom gcode.
Sorry, only registered users may post in this forum.

Click here to login