Cancel script….



  • Hi,

    It was to see how the following could be done:

    When I have to cancel a print job, for the moment more often than I would like, I do it by turning off the printer.
    I know it's not the best way. I had planned to do it with scripts, I see two options:

    TO CANCEL AN IMPRESSION:

    a) - That when a printout is canceled by DWC, a script is executed, and in that Script it includes the orders that I indicate below. Stop.g, it is executed only when the printing is finished, or also when it is canceled? (If it is executed when it is canceled it could be the solution)

    or

    b) - Execute a Script, cancel the printing and execute certain gcodes

    I thought to include the following ones. What is your opinion? Add / Remove or change order something?

    [[language]]
    G1 E-40 F100; Retract filament
    G28; Homing
    M140 S-273.15; bed switched off
    M104 S0; heater switched off
    
    


  • mmm…..

    this resolves my dudes... contents of [c]stop.g[/c]

    [[language]]
    ; stop.g
    ; called when M0 (Stop) is run (e.g. when a print from SD card is cancelled)
    ;
    ; generated by RepRapFirmware Configuration Tool on Sun Jan 21 2018 07:57:47 GMT+0100 (Hora estándar romance)
    
    


  • @peirof:

    Hi,

    It was to see how the following could be done:

    When I have to cancel a print job, for the moment more often than I would like, I do it by turning off the printer.
    I know it's not the best way. I had planned to do it with scripts, I see two options:

    TO CANCEL AN IMPRESSION:

    a) - That when a printout is canceled by DWC, a script is executed, and in that Script it includes the orders that I indicate below. Stop.g, it is executed only when the printing is finished, or also when it is canceled? (If it is executed when it is canceled it could be the solution)

    or

    b) - Execute a Script, cancel the printing and execute certain gcodes

    I thought to include the following ones. What is your opinion? Add / Remove or change order something?

    [[language]]
    G1 E-40 F100; Retract filament
    G28; Homing
    M140 S-273.15; bed switched off
    M104 S0; heater switched off
    
    

    Check out cancel.g in the documenation, I think this file would do what you want.

    https://www.duet3d.com/wiki/Configuring_RepRapFirmware_for_a_Cartesian_printer#Pause.2C_resume_and_cancel_files


  • administrators

    The usual way to cancel a print is to press the Pause button in DWC or on PanelDue, then the Cancel button. When you do that, macro file sys/cancel.g is run, if it exists.


 

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