Cura icon indicating copy to clipboard operation
Cura copied to clipboard

Create startHeatingAtPercentage.py

Open icariantk opened this issue 1 year ago • 2 comments

Description

This new file add a Post Processing Script that change the initial selected bed temperature, to a percentage set in the script properties, the heating process then, will wait to that percentage, instead of the 100%, once the selected percentage temperature is reached, the nozzle will start heating.

With a correct calibration of this percentage, the full nozzle time heatup process could be spared.

This is a usual heating process, where once the bed heating process end, the nozzle start heating:

image

This is the heating process after running the startHeatingAtPercentage script:

image

Type of change

  • [X] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • [X ] Tested with Creality Ender 3-Max (KLIPPER) printing process, 80% default value set

After a print, when the bed is still hot, running this script will wait to cooldown to the percentage temperature in klipper, since the G-Code is not compilant, changing the Klipper command to the following code, fix this problem:

[gcode_macro M190]
rename_existing: M99190
gcode:
    #Parameters
    {% set s = params.S|float %}

    M140 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %}  
    {% if s != 0 %}
        TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s} 
    {% endif %}

  • [X] Tested with Creality CR-10 Smart (MARLIN) printing process, 80% default value set.

Test Configuration:

  • Operating System: Windows
  • Cura 5.8.0
  • Printing thru OCtorpint (Marlin, CR-10 Smart)
  • Printing thru Mainsail/Moonraker/Klipper (Klipper, Ender 3 Max)
  • [X] My code follows the style guidelines of this project as described in UltiMaker Meta and Cura QML best practices
  • [X] I have read the Contribution guide
  • [X] I have commented my code, particularly in hard-to-understand areas
  • [X] I have uploaded any files required to test this change

icariantk avatar Aug 06 '24 19:08 icariantk

I'm not sure I understand. Can't this be done in the StartUp Gcode now?

M140 S{material_bed_temperature_layer_0} ; Start the bed heater M109 S{material_print_temperature_layer_0} ; Start the hot end heater and wait for it M190 S{material_bed_temperature_layer_0} ; Make sure the bed is up to temperature

This would be a fixed percentage but it would wait until 75% before starting the hot end.

M104 S{material_print_temperature_layer_0} ; Start the Hot end heater M190 S{material_bed_temperature_layer_0*.75} ; wait for the bed to hit 75% M109 S{material_print_temperature_layer_0} ; wait for hot end to hit the set point M190 S{material_bed_temperature_layer_0} ; Make sure the bed is up to temperature

GregValiant avatar Aug 11 '24 14:08 GregValiant

I'm not sure I understand. Can't this be done in the StartUp Gcode now?

M140 S{material_bed_temperature_layer_0} ; Start the bed heater M109 S{material_print_temperature_layer_0} ; Start the hot end heater and wait for it M190 S{material_bed_temperature_layer_0} ; Make sure the bed is up to temperature

This would be a fixed percentage but it would wait until 75% before starting the hot end.

M104 S{material_print_temperature_layer_0} ; Start the Hot end heater M190 S{material_bed_temperature_layer_0*.75} ; wait for the bed to hit 75% M109 S{material_print_temperature_layer_0} ; wait for hot end to hit the set point M190 S{material_bed_temperature_layer_0} ; Make sure the bed is up to temperature

I am sure that could be achieved the same goal in different ways. Isn't the point of making it easier and integrated into the deployment a goal for the project?

icariantk avatar Aug 11 '24 22:08 icariantk