Cancel.g doesn't do what I want :-)
-
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.