Jump to content

Cura G-Code issue


Go to solution Solved by ahoeben,

Recommended Posts

Posted · Cura G-Code issue

Hi,

I'm having a problem with the G-code generated by Cura. The printer (Voron 2.4) heats up to printing temperature and comes to the PRINT_START macro as in the following G-Code beginning. This is completely unnecessary, as the printer is supposed to perform automatic leveling at a maximum of 150 degrees. This means that it heats up unnecessarily, e.g. to 230 degrees, the printer firmware cools it down to 150 degrees for leveling and the print then breaks off, because of course it is not possible to print at 150 degrees.

Therefore, it would make sense to call up the printer Macro PRINT_START before M104 S230 and then heat it up to print temperature. But how do I teach Cura this? - Cura automatically writes the corresponding code (red) before starting the G-code, which can be edited in the device settings (green). The macro can only calls the auto-leveling and homing of the axes.

 

 

;FLAVOR:Marlin
;TIME:1165
;Filament used: 1.54557m
;Layer height: 0.2
;MINX:123.828
;MINY:140.274
;MINZ:0.2
;MAXX:176.158
;MAXY:163.475
;MAXZ:10
;TARGET_MACHINE.NAME:VORON2 300
;ZOFFSETPROCESSED
;Generated with Cura_SteamEngine 5.6.0
M140 S80
M105
M190 S80
M104 S230
M105
M109 S230
M82 ;absolute extrusion mode
M104 S150

PRINT_START
G92 E0
G92 E0
G1 F1800 E-0.75
;LAYER_COUNT:50
;LAYER:0

  • Link to post
    Share on other sites

    • Solution
    Posted · Cura G-Code issue

    Cura tries to protect your printer against cold extrusion.

     

    Cura tries to see if there is anything in your start gcode that heats up your extruder(s), and bed. If not, it will insert a heatup sequence on its own. Cura does not know about your PRINT_START macro.

     

    The logic is here:

    https://github.com/Ultimaker/Cura/blob/4.4/plugins/CuraEngineBackend/StartSliceJob.py#L428


    Cura looks for the text "{material_print_temperature}", "{material_print_temperature_layer_0}", "{default_material_print_temperature}", "{material_initial_print_temperature}", "{material_final_print_temperature}" or "{material_standby_temperature}" in the start gcode to check if the start gcode contains extruder heating commands (so it does not actually care if you use M104 or M109 or not).

     

    Cura looks for the text "{material_bed_temperature}" or "{material_bed_temperature_layer_0}" in the start gcode to check if the start gcode contains bed heating command (so it does not actually care if you use M140 or M190 or not).

    • Like 1
    • Thanks 1
    Link to post
    Share on other sites

    Posted · Cura G-Code issue

    As AHoeben explained...if there are Cura keywords in the startup then Cura itself doesn't have to include the temperature prepend lines.

    For example:  If your StartUp G-Code contained something like this:

     

    M140 S{material_bed_temperature_layer_0}

    M109 S150

    PRINT_START

    G0 F600 Z2.0

    G0 F3600 X0 Y0

    M109 S{material_print_temperature_layer_0}

     

    Then the hot end would wait until it hit 150, then the "print_start" macro would run in the firmware, and then printhead would move up and off to a corner to ooze, and then the hot end would wait until it hit the "Initial Layer Print Temperature".

     

    The Voron2 250 has this in the startup:

     

    print_start EXTRUDER={material_print_temperature_layer_0} BED={material_bed_temperature_layer_0} CHAMBER={build_volume_temperature} 

     

    So it appears that at least one Voron model will accept temperature parameters as part of the "PRINT_START" macro.

     

    So your homework assignment for today includes some light reading and a bit of detective work to see if your machine will accept any parameters for PRINT_START.  (BTW The curly brackets are required for Cura keywords.)

    • Like 1
    • Thanks 1
    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

      • Help Us Improve Cura – Join the Ultimaker Research Program
        🚀 Help Shape the Future of Cura and Digital Factory – Join Our Power User Research Program!
        We’re looking for active users of Cura and Digital Factory — across professional and educational use cases — to help us improve the next generation of our tools.
        Our Power User Research Program kicks off with a quick 15-minute interview to learn about your setup and workflows. If selected, you’ll be invited into a small group of users who get early access to features and help us shape the future of 3D printing software.

        🧪 What to Expect:
        A short 15-minute kickoff interview to help us get to know you If selected, bi-monthly research sessions (15–30 minutes) where we’ll test features, review workflows, or gather feedback Occasional invites to try out early prototypes or vote on upcoming improvements
        🎁 What You’ll Get:
         
        Selected participants receive a free 1-year Studio or Classroom license Early access to new features and tools A direct voice in what we build next
        👉 Interested? Please fill out this quick form
        Your feedback helps us make Cura Cloud more powerful, more intuitive, and more aligned with how you actually print and manage your workflow.
        Thanks for being part of the community,

        — The Ultimaker Software Team
        • 0 replies
      • Cura 5.10 stable released!
        The full stable release of Cura 5.10 has arrived, and it brings support for the new Ultimaker S8, as well as new materials and profiles for previously supported UltiMaker printers. Additionally, you can now control your models in Cura using a 3D SpaceMouse and more!
          • Like
        • 18 replies
    ×
    ×
    • Create New...