Jump to content

Cura adding extra gcode before my custom gcode


Recommended Posts

Posted (edited) · Cura adding extra gcode before my custom gcode

Cura keeps adding unwanted gcode and causing my hotend to heat up to printing temps while leveling the bed. I have it to heat up to 160 in my custom gcode to stop it from leaking on the bed while auto leveling. The highlighted is what cura is adding. I have tried making a custom printer and it still does it. I have seen several other people complain about it and tried the suggestions that they were offered, but none of them worked. I have to manually edit each gcode to remove the unwanted gcode.

Unnessecarry gcode.png

Edited by Steverc1572
  • Link to post
    Share on other sites

    Posted · Cura adding extra gcode before my custom gcode

    If you're using Cura 5.7.2, apparently that has a bug that can cause this, even if your startup gcode should be fine. Try going back to 5.7 or 5.7.1 (you can have as many different versions of Cura as you want installed side by side).

     

    Other than that, IIRC if there aren't lines that heat the hot end to {material_print_temperature_layer_0} and the bed temperature to {material_bed_temperature_layer_0} it will add them automatically to prevent the printer trying to cold extrude or anything bad like that.

     

    If you could post the startup gcode for your printer that would help us diagnose any problems.

     

    And for the love of all things beefy, please no screenshots of text editors. This forum crushes image quality so badly that text becomes unreadable. Click the code image.png.0e431f40f96d7d3be4014f56d63e8327.png button on the toolbar at the top of the edit box and copy + paste your code into that.

  • Link to post
    Share on other sites

    Posted (edited) · Cura adding extra gcode before my custom gcode

    Starting gcode

    G90 ; absolute positioning

    M82 ; set extruder to absolute mode

    M190 {material_bed_temperature_layer_0} ; Heat & Wait

    G92 E0.0 ; reset extruder origin

    G28 ; home all axes

    M104 S160: set hotend temp @ 160 but continue

    G29 ; Probe bed

    G1 X380 Y008 Z15 F6000; move to corner

    M109 S{material_print_temperature_layer_0} ; Heat & Wait

    G1 Z0.3; set z-position for wipeline

    G1 Y100.0 E20.0 F1000.0 ; intro line

    G92 E0.0; reset extruder origin

     

     

    but this is what cura sends 

    ;FLAVOR:Marlin
    ;TIME:5096
    ;Filament used: 11.413m
    ;Layer height: 0.28
    ;MINX:182.81
    ;MINY:183.25
    ;MINZ:0.28
    ;MAXX:217.186
    ;MAXY:216.75
    ;MAXZ:75.04
    ;TARGET_MACHINE.NAME:Formbot Raptor
    ;Generated with Cura_SteamEngine 5.7.2
    M104 S205
    M105
    M109 S205
    M82 ;absolute extrusion mode
    G90 ; absolute positioning
    M82 ; set extruder to absolute mode
    M190 65  ; Heat & Wait
    G92 E0.0 ; reset extruder origin
    G28 ; home all axes
    M104 S160: set hotend temp @ 160 but continue
    G29 ; Probe bed
    G1 X380 Y008 Z15 F6000; move to corner
    M109 S205 ; Heat & Wait
    G1 Z0.3; set z-position for wipeline
    G1 Y100.0 E20.0 F1000.0 ; intro line
    G92 E0.0; reset extruder origin
    G92 E0
    G92 E0
    G1 F2400 E-3
    ;LAYER_COUNT:268   

     

     

     

    it adds the extra

    M104 S205
    M105
    M109 S205

     
     

     

     

     

    Edited by Steverc1572
  • Link to post
    Share on other sites

    Posted · Cura adding extra gcode before my custom gcode
    2 minutes ago, Steverc1572 said:

    G90 ; absolute positioning

    M82 ; set extruder to absolute mode

    M190 {material_bed_temperature_layer_0} ; Heat & Wait

    G92 E0.0 ; reset extruder origin

    G28 ; home all axes

    M104 S160: set hotend temp @ 160 but continue

    G29 ; Probe bed

    G1 X380 Y008 Z15 F6000; move to corner

    M109 S{material_print_temperature_layer_0} ; Heat & Wait

    G1 Z0.3; set z-position for wipeline

    G1 Y100.0 E20.0 F1000.0 ; intro line

    G92 E0.0; reset extruder origin

    Not sure if these are the cause of your problems, but your M190 is missing the S parameter and your M104 has a colon instead of a semicolon.

     

    Fix them up and if it still has the problem, try a different version, since other people are experiencing this sort of issue in 5.7.2.

  • Link to post
    Share on other sites

    Posted (edited) · Cura adding extra gcode before my custom gcode

    Went to 5.7.1 and it works correctly , so must be a bug in the new version (5.7.2) as you suggested.

     

     

    Those were just typos after trying different things my bad. but i tried as you suggested and still did not work in 5.7.2.

    ;FLAVOR:Marlin
    ;TIME:7187
    ;Filament used: 17.8771m
    ;Layer height: 0.28
    ;MINX:10.962
    ;MINY:175.058
    ;MINZ:0.28
    ;MAXX:389
    ;MAXY:224.942
    ;MAXZ:19.04
    ;TARGET_MACHINE.NAME:Formbot Raptor
    ;Generated with Cura_SteamEngine 5.7.2
    M104 S230
    M105
    M109 S230
    M82 ;absolute extrusion mode
    G90 ; absolute positioning
    M82 ; set extruder to absolute mode
    M190 S65  ; Heat & Wait
    G92 E0.0 ; reset extruder origin
    G28 ; home all axes
    M104 S160; set hotend temp @ 160 but continue
    G29 ; Probe bed
    G1 X380 Y008 Z15 F6000; move to corner
    M109 S230 ; Heat & Wait
    G1 Z0.3; set z-position for wipeline
    G1 Y100.0 E20.0 F1000.0 ; intro line
    G92 E0.0; reset extruder origin
    G92 E0
    G92 E0
    G1 F3600 E-0.7
    ;LAYER_COUNT:68
    ;LAYER:0

     

    Edited by Steverc1572
  • Link to post
    Share on other sites

    Posted · Cura adding extra gcode before my custom gcode

    It's a bug.  There is some more info on GitHub #19204.

    You can use 5.7.2.  Just open the gcode and put a semi-colon in front of those lines.  Only the print temperature lines are a problem.

    If your printer is a single-extruder machine you can also load the "Printer Settings" plugin from the MarketPlace and turn off "Enable Nozzle Temperature Control".  That will keep the lines from showing up.  (For multi-extruders it would cost a couple of "child" settings that would be disabled as well).

  • Link to post
    Share on other sites

    Posted · Cura adding extra gcode before my custom gcode
    21 minutes ago, GregValiant said:

    It's a bug.  There is some more info on GitHub #19204.

    You can use 5.7.2.  Just open the gcode and put a semi-colon in front of those lines.  Only the print temperature lines are a problem.

    If your printer is a single-extruder machine you can also load the "Printer Settings" plugin from the MarketPlace and turn off "Enable Nozzle Temperature Control".  That will keep the lines from showing up.  (For multi-extruders it would cost a couple of "child" settings that would be disabled as well).

    Do not see that setting in the plugin.

  • Link to post
    Share on other sites

    Posted · Cura adding extra gcode before my custom gcode

    It is affected by the "G-Code Flavor" so maybe it isn't available for your printer.

     

    a.png

  • Link to post
    Share on other sites

    Posted (edited) · Cura adding extra gcode before my custom gcode

    Do not have any of those available, I use Marlin. Really need Marlin 2 but that is not available for some reason.

     

    Edited by Steverc1572
  • Link to post
    Share on other sites

    Posted · Cura adding extra gcode before my custom gcode

    If you have the Printer Settings" plugin loaded then go to the Visibility Tool (the hamburger icon) and set the visibility to "All".  You could try the "search" box as well.

     

  • Link to post
    Share on other sites

    Posted · Cura adding extra gcode before my custom gcode

    Tried both and none of those settings are available for my printers.

     

  • Link to post
    Share on other sites

    Posted · Cura adding extra gcode before my custom gcode

    Oh god I'm beyond help. Here's a post-processing script that should remove those extra lines (it searches for the line starting with ";Generated with" and then deletes any M104, M105, M109, M140, M141, M190 or M191 lines until it encounters a line which isn't one of those, so just make sure your startup gcode doesn't start with one of those).

     

    To install and use the script:

    1. In Cura, go to Help > Show Configuration Folder
    2. Go to the scripts subfolder in that
    3. Drop the .py file from the zip file into that folder
    4. Restart Cura
    5. Go to Extensions > Post Processing > Modify G-Code
    6. Click the Add a script button
    7. Select Deleted Added Temperature from the list

     

    It should be harmless if left on when you're not experiencing that problem.

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

    DeleteAddedTemperatureV1.zip

  • 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...