User avatar
scott216
Posts: 26
Joined: Sat Feb 28, 2015 6:34 pm

If-Then statement in End gcode block

Wed Sep 02, 2015 9:42 am

I would like to modify my end-gode block to do the following:
If Z >= 75 AND Z < 150, then move build plate incrementally down by 5 mm
Else If Z < 75 then move Z to absolute position of 75
Else Move Z to absolute position 155

Can I even do If-then statements in G-code? I have a Makerbot Replicator 2.
--------------------------------------------------------------------
Makerbot Replicator 2
Upgraded Aluminum Arms, Alucarriage, Alu-X-Ends and 3-in-1 Extruder
Mac OSX v10.9.5

User avatar
KeyboardWarrior
Posts: 480
Joined: Thu Jun 19, 2014 5:02 pm

Re: If-Then statement in End gcode block

Wed Sep 02, 2015 4:33 pm

scott216 wrote:I would like to modify my end-gode block to do the following:
If Z >= 75 AND Z < 150, then move build plate incrementally down by 5 mm
Else If Z < 75 then move Z to absolute position of 75
Else Move Z to absolute position 155

Can I even do If-then statements in G-code? I have a Makerbot Replicator 2.
I don't know of a way to do an IF statement, but the safe way to do this, would be to have

G1 Z155 F1800 ;

At the ending script, then it would move to the bottom after every print.

User avatar
scott216
Posts: 26
Joined: Sat Feb 28, 2015 6:34 pm

Re: If-Then statement in End gcode block

Wed Sep 02, 2015 5:42 pm

It already moves to the bottom, but I don't want it too.
--------------------------------------------------------------------
Makerbot Replicator 2
Upgraded Aluminum Arms, Alucarriage, Alu-X-Ends and 3-in-1 Extruder
Mac OSX v10.9.5

Return to “General Discussion and Tips”