Auto Home and Power Down after canceled print?



  • Hey,

    I was wondering if there were any way to auto home and power down the hot end and heated bed after a canceled print.

    For some reason my machine just sits in the pause position still hot.

    Thanks…





  • To auto home after a cancelled print is generally not a good idea as the print head is likely to crash into the (failed) printed part. Maybe home X and Y might be acceptable, but not Z (or simply move the head to a position at the side of the bed).



  • You can use the stop, pause g code files to first lift the Z then home…..

    Here are my files:

    ; stop.g
    ; called when M0 (Stop) is run (e.g. when a print from SD card is cancelled)
    
    M208 X-44 Y-18 Z0 S1 	  ; Home outside build area
    
    M83 			; Relative extruder moves
    G1 E-10 F3600 		; Retract 10mm of filament
    
    ; Return X and Y to home area
    G91 			; Relative positioning
    G1 Z50 F12000 		; Lift Z by 50mm
    G90 			; Absolute positioning
    G1 X-40 Y-15 F6000	; go to X=-40 Y=-15
    
    M208 X0 Y0 Z0 S1 	; Restrict movements to build area
    
    

    You dont have to use the G1 command if you do not want to alternatively you could send X and Y home with this command:

    G28 XZ ; Home the X and Z axes
    
    

    I just use the G1 command so I don't have to wait for the full homing sequence to complete.

    ; pause.g
    ; called when a print from SD card is paused
    
    M208 X-44 Y-18 Z0 S1 	; Home outside build area
    
    M83 			; Relative extruder moves
    G1 E-10 F3600 		; Retract 10mm of filament
    
    ; Return X and Y to home area
    G91 			; Relative positioning
    G1 Z50 F12000 		; Lift Z by 50mm
    G90 			; Absolute positioning
    G1 X-40 Y-15 F6000	; go to X=-40 Y=-15
    
    M208 X0 Y0 Z0 S1 	; Restrict movements to build area
    
    

  • administrators

    @deckingman:

    To auto home after a cancelled print is generally not a good idea as the print head is likely to crash into the (failed) printed part.

    It is a good idea on a delta printer.



  • @dc42:

    @deckingman:

    To auto home after a cancelled print is generally not a good idea as the print head is likely to crash into the (failed) printed part.

    It is a good idea on a delta printer.

    Ahh… bugger. I keep forgetting about Deltas. Thanks for the correction.



  • David, which macro is called when print is cancelled ?


  • administrators

    cancel.g is called.



  • thanks! is there a list of other files that might be of use?


  • administrators



  • i created cancel.g and it does not run when i press emergency stop button on web interface.

    and i cannot find 'cancel Print' button on web…

    please advise how to link cancel.g to emergency stop or how to add cancel print button to web interface

    thanks!


  • administrators

    The Cancel Print button appears after you use the Pause button to pause a print from SD card.



  • Thanks for all the useful info, but I'm still a little confused after reading up on M0:

    https://duet3d.com/wiki/G-code#M0:_Stop_or_Unconditional_stop says M0 H[non_zero_number] is sent by DWC to cancel a print job, keeping the heaters ON:
    "M0: The optional 'H' parameter, whose value must be non-zero keeps all heaters active. This is what Duet Web Control sends to cancel a paused print."

    Is it a correct assumption that if I have a sys/cancel.g file, that is called instead of DWC simply sending M0 H[non_zero_number]?

    BTW, I can see how the default 'heaters remains on after cancelling print' may be useful behaviour for some cancelled print situations, however I'd like to suggest it is a less-safe default state in which to leave a machine after a print job is cancelled - especially for someone new to the hardware. I was recently caught out after cancelling a print, dashing out for an hour only to come back and discover the bed and extruder still hot - far from the safe state I expected it to be in. Would be interested to hear peoples thoughts.

    I also discovered a possible bug in that after a print job is cancelled using the cancel button, the Control All > Turn everything off isn't functioning (in RRF v1.18beta2 - sorry I'm running a little behind the releases lately) - instead I need to turn off each heated device in turn.


  • administrators

    When M0 is received the firmware runs cancel.g if a print is currently paused, otherwise stop.g. If the file is missing and there is no nonzero H parameter, it turns off all heaters.

    I presume your "Turn everything off" command is a macro. What do you have in the macro file?



  • Many thanks for the clarification David.

    Sorry for the misunderstanding; I don't have a 'turn everything off' macro (am I missing it?) - I was referring to the 'Turn everything off' button in the following screen capture snippet:

    Maybe I broke that button's functionality when I hacked DWC to display a larger temperature graph - I don't see how, but it is a possibility.

    I've just played again with that button and notice it's completely non-functional (i.e. with and without first cancelling a print) - If I turn all heaters on manually, then click 'Turn everything off', it isn't functioning.

    Additionally, I just tried cancelling a print (with bed at set temp, extruder almost at set temp) and restarting the same print only to discover another problem: the extruder temperature is never re-set to printing temperature - the extruder head moves but cold extrusion protection is apparently kicking in to prevent extrusion. This probably needs more testing and verification, but will need to wait a week until I can play again.


  • administrators

    @hairy_kiwi:

    Additionally, I just tried cancelling a print (with bed at set temp, extruder almost at set temp) and restarting the same print only to discover another problem: the extruder temperature is never re-set to printing temperature - the extruder head moves but cold extrusion protection is apparently kicking in to prevent extrusion. This probably needs more testing and verification, but will need to wait a week until I can play again.

    That would be because you started the new print with no tool selected, and you didn't have a T0 or other tool selection command in your start gcode in the file you printed.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.