Jump to content

Start G-Code to preheat 2nd extruder


evilC

Recommended Posts

Posted (edited) · Start G-Code to preheat 2nd extruder

I have just got my first IDEX printer (Snapmaker J1)

 

The Cura profile which comes with it does not start heating T1 until both T0 and the bed have heated up

Here is their start g-code:

;--- Start G-code Begin ---
M104 S{material_print_temperature_layer_0} ;Set Hotend Temperature
M140 S{material_bed_temperature_layer_0} ;Set Bed Temperature
G28 ;Home
G1 Z0.8
M109 S{material_print_temperature_layer_0}
M190 S{material_bed_temperature_layer_0}
G1 Z0.8 F6000
M201 X10000 Y10000 Z500 E5000
M593 P1 F50
M205 V5
G92 E0
G1 F200 E2
G92 E0
;--- Start G-code End ---

 

If I change it to this:

;--- Start G-code Begin ---
M104 S{material_print_temperature_layer_0} ;Set Hotend Temperature
M140 S{material_bed_temperature_layer_0} ;Set Bed Temperature
; >>> MODIFIED CODE START
M104 S{material_standby_temperature, 1} T1 ; Start heating T1
; >>> MODIFIED CODE END
G28 ;Home
G1 Z0.8
M109 S{material_print_temperature_layer_0}
M190 S{material_bed_temperature_layer_0}
G1 Z0.8 F6000
M201 X10000 Y10000 Z500 E5000
M593 P1 F50
M205 V5
G92 E0
G1 F200 E2
G92 E0
;--- Start G-code End ---

then this seems to do the trick, but there's a problem:

If I do a single extruder print, and uncheck "Enabled" for the 2nd extruder, like so:

image.png.d139f330a21e9a6c4348acc811fe9d22.png

Then the generated G-Code still heats the 2nd extruder, even though it is not used for the print. Is there a way to somehow generate conditional G-Code, or is there some equivalent of {material_standby_temperature, 1} which would return 0 if the 2nd extruder is not used?

Edited by evilC
  • Link to post
    Share on other sites

    • evilC changed the title to Start G-Code to preheat 2nd extruder
    Posted (edited) · Start G-Code to preheat 2nd extruder

    Yes, that happens because the second material isn't affected by disabling the extruder.  It still has a set "standby temperature" and that is what you are asking for in the StartUp gcode.

     

    Before you disable the extruder - set the "Material | Standby Temperature" of that extruder to 0.  The downside is you must remember to change it back, OR, re-select that settings profile and "discard" the changes.  That would also change it back.  With the Standby Temperature at 0 the code comes out as you would want with:

    M104 S0 T1 ; Start heating T1

    You may also run into a problem if you disable Extruder0, or start a print with Extruder1.  Your startup gcode explicitly asks for T1 to start out at Standby Temperature and T0 to start at Print Temperature.  That may not always be true. You'll need to stay aware of that.

    A fix may to consider is adding additional printers in Cura.  Each could have it's own startup gcode.  I have a second Ender installed as my "TPU Printer" because the purge lines in the StartUp gcode are a lot slower than for PLA or PETG.

     

    I'm not familiar with the Snapmaker printers, but some IDEX printers have gcode commands that tell the printer what Mode to use.  Raise3D uses something like M650 for regular, M651 for Mirror, and M652 for Duplicate.  In that case you would install 3 printers and use the one for the Mode you want to print with and the M65_ command would be in the StartUp Gcode.

    Edited by GregValiant
  • Link to post
    Share on other sites

    Posted · Start G-Code to preheat 2nd extruder

    Yeah I already have an Ender 3 modded with linear rails and a Hemera, and have both added in Cura and running off one Octopi

    Being a bedslinger tho, the Ender3 does not compare to the new CoreXY IDEX. I have souped the Ender 3 speeds up to the max (100mm/s, 3000 accel), but this new one will do 200mm/s, 6000 accel out of the box without any tweaks. Plus of course it's an IDEX, so I can use Copy Mode to print off two copies at once, making it basically 4x as fast as the Ender3

     

    Quote

    I'm not familiar with the Snapmaker printers, but some IDEX printers have gcode commands that tell the printer what Mode to use.  Raise3D uses something like M650 for regular, M651 for Mirror, and M652 for Duplicate

    My printer does not support those AFAIK. Besides, this preheat issue mainly concerns "Normal" IDEX mode (Multi-material in one print)

     

    I put in a feature request on the GitHub repo, let's see what the devs think...

  • Link to post
    Share on other sites

    • 1 year later...
    Posted · Start G-Code to preheat 2nd extruder

    I have been working on this today on my A350 dual extruder, the best I have come up with is to subtract some temperature in the settings for the printer so it does not need to heat much before moving to the correct settings for the Extruder.  You then have the temps set in the extruder settings start code.
    printer start code
    image.png.ea7cd511f8f03c0b10d58e67a6b2dfe8.png

    Extruder left start code.
    image.png.d989fded9d90a7c37b26f3262336af96.png

     

    Extruder right start code.
    image.png.f5073b7bfe2c454a663a95ae4534717b.png

  • Link to post
    Share on other sites

    Posted (edited) · Start G-Code to preheat 2nd extruder

    @tigercjn I don't think that will work.

    1. "material_bed_temperature_layer_0" is not "Settable per extruder".
    2. The "T0" and "T1" lines are superfluous in the Extruder StartUps.
    3. The code will run at every tool change so you are setting the "initial layer" bed and hot end temps whenever you switch tools.  The entire print will be run at Initial Layer values.
    4. G92 sets the extruder location and you are setting it to "1" instead of "0".
    5. You have a "G1 E30" purge line in there.  That will occur over the print at every tool change.  Have you tried enabling the "Purge Tower"?  That will move the print head out of the way.

    It is generally best to allow Cura to handle the tool changes and temperatures.

     

    A problem can occur with the StartUp gcode when there is an ABL involved.  Most people don't want the hot end(s) at printing temperature during leveling because they will ooze across the build surface.  It's a fancy dance ordering the temperatures so that enabled extruders are at the correct temperature during leveling, and then when starting the actual print.

    Once you have brought both hot ends up to temperature there is no way to shut off an unused extruder.  There is no way to do something like "if T1 is not used then M104 S0 T1".  Therein lies the problem.

     

     

    Edited by GregValiant
  • Link to post
    Share on other sites

    Posted · Start G-Code to preheat 2nd extruder
    19 hours ago, GregValiant said:

    @tigercjn I don't think that will work.

    1. "material_bed_temperature_layer_0" is not "Settable per extruder".
    2. The "T0" and "T1" lines are superfluous in the Extruder StartUps.
    3. The code will run at every tool change so you are setting the "initial layer" bed and hot end temps whenever you switch tools.  The entire print will be run at Initial Layer values.
    4. G92 sets the extruder location and you are setting it to "1" instead of "0".
    5. You have a "G1 E30" purge line in there.  That will occur over the print at every tool change.  Have you tried enabling the "Purge Tower"?  That will move the print head out of the way.

    It is generally best to allow Cura to handle the tool changes and temperatures.

     

    A problem can occur with the StartUp gcode when there is an ABL involved.  Most people don't want the hot end(s) at printing temperature during leveling because they will ooze across the build surface.  It's a fancy dance ordering the temperatures so that enabled extruders are at the correct temperature during leveling, and then when starting the actual print.

    Once you have brought both hot ends up to temperature there is no way to shut off an unused extruder.  There is no way to do something like "if T1 is not used then M104 S0 T1".  Therein lies the problem.

     

     

    Thanks. What I am working on is just using the T1 extruder on its own without heating the T0 extruder and also using the T0 Extruder without heating the T1. Just to use different materials loaded but not on the same print.

  • Link to post
    Share on other sites

    Posted · Start G-Code to preheat 2nd extruder

    There does seem to be a bug in my printer as the first time I go to print it heats T0 but if I cancel and then reprint with the same Gcode it just heats T1. Strange its just the first print after a power up that heats the T0 wrongly.

     

  • Link to post
    Share on other sites

    Posted · Start G-Code to preheat 2nd extruder

    There is (what I think) is a bug in Cura.  If you disable an extruder it does not automatically switch something like "Skirt extruder" over to the other extruder.  You must do that manually prior to disabling the extruder (because the settings are hidden when an extruder is disabled).  So if you have a "single extruder print" you must insure that both the "Support Extruders" and the "Skirt/brim Extruder" are set to the proper extruder.

     

    If you remove the temperature lines from the startup gcode and allow Cura to handle it you get this.  The material standby temperatures are 175 so the secondary extruder doesn't heat all the way.


    ;TARGET_MACHINE.NAME:Snapmaker J1
    ;Generated with Cura_SteamEngine 5.7.0
    T0
    M140 S60
    M105
    M190 S60
    M104 S200
    M104 T1 S175
    M105
    M109 S200
    M105
    M109 T1 S175
    M82 ;absolute extrusion mode
    ;--- Start G-code Begin ---
    G28 ;Home

     

    With T0 disabled, the part set to T1 and the support and skirt extruders manually set to T1 (before disabling T0).

    ;Generated with Cura_SteamEngine 5.7.0
    T1
    M140 S60
    M105
    M190 S60
    M104 S200
    M105
    M109 S200
    M82 ;absolute extrusion mode
    ;--- Start G-code Begin ---

     

    In both cases the code is correct.  Since your printer doesn't appear to have auto-leveling (no G29 or M420 in the startup) that would work.

     

    In regards to the "always heat up T0" bug, you could fix that with a dedicated post processor that could add a "M104 S0 T0" line before all the other temperature lines.  The extruder might turn on at power up, but it would turn off when the gcode file starts and then the proper heating would occur.

     

  • 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

      • 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
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...