3 minutes ago, JPT58 said:G4 P60000 ; just wait for 1 mins to pass
Just a heads up: G4 can use seconds with the S parameter, i.e.
G4 S60 ; wait for one minute
3 minutes ago, JPT58 said:G4 P60000 ; just wait for 1 mins to pass
Just a heads up: G4 can use seconds with the S parameter, i.e.
G4 S60 ; wait for one minute
12 minutes ago, JPT58 said:This my final result. It's some compromise, but since there is no IF in gcode. you have to guess somehow.
Better heads up than last time. Gcode doesn't support IF (because it's just a set of instructions, but Cura's preprocessor does. It will run some basic Python functions enclosed in curly brackets {}
Greg illustrated it above:
14 hours ago, GregValiant said:{"G4 S180" if "PETG" in material_type else ""}
So say you know you want to wait 1 minute if the bed temperature is going to be 60 or less, but three minutes if it will be more, you can set your G4 line to this:
G4 S{60 if material_bed_layer_temperature_layer_0 <= 60 else 180}
But in your case instead of using a G4 command at all, I would wait until the bed is most of the way there then fire up the hot end:
M190 S{material_bed_temperature_layer_0 - 20} ; Wait until bed is 20 below full heat
M104 S{material_print_temperature_layer_0} ; Start hot end warming up
M190 S{material_bed_temperature_layer_0} ; Wait for bed to hit target temperature
M109 S{material_print_temperature_layer_0} ; Wait for hot end to hit target temperature if it hasn't already
I have to revise my comment "I just don't see a point to it. The extra 3 or 4 minutes isn't going to hurt anything.".
I only print PETG and some PLA so for me, that comment is OK. Neither material is prone to "cooking off" in the nozzle when there is no movement.
On the other hand, there are some materials that don't like to sit there cooking and can start to break down inside the nozzle. In the case of a material like ABS (that needs the bed very hot) waiting until the bed gets up near the set temperature before starting the hot end could be not just useful, but necessary.
I really like this new feature of some logic being done in the startup. I always had a second printer installed just for TPU because it needed really slow purge lines. Now a single printer can adjust it's Startup so it can be used regardless of the material.
G1 X1 Y200 F{speed_print * 60 * .75} E15
Thank you @Slashee_the_Cow and @GregValiant for this interesting thread, these option to include some kind of logic in the startup code makes life easier.
Recommended Posts
GregValiant 1,344
Cura adds the temperature prepend lines before the startup gcode if there are no "cura keywords" in the startup for the bed and/or hot end. It's a safety to guard against cold extrusions.
Go to Settings, Printers, Manage Printers, and then Machine Settings. The startup gcode is in the left text box.
Add the lines I've added in bold type:
M221 S100 ;Reset Flowrate
M140 S{material_bed_temperature_layer_0}
M104 S{material_print_temperature_layer_0}
M190 S{material_bed_temperature_layer_0}
M109 S{material_print_temperature_layer_0}
G28 ;Home
That will heat both units simultaneously.
Putting in a "dwell" to slow down the faster heating device can be done but it's not very useful. When I print PLA with the bed at 50, the hot end and bed finish heating at about the same time. When I print PETG with the bed at 83 the bed heats a lot slower when it gets over 55 so the bed takes about twice as long to get to the set temperature. I suppose I could stick a logic line in there. Something like:
{"G4 S180" if "PETG" in material_type else ""}
I just don't see a point to it. The extra 3 or 4 minutes isn't going to hurt anything.
Link to post
Share on other sites
JPT58 0
This my final result. It's some compromise, but since there is no IF in gcode. you have to guess somehow.
; Printer time needed: ; Heat Hotend 2:00 ; Heat Bed < 5:00 ; Home <0:35 M140 S{material_bed_temperature_layer_0} ; will take almost 5 min G28 ; Home ~ 30 sec G4 P60000 ; just wait for 1 mins to pass M104 S{material_print_temperature_layer_0} ; will take 2 min M190 S{material_bed_temperature_layer_0}-5 ; wait only for bed temp-5 M109 S{material_print_temperature_layer_0} ; wait for hotend temp
Link to post
Share on other sites