Gcode commands for lifting Z axis then returning
 
Benachrichtigungen
Alles löschen

Gcode commands for lifting Z axis then returning  

  RSS
Villagewolf
(@villagewolf)
Active Member
Gcode commands for lifting Z axis then returning

So here's my issue: I have a color change print that includes a temperature change as well. The temp change happens a layer before or after the color change depending on filament. The issue shows up at the temperature change. The nozzle rests on the last layer while it reaches determined temp. This often leaves a small dot of the wrong color. I would like to have the nozzle raise up a bit while the color change happens. i use this set of commands for many different prints so I can't use an absolute value.

The Gcode(they can be flipped around so the command would ideally be with the wait command) being injected is:

M109 S185; set temp to 185 before continuing

M600 G1 E0.4 F1500 ; prime after color change

Would this work?

G91

G1 Z+10

temp change

G1 Z-10

Veröffentlicht : 31/08/2023 5:06 pm
Neophyl
(@neophyl)
Illustrious Member
RE: Gcode commands for lifting Z axis then returning

Don't forget to put it back into absolute positioning at the end.

 

 

Veröffentlicht : 31/08/2023 5:22 pm
Villagewolf
(@villagewolf)
Active Member
Themenstarter answered:
RE: Gcode commands for lifting Z axis then returning

The G1 commands will work though?

Veröffentlicht : 31/08/2023 5:29 pm
Neophyl
(@neophyl)
Illustrious Member
RE: Gcode commands for lifting Z axis then returning

Should do.  The only thing to watch out for is that the M600 command is actually telling the printer to run through a bunch of commands determined by the firmware.  Those commands will of course involve the extruder but the normal movement in XY you get to the unload/load position the printer could internally be settings either relative or absolute so you will have to be careful where you put the various G90/91 lines or you *might* get some unexpected movement.  The type is supposed to be restored to what it was before the M600 but I've seen some printers (not prusa's) where the colour change put it into the wrong positioning mode and then bad things(tm)  happened.

Personally id test it on a simple 10mm x10mm by 25mm high part with the M600 at around 20 so that its further from the bed with standby the power switch just in case.  Then again I'm the cautious sort that also like empirical evidence.  'Should' is great but not as good as 'IS' 🙂

Veröffentlicht : 31/08/2023 5:56 pm
Villagewolf
(@villagewolf)
Active Member
Themenstarter answered:
RE: Gcode commands for lifting Z axis then returning

Cool Cool. Thanks for the input and insights Neophyl. I may/may not report back. 

Veröffentlicht : 31/08/2023 7:06 pm
Villagewolf
(@villagewolf)
Active Member
Themenstarter answered:
RE: Gcode commands for lifting Z axis then returning

Don't think that code worked. It's doing something funny with the absolute/relative command I believe. I can't share the slice file cuz it's proprietary work. It's taking the layer from the upper part of the print and putting it lower. The design is cylindrical and it puts the gcode layer halfway up the cylinder and leaves a blank layer where the color/temp change is. It's very odd and clear I don't know what I'm doing. 🤣 

Veröffentlicht : 05/09/2023 6:37 pm
Teilen: