Dinamic Daemon.g
-
I have a 1200-watt heated platen (600x600mm) and having the printing chamber fully enclosed (with two, adjustable, ventilation grills at the top, I do not need to keep the platen constantly on during the entire duration of printing.
With this code I keep the heater on for the first few Bed_layers_initial_number layers, then decrease the temperature by keeping it in the range from Bed_layers_limit_lower_temperature to Bed_layers_limit_highest_temperature up to the printing percentage indicated with Bed_layers_limit_number. When that percentage is reached, the print bed heater is turned off.With the PLA I heat at the preset temperature of 50°C for the first 5-10 layers, then the temperature is maintained between 40° and 50°C until 30% of the print is done. From then on the heater is turned off.
For prints of about 3 hours, the bed temperature at the end of the print is about 30-35°C depending on the ambient temperature (I am staying in the attic, without a heater). For longer prints I have to change the Bed_layers_limit_number percentage.For PETG, which is more sensitive, I have to set the Bed_layers_limit_number to at least 70% and the initial temperature to 60°C.
-
Does your bed change temperatures fast enough for those changes to take place in the times allotted?
Interesting idea for sure.
Thanks.
Frederick
-
Yes, on average it takes less than 2 minutes to go from 20 to 60°C.
Of course, to go from 40 to 50°C takes only a few tens of seconds.I'll time it tomorrow and let you know.
-
Those temperature changes seem fast.
I need to time some of my printers - they seem slower when waiting to print.
Thanks.
Frederick
-
-
@bernardomattiucci said in Dinamic Daemon.g:
Just over 3 minutes to go from 17.5 to 60°C.
Thanks for the reply and the video.
What is the wattage rating of the bed heater?
Frederick
-
@fcwilt 1200W 220v
-
@oliof I have no idea how to do it
-
@bernardomattiucci said in Dinamic Daemon.g:
@fcwilt 1200W 220v
Thanks.
I now know why my beds don't heat as fast.
Frederick
-
"If you want reasonably fast heating to around 100C for printing ABS, then a good figure to use is 0.4W per square cm of bed area. Here are some example bed sizes and the corresponding suggested heater power..."
The area of my print bed is 60x60=3600cm^2. The power of the heater is 1200 watts. The ideal would be 1440 watts. But the power consumption would have too high a cost that I absolutely cannot afford. This is the reason for the script above.
Now I have to figure out how to set the variables in the CGode and, most importantly, how to read them.
And I have no idea how to do it!
-
@bernardomattiucci said in Dinamic Daemon.g:
Now I have to figure out how to set the variables in the CGode and, most importantly, how to read them.
And I have no idea how to do it!
I can help with that - I use the conditional coding, variables and meta-commands quite a bit in my printer configurations.
How would you like it all to work?
Would you considering installing the BtnCmd plug-in?
Frederick
-
In SuperSlicer, I have the ability to set up a GCode script for each filament set up.
This script is inserted just before the printing starts.I would insert a number of variables into it, like this:
; Filament gcode ;Bed_layers_initial_number = 15 ;Bed_layers_initial_temperature = {first_layer_bed_temperature} ;Bed_layers_limit_number = 44 ;Bed_layers_limit_lower_temperature = 40 ;Bed_layers_limit_highest_temperature = {bed_temperature}
At this point, from the duet daemon.g I would like to read those values and replace them in the script at the beginning of this post.
-
I believe that global variables will do what you want.
First you need to create the global variables - I do this in a file called create_globals.g that I invoke from config.g - but it could be done directly in config.g.
To create a global variable you do this:
global name_of_variable = some_initial_value_that_you_may_never_use
Once they are created you can set them to the desired values like this:
set global.name_of_variable = desired_value
Then to use them you do this - here I am setting temperatures for the bed:
M140 S{global.print_beg_bed_temp_a} R{global.print_beg_bed_temp_s}
It is the { and } characters that make the variable work in a command like M140
--
Hopefully this is enough to get you started - if not feel free to ask questions.
Frederick
-
This should work. I only did one test and it seems to have gone well.
This is the variable declaration at the bottom of the config.g:
global Bed_layers_initial_number = 1 global Bed_layers_initial_temperature = 2 global Bed_layers_limit_number = 3 global Bed_layers_limit_lower_temperature = 4 global Bed_layers_limit_highest_temperature = 5
This is the "variabili.g" macro with which the values passed via gcode are set:
;variabili.g set global.Bed_layers_initial_number = param.A set global.Bed_layers_initial_temperature = param.B set global.Bed_layers_limit_number = param.C set global.Bed_layers_limit_lower_temperature = param.D set global.Bed_layers_limit_highest_temperature = param.E
This is the gcode line in the superslicer settings for PETG filament:
; Filament gcode M98 P"variabili.g" A15 B{first_layer_bed_temperature} C44 D40 E{bed_temperature}
This is the same gcode line in the print file:
; Filament gcode M98 P"variabili.g" A15 B60 C44 D40 E50
And finally, this is my updated daemon.g file:
if job.build != null if job.layer != null && job.layer < {global.Bed_layers_initial_number} M140 S{global.Bed_layers_initial_temperature} if job.layer != null && job.layer >= {global.Bed_layers_initial_number} && job.layer < (job.file.numLayers*{global.Bed_layers_limit_number})/100 if heat.heaters[0].current < {global.Bed_layers_limit_lower_temperature} M140 S{global.Bed_layers_limit_highest_temperature} if heat.heaters[0].current > {global.Bed_layers_limit_highest_temperature} M140 S{global.Bed_layers_limit_lower_temperature} if job.layer != null && job.layer > (job.file.numLayers*{global.Bed_layers_limit_number})/100 M140 S0
-
Glad to hear you got it work.
One thing to remember about M98 parameters: Certain letters cannot be used. It has to do with the fact that there is nothing special to indicate that what follows is actually a parameter as opposed to be a new command.
For example: M98 P"some_code_to_run.g" G1
You might have intended G1 to be a parameter but G1 is a valid command and gets treated as such.
The letters P and M also won't work, if memory serves, and I think there may be a few others.
I have suggested that an alternate syntax be allowed - something like: M98 P"some_code_to_run.g" (A1 B2 C3 D4 E5)
The ( and ) would make it clear that the letters are parameters and not commands.
Frederick