Skip to main content

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.

Answer this question I have this problem too

Is this a good question?

Score 1
Add a comment

4 Answers

Most Helpful Answer

Hey @madmax, thanks for reaching out and sorry in our delayed response due to the holidays. Could you please send the GCode file to support@mosaicmfg.com so we can look this over with the CANVAS team? Thank you!

Was this answer helpful?

Score 1
Add a comment

Thanks Alina. I hope you and your team had a great holiday. I have sent the sample gcode to the support team along with a potential solution.

Was this answer helpful?

Score 0
Add a comment

What was the solution?

Was this answer helpful?

Score 0

Comments:

Hey Jason,

Danny calculated the z height using the layer height variables.

After Side Transitioning:

@printerscript 1.0

"G92 E0 ;Reset extruder"

"M106 S255 ;Turn fan on"

"G4 S15 ;wait 15 seconds"

JDMZ = firstLayerHeight + layer*layerHeight

" ; nextZ = {{nextZ}}, Layer = {{layer}}, JDMZ = {{JDMZ}} "

if (JDMZ>50) {"G1 Z{{JDMZ}} F2000"}

";G1 E-1 F1200 ;Retract"

"G1 Y190 F8000 ;Break filament"

"G1 Y212 F1000 ;Activate sidewipe arm"

"G4 S5 ;wait 5 seconds"

"G92 E0 ;reset extruder"

He also designed a small wiper arm that is activated by the print bed on the MK3S to replace the BigBrain bucket.

by

Add a comment

The nextZ variable didn’t work. It always seems to resolve to the current z height. I was able to calculate the z height by using the layer variable. The following code in the “After side transitioning” section returns the print head to the print z height.

"G1 X255 Z{{firstLayerHeight + layerHeight*layer}} F3600 ;Return to print layer"

Was this answer helpful?

Score 0
Add a comment

Add your answer

Danny Milla will be eternally grateful.
View Statistics:

Past 24 Hours: 0

Past 7 Days: 0

Past 30 Days: 3

All Time: 47

Send our support team a message

© 2020 Mosaic Manufacturing Ltd.