re-home after every layer

Post Reply
Isaac_alaska
Posts: 48
Joined: 17 Nov 2014, 03:51

re-home after every layer

Post by Isaac_alaska »

having a problem with my x-axis where it loses steps occasionally, i'm not sure if the problem is because of a broken wire, axis binding, or overheated stepper driver. but my temporary solution, since i need to get a part printed, is to simply re-home x after every layer. i would like to lift Z before homing, but i'm not sure the parameter to send to lift from the current Z value. i think i saw there's some parameters for things like that but i don't see them.
any tips? this is what i have so far

Code: Select all

G10 S0;		short retract
G28 X;		re-home x-axis
G11 S0;		short un-retract
Isaac_alaska
Posts: 48
Joined: 17 Nov 2014, 03:51

Re: re-home after every layer

Post by Isaac_alaska »

well, that does not seem to have worked at all.
User avatar
plexus
Site Admin
Posts: 114
Joined: 02 Sep 2014, 21:39

Re: re-home after every layer

Post by plexus »

if you have skips rehoming isnt going to help. troubleshoot the list of possibilities you listed. gremlins like this are often a challenge. is the motor running hot? if not then you might need to increase current to the motor. may have a dying driver although unlikely. try a different motor. etc. troubleshoot.
Isaac_alaska
Posts: 48
Joined: 17 Nov 2014, 03:51

Re: re-home after every layer

Post by Isaac_alaska »

sadly your answer is the same as the answer i've seen given in a lot of other places. obviously i want to fix the problem, but in the mean time, i want to see what this does. using G28 as i gave as an example is NOT a good idea, as the machine completely forgets where it's at in Y, and and starts back at z=0 for every layer. it looks like G30 might work, but i didnt' see G30 listed anywhere on the reprap page, maybe it's not utilized in marlin firmware?
appreciate your help but i'd still like to know if there's a way to re-home any given axis mid-print
inventabuild
Posts: 271
Joined: 09 Nov 2014, 23:03

Re: re-home after every layer

Post by inventabuild »

If you're talking about doing this after the extruder has already homed itself at the beginning of the print (so it knows where home is) then you can use the following gcode to go to X=0 Y=0. The G90 tells the printer to use the specified coordinates for its destination. The F1500 will move it there at (1500 mm/min)/(60 sec/min) = 25mm / sec.

G90 ; absolute coordinates activated
G1 X0 Y0 F1500 ; positions hot end at X0 Y0 at 25mm / sec

Edit: In some of my gcode I use G28 X to home the hot end along the X axis. I believe you can also use G28 X0 Y0 or G28 X Y (the 0 is implied) to home the hot end in X & Y using one line of code.

If you replace G90 with G91 in the above example then all moves would be relative to the last position. So in the above example if you used G91 instead of G90 then the hot end would not move at all because you are telling it to move a distance of X=0 Y=0 which is a distance of 0.

I use the below code in the Select New Ext & Warm tab to warm up the new extruder and send it off to the right side of the bed about in the middle of the y-axis (pos = X298 Y137.5) while it warms.

G90 ; absolute coordinates activated
T<EXT+0> ; automatically select new extruder
M104 S<TEMP> ; Set Extruder temp(no wait for warm up)
G1 X298 Y137.5 F3600 ; X298 allows both ext off bed right side
M109 S<TEMP> ; set extruder temp and wait till it's there

In the Cool & Retire Old Ext tab I put this to cool down the old extruder to prevent oozing while the new extruder is printing.

T<EXT+0> ; automatically select new extruder
M104 S<TEMP> ; sets retired extruder to Keep Warm temp
User avatar
Davide Ardizzoia
Posts: 122
Joined: 07 Nov 2014, 13:05
Location: Oleggio, Italy
Contact:

Re: re-home after every layer

Post by Davide Ardizzoia »

1) the gcode you need is the following (sort of)

G91 ; set relative coords
G1 Z1 F200 ; detach extruder(s) 1mm from part
G90 ; set absolute coords
G28 X0
G1 X<NEXTX> Y<NEXTY> F6000 ; go to next printing position
G91 ; set relative coords
G1 Z-1 F200; kiss the part :-)
G90 ; set absolute coords

2) place above gcode into N[*] layers gcode area

3) Set the [*] layer value to the resolution needed (is you set this field to 1, will home the X axis at each layer)

Best Regards
Davide Ardizzoia
Post Reply