Z-axis up without homing macro
-
Question I have made a macro so when I have to cancel a failed print it will move the Z-axis up 10 mm that way if I am not home I can raise the head and not have the hot end get stuck on the part. Here is the macro
M564 H0 ;Allow movement with out homing
G91 followed by G1 Z10
M564 H1The only problem is some time the Z-axis will move down instead of up, does anyone have a suggestion as to why or a suggestion to a better macro?
-
@silver1882 If the motion is in relative mode, G1 Z10 will always move the nozzle up 10 mm. If it's in absolute mode, G1 Z10 will move the nozzle to Z=10, so depending on where the nozzle is starting, it may move up or down. Try:
G91 ; set relative positioning mode
G1 Z10 F300 ; move nozzle up (or bed down) 10 mm at 5 mm/sec
G90 ; return to absolute positioning mode -
I just tried that macro and my head went toward the bed.
-
@mrehorstdmd said in Z-axis up without homing macro:
G90 ; set relative positioning mode
G1 Z10 F300 ; move nozzle up (or bed down) 10 mm at 5 mm/sec
G91 ; return to absolute positioning modeG90 and G91 are reversed in this snippet.
G90 is absolute position, G91 is relative.
https://duet3d.dozuki.com/Wiki/Gcode#Section_G90_Set_to_Absolute_Positioning
-
@phaedrux Doh! I went back and edited the previous post.
That's what happens when you get old... -
Don't feel bad, I have to open the wiki almost every time just to double check. I've started to remember by thinking that absolute starts with A, so it comes before relative, so it's G90.
-
@phaedrux I do feel bad- I was looking at the wiki when I wrote it. The error just didn't register...
-
Ok thanks I will give it a try as soon as my printer is done printing.
-
@silver1882 said in Z-axis up without homing macro:
Ok thanks I will give it a try as soon as my printer is done printing.
Why do you have the M564 commands?
If you are doing this during a print the printer must already be homed.
-
I tested it and that works great thanks.
-
If I am away from my house and I have to cancel the print because of a problem my printer is no longer homed. I just wanted to be able to raise the head so it doesn't cool down setting on the part.
-
@silver1882 said in Z-axis up without homing macro:
If I am away from my house and I have to cancel the print because of a problem my printer is no longer homed. I just wanted to be able to raise the head so it doesn't cool down setting on the part.
Why do you think canceling a print un-homes the printer?
-
It would depend on what you have in cancel.g I think.
-
@phaedrux said in Z-axis up without homing macro:
It would depend on what you have in cancel.g I think.
Well yes that certainly could happen.
Though why there would be something in the file to do that escapes me at the moment. I haven't found any reason to date to do something that would un-home the printer.
Curious.
-
For instance in my cancel.g I home XY and then turn the motors off.
-
@phaedrux said in Z-axis up without homing macro:
For instance in my cancel.g I home XY and then turn the motors off.
Why do you turn the motors off?
For me most times a canceled print is quickly followed by another attempt after an appropriate change or two.
Frederick
-
I suppose just for noise. To start another print it would be re-homing anyway, and depending on why and when it was canceled it might be awhile before another attempt is made.
-
@phaedrux said in Z-axis up without homing macro:
I suppose just for noise. To start another print it would be re-homing anyway, and depending on why and when it was canceled it might be awhile before another attempt is made.
Noise?
Do your steppers make noise when not moving?
Frederick
-
Yeah there's a slight hum/whine when energized. Nothing too offensive. When I was setting up the macros I figured why not power them off?
-
@phaedrux said in Z-axis up without homing macro:
Yeah there's a slight hum/whine when energized. Nothing too offensive. When I was setting up the macros I figured why not power them off?
Evidence that great minds don't always think alike.
Frederick