End of print conditional position change?
-
Hello, I'm trying to make my life a touch easier and prevent errors like clicking the wrong button at the end of a print, so I was wondering if there's a way to do this:
I want the Z to increase by 100 at the end of a print, but not if it will go past the limit (305).
Is it possible to add a end gcode in the slicer like:
if Z is between 0 and 200, add 100 to Z
If Z is between 201 and 249, Move Z to 300
If Z is 250 or more, don't move Z -
@thalios if you've set up your machine limits it will respect them anyway
Try moving to z=300, then jogging it 100mm via DWC. It will still end up at 305mm in your case. Simply add a relative motion to your end gcode.
Alternatively you could add some conditional gcode to stop.g to do something more clever?
-
@engikeneer That's not really what I want to do. Yes it is set properly in the Duet, but I want it to do different things as per my example depending on where it's at. I don't want a 25mm print to send the bed all the way down to 305 for nothing.
-
@thalios
Do as @engikeneer suggested and put your conditional code in stop.g
use the object model to get the current Z height. -
I was thinking something like this:
{if Z< 200} G1 Z+100 F10000
{elsif Z>= 200} G1 Z300 F10000
{endif}I just cannot find infos on wether these commands are valid..
I guess i'll just try it hehe
-
@thalios said in End of print conditional position change?:
I was thinking something like this:
{if Z< 200} G1 Z+100 F10000
{elsif Z>= 200} G1 Z300 F10000
{endif}I just cannot find infos on wether these commands are valid..
I guess i'll just try it hehe
The wiki section on IF statements is here
https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Conditional_constructThere are lots of examples in the meta commands section of the forum that should help you construct what you want.
-
Wow I was approaching this totally the wrong way...
All I have to do, as per your recommandations, is to set in relative mode, and add 100 to Z...
I was WAYYYYYYY overthinking this...
Thanks guys