Jump to content

Cura adding hotend instructions to start of file


Trilex214

Recommended Posts

Posted (edited) · Cura adding hotend instructions to start of file

I am trying to setup Cura to use with my Ender 3 running Klipper. I would like to use my own Start Print macro. I have read that adding this line: 

START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}

would result in just that and remove any of cura's control over the temps. But this is the start of the outputed Gcode file.

 

;FLAVOR:Marlin
;TIME:6867
;Filament used: 10.9856m
;Layer height: 0.2
;MINX:46.5
;MINY:46.5
;MINZ:0.2
;MAXX:188.5
;MAXY:188.5
;MAXZ:60
;TARGET_MACHINE.NAME:Creality Ender-3
;Generated with Cura_SteamEngine 5.7.2
M104 S200
M105
M109 S200
M82 ;absolute extrusion mode
START_PRINT BED_TEMP=50 EXTRUDER_TEMP=200

As you can see it is still setting and waiting on the extruder temps.

What I find bizarre is the fact it correctly removes the bed temp settings. 

Any help would be greatly appreciated.

Edited by Trilex214
Tags
  • Link to post
    Share on other sites

    Posted · Cura adding hotend instructions to start of file

    Cura doesn't officially support Klipper, it just produces Marlin code and that works because Klipper supports a subset of Marlin commands required for movement, printing, etc.

     

    If you could post the start gcode for your printer that would greatly help diagnose this. Cura automatically adds commands to set the extruder temperature if there isn't an M104 and/or M109 (I'm not sure if it requires a replacement pattern or if a static number would suffice, but obviously you'd want the former) line in the startup gcode, to prevent cold extrusion (which you really don't want your printer to try and do).

  • Link to post
    Share on other sites

    Posted (edited) · Cura adding hotend instructions to start of file

    Thanks for the reply, but I don't think it has anything to do with the Start gcode as cura would not have access to it when slicing the file. Although if it does help, here it is:

    gcode:
        {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
        {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
        # Start bed heating
        M140 S{BED_TEMP}
        # Use absolute coordinates
        G90
        # Reset the G-Code Z offset (adjust Z offset if needed)
        SET_GCODE_OFFSET Z=0.0
        # Home the printer
        G28
        
        SMART_PARK
        # Wait for bed to reach temperature
        M190 S{BED_TEMP}
        BED_MESH_CALIBRATE
        # Set and wait for nozzle to reach temperature
        M109 S{EXTRUDER_TEMP}
        # Reset Extruder
        G92 E0
        # Move Z Axis up
        G1 Z2.0 F3000
        # Move to start position
        G1 X2.1 Y20 Z0.28 F5000.0
        # Reset Extruder
        G92 E0
        # Move Z Axis up
        G1 Z2.0 F3000
        ; run line purge macro
        LINE_PURGE

    It runs well, but I just have to wait for the extruder to get to it's target temp first as cura adds it in.

    I also updated the cura output in the first post as it still had some debugging code.

    Edited by Trilex214
  • Link to post
    Share on other sites

    Posted · Cura adding hotend instructions to start of file
    1 hour ago, Trilex214 said:

    Thanks for the reply, but I don't think it has anything to do with the Start gcode as cura would not have access to it when slicing the file

    I meant the startup gcode in Cura: Go to Preferences > Configure Cura > Printers > (select your printer if it isn't already) > Machine Settings and the code in the bottom-left of that window:

    image.thumb.png.dc2442838904ac55b9c7fad74c9e9708.png

     

    And hey, worst comes to worst, might be able to make a post-processing script which automatically removes that added bit.

  • Link to post
    Share on other sites

    Posted · Cura adding hotend instructions to start of file
    START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}
    

    This is it. And yes i thought about a post process script, but would prefer not.

  • Link to post
    Share on other sites

    Posted (edited) · Cura adding hotend instructions to start of file

    There appears to be a bug in Cura 5.7.2 that is disregarding the Keywords for the hot end temperature and  so is adding the prepend code for the hot end regardless of keywords in the StartUp.  The bug didn't exist in previous versions so something must have changed.  Oddly enough the bug doesn't affect the bed temperature and the Keywords for the bed are still working correctly.

     

    If you have a single extruder printer then turning off "Enable Nozzle Temperature Control" will eliminate the prepend.  If it's a multi-extruder printer turning that off will also negate the "Heat Up Speed" and "Cool Down Speed" and "Minimum Time at Standby Temperature" settings.

     

    The original snippet is kind of odd.  For example:  M190 S{BED_TEMP}.  BED_TEMP is not a keyword in Cura but maybe when that gets to the printer your firmware is translating it correctly given the "set BED_TEMP" line.

    Edited by GregValiant
  • Link to post
    Share on other sites

    Posted · Cura adding hotend instructions to start of file
    19 hours ago, GregValiant said:

    There appears to be a bug in Cura 5.7.2 that is disregarding the Keywords for the hot end temperature and  so is adding the prepend code for the hot end regardless of keywords in the StartUp.  The bug didn't exist in previous versions so something must have changed.  Oddly enough the bug doesn't affect the bed temperature and the Keywords for the bed are still working correctly.

     

    If you have a single extruder printer then turning off "Enable Nozzle Temperature Control" will eliminate the prepend.  If it's a multi-extruder printer turning that off will also negate the "Heat Up Speed" and "Cool Down Speed" and "Minimum Time at Standby Temperature" settings.

     

    The original snippet is kind of odd.  For example:  M190 S{BED_TEMP}.  BED_TEMP is not a keyword in Cura but maybe when that gets to the printer your firmware is translating it correctly given the "set BED_TEMP" line.

    Where is "Enable Nozzle Temperature Control", I can not seem to find it?

  • Link to post
    Share on other sites

    Posted · Cura adding hotend instructions to start of file

    Because I just can't help myself, I wrote a post-processing script which will automatically delete those lines. Grab it from this post.

     

    I wasn't even having the problem. I had to mess up my startup gcode deliberately to get Cura to add those extra lines for testing.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 26 replies
    ×
    ×
    • Create New...