My filament control system just ran aground.
-
Hi,
I've been using the DWC filament handling feature for ages but only with single tool printers.
Being single tool printers there was a T0 in the config.g file and there were no tpre#.g or tpost#.g or tfree#.g files.
I'm now working on configuring my first tool changing printer.
And I just discovered that selecting a filament for a tool from the DWC first does a T# command as appropriate for the tool chosen.
This ruins my whole scheme.
The T command triggers the tpre#.g and tpost#.g files - which is where I was executing the code that did the actual physical tool changing.
I don't want that to happen just as result of selecting the desired filament for any given tool.
I want to only activate a tool either from the DWC (the icon just above the "load filament" icon) or from within my print code. And of course from the DWC command line.
So my first thought was an option to disable the generation of the T command when loading/unloading filament from the DWC.
The problem I see there is that the T command being issued appears to being setting the *state.currentTool and state.nextTool values in the object model, no T command, no update-to-date values.
But to make my filament handling code work I need to know which tool I am selecting for filament loading/unloading.
I should mention that while I am using the terms from the DWC regards filament loading/unloading all I was doing was setting a number of filament related values for the selected tool.
Actual filament loading/unloading is being done manually.
So I need two things:
- an option to prevent the issuing of the T command when selecting filament load/unload from the DWC
- a object model entry holding the relevant tool number so my code can set the values of the correct tool based on the selected filament.
or - a parameter passed to the filament handling code in load.g, config.g and unload.g - the parameter value would of course be the relevant tool number
I now need to find a workaround so I can proceed with getting the printer up and printing.
Thanks.
Frederick
-
@fcwilt if you want to load and unload filament then, AFAIK, you need that tool to be active. It sounds like what you want if for the filament handling system to run the Tn command, but use P0 (e.g. T1 P0) so that the tool change macros are not run. Is that correct?
-
@T3P3Tony said in My filament control system just ran aground.:
@fcwilt if you want to load and unload filament then, AFAIK, you need that tool to be active. It sounds like what you want if for the filament handling system to run the Tn command, but use P0 (e.g. T1 P0) so that the tool change macros are not run. Is that correct?
Using T# P0 might well solve my problem.
Yes, if you use the filament feature of the DWC to actually load and unload filament you need the tools active and at temperature.
But I am using (was using it) just to set a number of filament related settings, such as hotend temperature.
On my single tool printers, since I pre-selected T0 in config.g and only tool 0 appeared in the DWC, thus the DWC never issued the T0 and I never knew that it could/would. It only invoked the load/config/unload code on a per filament basis and that was exactly what I needed.
When I modified my code to handle multiple tools I was quite surprised to see the T command and all of the related "side effects".
Right now the T command code seems to be responsible for turning heaters on and off - and that messes things up for me - and I have found no simple way to work around it.
I know that most slicers have a "filament system" but I found them cumbersome and never took to it, greatly preferring the system I implemented using the DWC filament feature.
IF it were possible to have an option setting in the DWC to have it send T0 P0 that might very well solve all my problems, IF it is the invoking of the pre/post/free code that is also responsible for controlling the heaters.
Thanks for the reply.
Sorry to be such a pain.
Frederick
-
@fcwilt said in My filament control system just ran aground.:
But I am using (was using it) just to set a number of filament related settings, such as hotend temperature.
Why not just set these using M568:
https://docs.duet3d.com/User_manual/Reference/Gcodes#m568-set-tool-settings
@fcwilt said in My filament control system just ran aground.:
IF it were possible to have an option setting in the DWC to have it send T0 P0 that might very well solve all my problems, IF it is the invoking of the pre/post/free code that is also responsible for controlling the heaters.
What do you mean about a setting in DWC? What button do you want tomprrss and not change to a specific tool, but to carry out some tool related action?
-
If you go to the General section of the DWC there are a number of options/values that can be set/changed.
So I was thinking that would be a place to have an "on/off" option that would change the behavior.
As to M568 - I am using that.
Here is a the relevant code from one of the filament config files:
set global.print_beg_tool_temp_a [var.index] = 190 set global.print_beg_tool_temp_s [var.index] = 100 set global.print_beg_tool_ext_adj[var.index] = 100 set global.print_beg_tool_spd_adj[var.index] = 100 set global.print_beg_tool_bby_stp[var.index] = 0 set global.print_beg_tool_prime [var.index] = 10 set global.print_beg_tool_retract[var.index] = 0.5 set global.print_end_tool_retract[var.index] = 0.5 set global.print_beg_bed_temp_a [var.index] = 60 set global.print_beg_bed_temp_s [var.index] = 30
Later on there is this code in another routine that applies these values:
; this part is just to make the use of these values down below a bit easier to read by using shorter names var bed_temp_a = global.print_beg_bed_temp_a [var.tool] var bed_temp_s = global.print_beg_bed_temp_s [var.tool] var tool_temp_a = global.print_beg_tool_temp_a [var.tool] var tool_temp_s = global.print_beg_tool_temp_s [var.tool] var ext_adj = global.print_beg_tool_ext_adj[var.tool] var spd_adj = global.print_beg_tool_spd_adj[var.tool] var bby_stp = global.print_beg_tool_bby_stp[var.tool] M568 P{var.tool} S{var.tool_temp_a} R{var.tool_temp_s} ; set extruder heater temps (active and standby) M221 D{var.tool} S{var.ext_adj} ; set extruder extrusion percentage adjust M140 S{var.bed_temp_a} R{var.bed_temp_s} ; set bed heater temps (active and standby) M220 S{var.spd_adj} ; set print speed adjust M290 R0 S{var.bby_stp} ; set initial baby steps