Tool switching issue
Okay so I am getting what appear to be uncommanded tool changes. I am sure there is a reasonable explanation as to why but I can't see it.
I start the machine with no tool selected. Select T1 (I have two tools defined) in this case manually with motors off so no physical moves take place. The DWC shows T1 active. Filament is loaded in T1 extruder and down into the hotend.
Then I run a print which does not contain any tool change commands. After homing it runs my Tfree1.g macro unloading T1 but doesn't attempt to load T0, i.e. does not run Tpost0.g, but now DWC shows T0 active and the rest of the print continues.
All the relevant files are here, config.g, config_override.g, bed.g, tfree0.g, tpost0.g (tfree1 etc.. are the same) and M122:
Grateful for your advice, and for inevitably spotting the silly mistake I made to cause this issue.
Will use of M109 instead of G10 cause a default to T0 - if so then I think I have it solved?
No this makes no difference I tried setting the temps with G10 then M116, the active temp appeared on DWC but then it tried the unwanted tool change giving error "Warning: Tool 0 was not driven because its heater temperatures were not high enough or it has a heater fault".
I may be having a similar issue. I'm messing around with dual extrusion.
I have a heap of commands in my start code but essentially i have
M104 T0 S190
M104 T1 S190
M109 T1 S190
M109 T0 S190
So it should be set to start printing with Tool 0, but my slicer adds too additional commands after the start code
M104 T1 S190
M109 T1 S190
If I leave those commands in then it starts printing with Tool 1, if I delete them then it starts printing with Tool 0.
So it looks like either the M104 or M109 with a T# actually switches the extruded, which I didn't think it was meant to do.
Might be worth you looking at your code to see if you have M104 T0 or M109 T0 anywhere
kraegar last edited by
I never figured out how to get a print to start with tool1 without it doing the described events above, either. I just gave up and made sure to always start prints with tool 0.
HI, just got home and tested from the webcontrol
set it to a temperature and extrude some filament.
M104 T1 S190 (note not setting T1 beforehand)
The active tool switches to T1.
DC42, if your watching this thread, is this expected behaviour?
Thanks guys, I've checked that I'm not issuing the firmware a t command anywhere including config, override, bed or the gcode itself which is why I am puzzled unless there is a firmware default to T0, deliberate or inadvertent.
However issuing an M109 Tx will perform a tool change and I figure that's probably necessary. Will issuing a G10 T1 Sx Rx cause a tool change?
No G10 (DC42 please correct if wrong) just sets the required active and standby temps for the tools, if you then switch tools it will activate those values
so if we assume that you start with T0 active which is probably at the bottom of your config.g
G10 P0 S200 R100
G10 P1 S200 R100
tool 0 will heat to the active temp of 200 but tool 1 doesn't do anything.
and tool 1 will start heating to 200
tool 0 will stay will cool to 100
BUT if you remove the T0 form your config.g then no tool is set so
G10 P0 S200 R100
G10 P1 S200 R100
won't actually produce any results until you select either tool
Sure but I removed T0 from my config.g to try to get to the bottom of this.
I've also just tried printing a gcode without any M109 commands in it. I left the two G10 commands in my start gcode. I started it up and manually switched (motors off) from no active tool to T1, I ran the gcode and I got the uncommanded switch to T0.
Then I tried with no G10 or M109 commands anywhere in sight. Same result.
So its nothing to do with setting temperatures (except where you use M109 Tx) and so I am stumped. It must be a firmware default to begin printing on T0, or I presumed the lowest numbered tool. So I decided to test the theory and renumbered my tools to T4 and T8. This time when I ran the tool-change-free gcode, no tool was selected, the print began (I've no filament loaded here to save trouble), and I got "attempting to extrude with no filament loaded".
Progress - no uncommanded tool change. So I put the G10 temperature commands back in, this time with P4 and P8 instead of P0 and P1. This time it heated despite no tool being selected, but I got the same attempting to extrude with no tool selected error. Now I presume whats going on here is that if no tool is selected in the gcode, even if a tool has been manually selected before loading the file, the firmware defaults to T0, if there is no T0 then it does not select a tool. So I went back to my gcode and added T8 (which was T1 before) to the start gcode. This time it briefly activated T8, but then once it began running my bed.g that tool was deselected.
I did not rename my tfree and tpost files so there was not an uncommanded tool change, so I renamed them Tfree4 Tfree8 etc… and the problem is the same so its nothing to do with numbering or defaulting to T0 because it is named T0.
Its hard not to conclude that this is either a bug, or just a result of an assumption being carried through, or perhaps the difficulty is programming the firmware to seamlessly handle both single extruder machines (the majority) and dual extruder machines also by requiring single colour prints to be done using the lowest numbered tool, or multicoloured prints to be started using the lowest numbered tool.
For now I think I will amend the guide to say that you should always use your lowest numbered tool to print the first colour in a multicoloured print, or when printing a single colour/material.
Come to think of it there is one workaround and that would be a macro that changes the tool definitions so that T1 swaps extruder drives with T0. And indeed this works perfectly. My macro looks like:
M563 P0 D0 H1 F0 ; Define tool 0 (extruder) G10 P0 S0 R0 ; Set tool 0 operating and standby temperatures ;*** If you have a single-nozzle build, comment the next 2 lines M563 P1 D1 H1 F0 ; Define tool 1 (extruder) G10 P1 S0 R0 ; Set tool 1 operating and standby temperatures
I've just swapped extruder drive D numbers over from my original config.
I will add this workaround to the guide also. There is however no easy way to know which way around is set unless I have two macros one for "normal way around" and one for "swap extruders" or have two configs in slic3r one for "single colour using T0" and one for "single colour using T1" including the tool definitions in the start gcode.
dc42 administrators last edited by
@DjDemonD, can you provide a simple gcode file that reproduces the undesirable behaviour, with no M109 commands in it?
M109 when run with no T parameter and no tool currently selected will activate the lowest-numbered tool with a non-negative tool number and apply the requested temperature setting to it. I did this because that command makes no sense if no tool is selected, so if you get those commands in a gcode file then it means the slicer hasn't bothered to select a tool (and probably isn't going to).
Okay so this file https://1drv.ms/u/s!Apv79JfGbPIwgvU7gaGP7552Y1OYHA
Machine starts with no tool selected. It homes once, then a second time as it gets to Bed.g then T0 is selected and it runs the Tpost0.g file first time giving a "Warning: Tool 0 was not driven because its heater temperatures were not high enough or it has a heater fault", then I ran it again but the hotend was at around 140 deg C so it stalled the motor.
If I run this file https://1drv.ms/u/s!Apv79JfGbPIwgvU8jO-nhSQcv9iFcQ which has m109 T0 in it. I get the same error just before auto-calibration "warning: tool 0 was not driven". It doesn't behave differently.
If I start the machine with no tool selected and manually select T0 before homing, then run the first file again it activates tool 0 just before autocalibration giving the "warning: tool 0 not driven…....."
So even if there are no M109 Tx or Tx commands within the gcode file it selects a tool.
Sure if tfreex.g, tprex.g and tpostx.g are not available then it changes tools without any unwanted behaviour. Maybe we just need a Tx Z0 switch to not run tool change macros?