Jump to content
UltiMaker Community of 3D Printing Experts

Temp gcode not in start gcode of Cura?


Tetra84

Recommended Posts

Posted · Temp gcode not in start gcode of Cura?

Hi,

Hoping someone can help me figure this out. I'm trying to set up RGB lighting for my printer, I've got it mostly figured out, however, I'm trying to get a red light to come on when the printer starts heating up. As it is, I can only add that code in Octoprint, since Cura doesn't seem to show the bed and tool heating code in the start gcode section. I can see this code when I look at it in OctoPrint, but how do I access it in my slicer program? I don't want to have to modify each individual gcode before I print every time in OctoPrint. Is there a way to put custom temp code in the start gcode of Cura and not have it auto-generated? Basically, why is the boxed g code (M190, M104, M109) not by default in the start g-code of Cura? and is there a way I can put it in there? I'd like to add a M150 command at the very start, but I can't because it will put the bed and tool heating code before that.

 

I've tried adding the below code at the start g-code section:

 

M150 R255; turn on red LEDs

 

M190 S{first_layer_bed_temperature} ; set bed temp

M104 S{first_layer_temperature} ; set extruder temp

M109 S{first_layer_temperature} ; wait for extruder temp
M82 ; absolute extrusion mode

 

however, it still adds additional M190, M104, M109 before it when I look at the gcode in OctoPrint.

 

Help?

 

image.thumb.png.db4f78fe4a9eca94b7500f0d29d51b03.pngimage.thumb.png.a623b1a37d719e45d096a4c140344f12.png

 

  • Like 1
Link to post
Share on other sites

Posted · Temp gcode not in start gcode of Cura?

Looking at the Cura sources I would expect those names to be material_bed_temperature, material_bed_temperature_layer_0, material_print_temperature and material_print_temperature_layer_0.

  • Like 2
Link to post
Share on other sites

Posted · Temp gcode not in start gcode of Cura?

Hello @ahoeben, while you're here did you see the request the other day from a user to be able to have multiple extruders with a single heater? I think quite a lot of people would probably like that. I suggested that I would do the engine stuff if some heroic person worked on the front end. It probably doesn't need much, maybe just a checkbox to say that all the extruders share a heater. Are you up for it?

  • Link to post
    Share on other sites

    Posted (edited) · Temp gcode not in start gcode of Cura?

    thanks smartavionics, using the material command was the thing to do!

     

    from an earlier reddit post I made, someone else suggested which worked: 

     

    M140 S{material_bed_temperature} ; heat bed, nonblocking

    M104 S{material_print_temperature} ; heat hotend in parallel ;

    DO THE RGB THING HERE

    M190 S{material_bed_temperature} ; heat bed, blocking

    M109 S{material_print_temperature} ; heat hot end, blocking

    Edited by Tetra84
    • Like 1
    Link to post
    Share on other sites

    Posted · Temp gcode not in start gcode of Cura?

    Hi. Having the same issue. Cura ignores that I set M140 and M104 commands into the "start code" and still adds these commands BEFORE custom start code.

     

    What I wanted to achieve is to start heating up nozzle and the bed at the same time, home the nozzle and then wait for target temps. Instead of waiting for the bed, then waiting for the nozzle, then waiting for the homing.

     

    I'm using similar thing to previous message:

    M140 S{print_bed_temperature}
    
    M104 S{print_temperature}
    
    do things
    
    M190 S{print_bed_temperature}
    
    M109 S{print_temperature}

     

    Variables are different than previous message but they're correct, according to result.

     

    So Cura still inserts its default heating code, which is start heating the bed and wait, then start heating the nozzle and wait.

     

    Cura 4.6.1, Windows.

  • Link to post
    Share on other sites

    Posted · Temp gcode not in start gcode of Cura?

    Ok, googled a bit more and found out.

     

    Apparently Cura ignores M140/M104 commands in custom start code if you use these variables. Even though they are correct and working overall. They're just being ignored by parser that decided whether it should insert heating commands or not.

     

    According to this issue, I need to use {material_print_temperature_layer_0} and {material_bed_temperature_layer_0}. I tried, it works properly. Cura recognizes these variables in custom start code as heating commands.

  • 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.3 stable released
        In this stable release, Cura 5.3 achieves yet another huge leap forward in 3D printing thanks to material interlocking! As well as introducing an expanded recommended print settings menu and lots of print quality improvements. Not to mention, a whole bunch of new printer profiles for non-UltiMaker printers!
          • Thanks
          • Like
        • 30 replies
      • Here it is. The new UltiMaker S7
        The UltiMaker S7 is built on the success of the UltiMaker S5 and its design decisions were heavily based on feedback from customers.
         
         
        So what’s new?
        The obvious change is the S7’s height. It now includes an integrated Air Manager. This filters the exhaust air of every print and also improves build temperature stability. To further enclose the build chamber the S7 only has one magnetically latched door.
         
        The build stack has also been completely redesigned. A PEI-coated flexible steel build plate makes a big difference to productivity. Not only do you not need tools to pop a printed part off. But we also don’t recommend using or adhesion structures for UltiMaker materials (except PC, because...it’s PC). Along with that, 4 pins and 25 magnets make it easy to replace the flex plate perfectly – even with one hand.
         
        The re-engineered print head has an inductive sensor which reduces noise when probing the build plate. This effectively makes it much harder to not achieve a perfect first layer, improving overall print success. We also reversed the front fan direction (fewer plastic hairs, less maintenance), made the print core door magnets stronger, and add a sensor that helps avoid flooding.
         

         
        The UltiMaker S7 also includes quality of life improvements:
        Reliable bed tilt compensation (no more thumbscrews) 2.4 and 5 GHz Wi-Fi A 1080p camera (mounted higher for a better view) Compatibility with 280+ Marketplace materials Compatibility with S5 project files (no reslicing needed) And a whole lot more  
        Curious to see the S7 in action?
        We’re hosting a free tech demo on February 7.
        It will be live and you can ask any questions to our CTO, Miguel Calvo.
        Register here for the Webinar
          • Like
        • 18 replies
      • UltiMaker Cura Alpha 🎄 Tree Support Spotlight 🎄
        Are you a fan of tree support, but dislike the removal process and the amount of filament it uses? Then we would like to invite you to try this special release of UltiMaker Cura. Brought to you by our special community contributor @thomasrahm
         
        We generated a special version of Cura 5.2 called 5.3.0 Alpha + Xmas. The only changes we introduced compared to UltiMaker Cura 5.2.1 are those which are needed for the new supports. So keep in mind, this is not a sneak peek for Cura 5.3 (there are some really cool new features coming up) but a spotlight release highlighting this new version of tree supports.  
          • Like
        • 22 replies
    ×
    ×
    • Create New...