Welcome! Log In Create A New Profile

Advanced

Custom end g-code - wait for extruder to cool down?

Posted by chrishamm 
Custom end g-code - wait for extruder to cool down?
May 14, 2014 06:00AM
Hello,
I'm trying to use some custom end g-code allowing me to wait for the nozzle to be cooled down to 160°C, so I can clean the nozzle easily. I came up with this g-code, but I'm afraid M116 doesn't wait for the lower target temperature to be reached (perhaps because the heater is not active when waiting for the temperature to drop?) :

M104 S200 ; initial temp setting
M116 ; wait for temperatures
...
M140 S0 ; turn off heated bed
M106 S255 ; set fan to 100%
M104 S160 ; set extruder temp to 160C
G1 X2 Y200 F3000 ; park the machine
M116 ; wait for temperature to be reached
M104 S0 ; turn off extruder
M106 S89 ; set fan to 35%

This is what happens:
- Fan blows at 100%
- Nozzle moves to X2 Y200
- Temperature drops to 200°C
- Extruder turns off (at 200°C)
- Fan blows at 35%

I'm using 0.59-dc42, and everything else is working nicely. Am I missing something here?

Thanks!
Re: Custom end g-code - wait for extruder to cool down?
May 14, 2014 06:32AM
Hi zpl,

I agree, it doesn't seem to be working as I would expect. I'll take a look at the code.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Custom end g-code - wait for extruder to cool down?
May 14, 2014 07:34AM
I found the problem. The % character at the end of the comment at the end of the previous line was causing the M160 command not to be recognised. I suspect that the web interface is not escaping the % character during the upload. To fix it, either copy the file on to the SD card without using the web upload, or remove the % character from the comment.

I'll fix this issue in the next version of the web interface or the firmware, depending on where the problem lies.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Custom end g-code - wait for extruder to cool down?
May 14, 2014 08:41AM
It turns out that to handle % characters in lines of gcode correctly needs fixes to both the web interface and the firmware. I now have this working. Will be released in firmware 0.59a-dc42 and web interface 0.76.

Edited 1 time(s). Last edit at 05/14/2014 08:41AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Custom end g-code - wait for extruder to cool down?
May 14, 2014 01:22PM
Ahh great, simple as that - thanks for looking into it, now it's working perfectly smiling smiley
Sorry, only registered users may post in this forum.

Click here to login