Start Gcode "Trying to extrude with no tool selected"
-
I'm working on getting a little more automation in my start gcode. My workflow goes like this.
- Power on printer
2 Run a macro that homes the towers (delta printer), moves to center of bed, Z5. Puts the bed to standby temp of 60, nozzle standby temp of 130. Does a G30 and then a G32. Then lifts the nozzle center of bed, Z300. This leaves the heaters in standby temps. - Send a gcode sliced with PrusaSlicer with the below start gcode
M107 ; turn off part cooling fan incase PrusaSlicer doesn't M568 P0 R0 S0 A0 ; set turn off tool 0 G90 ; send absolute coordinates M220 ; set movement feed to 100 percent G28 X ; home x axis first G28 Y ; home y axis second G28 Z ; home z axis last G1 Z25 F1800 ;E move nozzle to Z25 G1 X0 Y-55 F1800 ;E move nozzle to X0 Y-55 M140 P0 R0 S{first_layer_bed_temperature[0]} ; heat bed to first layer temperature M116 ; wait for bed to reach temperature M568 P0 R0 S{first_layer_temperature[0]} A2 ; set hotend to first layer temperature M116 ; wait to reach temperatures M221 ; reset extruder flow to 100 percent G92 E0 ; zero the extruder G1 E5 F2400 ; unretract filament from previous print end retraction G92 E0 ; zero the extruder G1 E20 F300 ; purge filament 20mm G92 E0 ; zero the extruder G1 Z{first_layer_height} F1800 ;E slowly go to first layer height
I'm having with the section starting with the first G92. It's intended to unretract the filament from the retract at the end of a print and then purge 20mm of filament.
But it's not doing either of those and it's giving me message in the console saying that it's unable to extrude with no tool selected. Yet the second M568 sets Tool 0 to active and to printing temp.
And when it gets to the actual print, it extrudes just fine
I think this is due to the fact that if PrusaSlicer doesn't see an M104 in the start gcode, it will do add it on it's own before the start gcode. Which is why I have the first M568, I don't want it to do that until after the bed reaches temp cause it takes longer so I turn the nozzle off immediately.
I'd also rather not set tool 0 active in config.g as I'd prefer it not to be active just in case temps were set without me knowing.
Any ideas on what I'm doing wrong here. Here's my config.g and the beginning of a gcode
; Configuration file for Duet 3 Mini 5+ (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.10 on Fri Jun 03 2022 11:21:39 GMT-0700 (Pacific Daylight Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Voron 0.1" ; set printer name M669 K1 ; select CoreXY mode ; Network M552 P192.168.1.101 S1 ; enable network and set ip address M553 P255.255.255.0 ; set netmask M554 P192.168.1.1 ; set gateway M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0.0 S1 ; physical drive 0.0 goes forwards M569 P0.1 S1 ; physical drive 0.1 goes forwards M569 P0.2 S1 ; physical drive 0.2 goes forwards M569 P0.3 S1 ; physical drive 0.3 goes forwards M584 X0.0 Y0.1 Z0.2 E0.3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E570.00 ; set steps per mm E562.00 M566 X360.00 Y360.00 Z30.00 E720.00 ; set maximum instantaneous speed changes (mm/min) # Research Extruder Speed Change, Previous 360.00 M203 X12000.00 Y12000.00 Z900.00 E600.00 ; set maximum speeds (mm/min) # Research Extruder Speed, Previous 12000.00 M201 X2000.00 Y2000.00 Z45.00 E2000.000 ; set accelerations (mm/s^2) # Resarch Extruder Acceleration, Previous 200.00 M906 X650 Y650 Z650 E550 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X-59.75 Y-55 Z0.1 S1 ; set axis minima M208 X59.75 Y64 Z110 S0 ; set axis maxima ; Endstops M574 X2 S1 P"io1.in" ; configure switch-type (e.g. microswitch) endstop for high end on X via pin io1.in M574 Y2 S1 P"io2.in" ; configure switch-type (e.g. microswitch) endstop for high end on Y via pin io2.in M574 Z1 S1 P"io3.in" ; configure switch-type (e.g. microswitch) endstop for low end on Z via pin io3.in ; Z-Probe M558 P0 H5 F300 T12000 ; disable Z probe but set dive height, probe speed and travel speed M557 X20:100 Y20:100 S20 ; define mesh grid ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B3950 ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 R0.535 K0.442:0.000 D3.99 E1.35 S1.00 B0 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin temp1 M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1 M307 H1 R4.664 K0.926:0.000 D1.00 E1.35 S1.00 B0 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M950 F0 C"out5" Q5000 ; create fan 0 on pin out5 and set its frequency M106 P0 S0 B5.0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"out6" Q500 ; create fan 1 on pin out6 and set its frequency M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on ; Tools M563 P0 D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Custom settings M207 S1.0 F2400 Z0.4 ; set firmware retraction length, speed and z-lift ; Miscellaneous M918 P2 E-4 F2000000 C30 R6 ; configure direct-connect display M150 X2 R255 U255 B255 S3 ; set all 3 LEDs to white M911 S21.9 R22.9 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
M107 M104 S245 ; set temperature ;TYPE:Custom M107 ; turn off part cooling fan incase PrusaSlicer doesn't M568 P0 R0 S0 A0 ; set turn off tool 0 G90 ; send absolute coordinates M220 ; set movement feed to 100 percent G28 X ; home x axis first G28 Y ; home y axis second G28 Z ; home z axis last G1 Z25 F1800 ;E move nozzle to Z25 G1 X0 Y-55 F1800 ;E move nozzle to X0 Y-55 M140 P0 R0 S110 ; heat bed to first layer temperature M116 ; wait for bed to reach temperature M568 P0 R0 S245 A2 ; set hotend to first layer temperature M116 ; wait to reach temperatures M221 ; reset extruder flow to 100 percent G92 E0 ; zero the extruder G1 E5 F2400 ; unretract filament from previous print end retraction G92 E0 ; zero the extruder G1 E20 F300 ; purge filament 20mm G92 E0 ; zero the extruder G1 Z0.2 F1800 ;E slowly go to first layer height M109 S245 ; set temperature and wait for it to be reached G21 ; set units to millimeters G90 ; use absolute coordinates M83 ; use relative distances for extrusion ; Filament gcode M107 ;LAYER_CHANGE ;Z:0.2 ;HEIGHT:0.2 ;BEFORE_LAYER_CHANGE ;0.2 G1 Z.2 F12000 ;AFTER_LAYER_CHANGE ;0.2 G10 ; retract G1 X17.78 Y-43.621 G11 ; unretract M204 S2000 ;TYPE:Skirt/Brim ;WIDTH:0.44 G1 F900 G1 X44.878 Y-32.575 E.96618 G1 X45.681 Y-32.115 E.03055 G1 X46.552 Y-31.328 E.03875 G1 X47.251 Y-30.269 E.04191 G1 X47.538 Y-29.535 E.02601 G1 X47.749 Y-28.123 E.04713 G1 X47.749 Y-15.123 E.42922 G1 X47.391 Y16.654 E1.04927 G1 X47.293 Y17.508 E.02836 G1 X41.125 Y45.541 E.94772 G1 X39.895 Y47.704 E.08215
- Power on printer
-
@blt3dp said in Start Gcode "Trying to extrude with no tool selected":
.................... This leaves the heaters in standby temps.
................... it's giving me message in the console saying that it's unable to extrude with no tool selected. Yet the second M568 sets Tool 0 to active and to printing temp.
M568 sets the active and standby temperatures for the tool but it does not make the tool active. You need to select a tool first by issuing a "Tn" command. If you only have one tool then that would be "T0" and the easiest thing to do is put that T0 at the end of your config.g file. Better still, use T0 P0 which will suppress any tool change macros should you have them.
-
@deckingman I might be a little confused on the documentation, the A2 parameter seems to make Tool 0 active as shown in DWC. But I suppose a tool can be set to active state and heated up, but not selected?
-
@blt3dp Yes it is a tad confusing. M568 (or the older, deprecated G10) will set the active temperature but not the active state, which is a different thing. Think of it like this, when a tool is selected using a Tn command, then the temperature of that tool will rise to the active temperature that was previously set using M568. When it is deslected, temperature will drop to the standby temperature that was set using M568. The A parameter is new in rrf 3.3 but they way I read it is that it simply allows one to set the active (and standby) temperature of a different tool to that which is currently in use, but still does not change the active/ inactive state.
It may seem overly complicated if you only have a single tool but it is necessary when you have multiple tools and wish to rapidly switch between them.
-
@deckingman I reread it with a clearer mind. Now I understand the tool and heater are separate. M568 A parameter can activate the heater on a tool to whichever state, but not select it for printing. I added the proper T0 P0 to start gcode and T-1 P0 to the end. Everything is working as I'd like, thanks.
-
-