Return to Object Z Height in "After Side Transitioning" Section
I’m trying to do a side transition at a particular XYZ coordinate on an MK3. I’m able to move the head to that location and purge the filament properly. I currently move the print head to Z50mm at position X235 Y15. This makes a nice little rope coil of filament on the bed. I then want a condition that will raise the print head if the currently printed object is above 50mm so I can move the bed without hitting the object. I am using the “nextZ” variable in the after transition section, but its value resolves to 50mm (current position), not the next Z position for the object. The documentation states that “nextZ” should be the “Next Z position (on the print) “ (Section 4.7)
Here is my code:
Before transition:
@printerscript 1.0
"G92 E0 ;Reset extruder"
"G1 X235 Y15 F3600 ;Move to blob location"
"G1 Z50 ;Raise printhead to 50mm"
"M107 ;Turn the fan off"
After transition:
@printerscript 1.0
"G92 E0 ;Reset extruder"
"M106 S255 ;Turn fan on"
" ; nextZ = {{nextZ}}"
if (nextZ>50) {"G1 Z{{nextZ}} F2000"}
"G4 S15 ;wait 15 seconds"
"G1 E-1 F1200 ;Retract"
"G1 Y210 F8000 ;Break filament"
"G4 S5 ;wait 5 seconds"
"G92 E0 ;reset extruder"
Any help appreciated.
Is this a good question?