Cancel.g doesn't do what I want :-)
-
@kuhnikuehnast said in Cancel.g doesn't do what I want :
Really strange... Tried to switch of the part cooling Fan (m107 and tried also M106), a G1 X320 Y320 and also wanted to switch of the Stepper Motors. But the only thing that is done is a G1 X320 move and X and Y are disabled. The part cooling fan stays enabled and, the z motors also and the Y movement doesn't work...?
I use
M104 s0 ; hotend off *
M140 s0 ; bed heat off*
M106 s0 ;fan off
G1 x0 y0 f5000 ; move hotend away from print*
M84 ; motors off“*” means I also use it in my end script in Slic3r
-
The usual dumb question ... you named it "cancel.g" ...? Because I think it is case sensitive.
I have this /cancel.g and it works:
; called when a print is cancelled after a pause.
M106 P0 S0 ;Set fan 0 (part cooling fan) to 0%
G28 ; home all towers -
Can you confirm that the cancel.g file is in the /sys folder of the SD card?
-
Maybe you have something in your pause.g which prevent calling cancel.g?
-
@denke said in Cancel.g doesn't do what I want :
The usual dumb question ... you named it "cancel.g" ...? Because I think it is case sensitive.
I have this /cancel.g and it works:
; called when a print is cancelled after a pause.
M106 P0 S0 ;Set fan 0 (part cooling fan) to 0%
G28 ; home all towersthe fan is disabled even if it is a thermostatic fan?
-
@lakko said in Cancel.g doesn't do what I want :
@denke said in Cancel.g doesn't do what I want :
The usual dumb question ... you named it "cancel.g" ...? Because I think it is case sensitive.
I have this /cancel.g and it works:
; called when a print is cancelled after a pause.
M106 P0 S0 ;Set fan 0 (part cooling fan) to 0%
G28 ; home all towersthe fan is disabled even if it is a thermostatic fan?
I don't know, I didn't try it yet
-
cancel.g is in the /sys folder (same folder as config.g)
This is my cancel.g file:
; stop.g
; called when a print is cancelled after a pause.
M140 S0 ; heated bed heater off (if you have it)
M104 S0 ; Extruder off
G91 ; relative positioning
G1 E-1 F300 ; retract the filament a bit before lifting the nozzle to release some of the pressure
G1 Z+0.5 E-3 X-20 Y-20 F9000 ; move Z up a bit and retract filament
G90 ; absolute positioning
G28 X0 Y0 ; move X/Y to min endstops so the head is out of the way
G1 X320 Y320 ; parks X head pushes bed out to front so you can pull part
M106 P1 S0 ; fan off
M84 ; steppers offand this is my pause.g
; pause.g
; called when a print from SD card is paused
;
; generated by RepRapFirmware Configuration Tool on Fri Mar 23 2018 20:49:13 GMT+0100 (Mitteleuropäische Zeit)
M83 ; relative extruder moves
G1 E-10 F3600 ; retract 10mm of filament
G91 ; relative positioning
G1 Z5 F360 ; lift Z by 5mm
G90 ; absolute positioning
G1 X0 Y0 F6000 ; go to X=0 Y=0Really strange...??? Any ideas?
-
btw: just found another file on the /sys folder called stop.g ? Where is the difference between these 2 files? (Also posted in the stop.g the same code as in cancel.g but with no effect... )
-
stop.g will be run if you send the M0 command.
https://duet3d.dozuki.com/Wiki/Gcode#Section_M0_Stop_or_Unconditional_stop
-
Just looked at the console:
Cancelled printing file XXXX.gcode, print time was 0h 23m G0/G1: insufficient axes homedBut there is no gcode that disables the steppers before???
-
The "insufficient axes homed" may indicates that your homex.g or homey.g file isn't right. Try sending G28 X0 Y0 from the console and see if you get the same message.
-
M25
executes macro filepause.g
M24
executes macro fileresume.g
M0
executes macro filestop.g
I know that after I press ""pause print"" in DWC and press cancel, its executes macro file
stop.g
, which in my case includes these commands:;Stop Printing (M0) G10 P0 S0; Turn off extruder heater M140 S0; Turn off bed heater M106 P2 S0; Turn off cooling Fan M300 S100 P500; Sound beep using PanelDue buzzer, frequency Hz (Snn), Duration (Pnn)
I don't have
cancel.g
file in my sys folder,
What am I missing? -
If you press Pause and then Cancel, it runs cancel.g. Whereas if the print terminates by executing M0 at the end of the file, it runs stop.g.
-
Thank you very much.
-
@dc42 tried G28 X0 Y0. This works just fine. Don't get any error messages and the extruder homes properly. Any other idea why this problem occurs?
Here my homex.g:; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool on Fri Mar 23 2018 20:49:13 GMT+0100 (Mitteleuropäische Zeit)
G91 ; relative positioning
M98 Pretractprobe.g ; retract mechanical Z probe
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 X+370 F1800 ; move quickly to X axis endstop and stop there (first pass)
G1 X-5 F6000 ; go back a few mm
G1 S1 X+370 F360 ; move slowly to X axis endstop once more (second pass)
G1 Z-5 F6000 S2 ; lower Z again
G90 ; absolute positioningand my homey.g:
; homey.g
; called to home the Y axis
;
; generated by RepRapFirmware Configuration Tool on Fri Mar 23 2018 20:49:13 GMT+0100 (Mitteleuropäische Zeit)
G91 ; relative positioning
M98 Pretractprobe.g ; retract mechanical Z probe
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 Y370 F1800 ; move quickly to Y axis endstop and stop there (first pass)
G1 Y-5 F6000 ; go back a few mm
G1 S1 Y370 F360 ; move slowly to Y axis endstop once more (second pass)
G1 Z-5 F6000 S2 ; lower Z again
G90 ; absolute positioning -
strange thing is, that the cancel.g is exactly the same code as I use in the end-script in simplify3d. And there it works just fine!
-
Are you sure that the "insufficient axes homed" message was produced by cancel.g, or could it have been produced at the start of the print?
-
omg! I now found the problem!
In my homex.g I told the machine to travel 370 to reach the endstop. But as I pause the extruder at X0 Y0 and then move the extruder to X-20 I have to move at least 390...
-
@dc42 So cancel.g will only run if pause.g was executed before and never else? (Need to know so I could modify the G-Code a little)
greetings kuhni
-
@kuhnikuehnast said in Cancel.g doesn't do what I want :
@dc42 So cancel.g will only run if pause.g was executed before and never else? (Need to know so I could modify the G-Code a little)
greetings kuhni
What actually happens is that when the firmware receives the M0 command when an SD card file is being printed, it closes the file. Then it looks for cancel.g if the print was in the Paused state, and stop.g otherwise. If the file is not found then it takes default action, which is basically turning all the heaters off.