Jump to content

Changing Cura generated start code


ex-egll

Recommended Posts

Posted · Changing Cura generated start code

* Tick the "use regular expressions" box (so you can use "\n" for a new line)

* Search ";LAYER:"

* Replace ";whatever gcode you want goes here\n;LAYER:"

 

Because you only have a single line to enter the replace code, use "\n" instead of a return

  • Thanks 1
Link to post
Share on other sites

Posted · Changing Cura generated start code

so to make sure the replace code will be ";G90; Absolute Positioning\n;G1 F9000 X220 Y215; Quick Move\n;G1 F1000 X232; Precission Poke\n;G4 P700; Hold it hold it\n;G1 F9000 X220; Quick Move:"  right ?

 

the original code:

 G90; Absolute Positioning

G1 F9000 X220 Y215; Quick Move

G1 F1000 X232; Precission Poke

G4 P700; Hold it hold it

G1 F9000 X220; Quick Move

 

pleas tell me if anything is wrong.

 

thank you for everything 

  • Link to post
    Share on other sites

    Posted (edited) · Changing Cura generated start code

    Almost. Don't put a ";" in front of each line. This will make the firmware ignore the line as a comment.

     

    Update:

    It is also smart to put a final "\n;LAYER:" at the end, so you put that text that you are finding back in.

     

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

    Posted · Changing Cura generated start code

    "G90; Absolute Positioning\nG1 F9000 X220 Y215; Quick Move\nG1 F1000 X232; Precission Poke\nG4 P700; Hold it hold it\nG1 F9000 X220; Quick Move\n;LAYER:"

     

    this is the code i am using 

  • Link to post
    Share on other sites

    Posted · Changing Cura generated start code

    Yes, it works for me that way.

    Can you post a screenshot like I did, and a link to a saved gcode file?

    • Like 1
    Link to post
    Share on other sites

    Posted · Changing Cura generated start code

    Yes I will post a photo now 

  • Link to post
    Share on other sites

    Posted · Changing Cura generated start code

    20180918_004340.thumb.jpg.5904ce4161d22d640950a503a9cb1a23.jpg

  • Link to post
    Share on other sites

    Posted · Changing Cura generated start code
    Link to post
    Share on other sites

    Posted · Changing Cura generated start code

    It works for me with Cura 3.4.1. All I can think of is that perhaps something was fixed after Cura 3.2.1, but I would not know what.

    • Thanks 1
    Link to post
    Share on other sites

    Posted · Changing Cura generated start code

    I tried it another time and it worked 

    I don't know how 

    Thank you very much that was very helpful 

  • Link to post
    Share on other sites

    Posted · Changing Cura generated start code

    I know this is an old topic, but I am having the most frustrating time editing my cgode. 
    First of all, im using cura 3.6 and my Machine option setting isnt even listed as an option. 
    I have tried multiple text editing documents but there seems to be no way to export the edited files as gcode for my printer.
    I have to remove the G1 Z15.0 F3000 ;move the platform down 15mm as it is making my first layer print in the air

    Please help, someone, there is nothing on the internet about exporting gcode with these programs, or editing raw gcode in cura.

     

  • Link to post
    Share on other sites

    Posted · Changing Cura generated start code
    On 6/21/2017 at 6:56 PM, ahoeben said:

    M104 S{material_print_temperature} ;Start heating extruder
    M140 S{material_bed_temperature} ;Start heating bed
    M109 S{material_print_temperature} ;Wait for extruder to reach temp before proceeding
    M190 S{material_print_temperature} ;Wait for bed to reach temp before proceeding

     

     

    This mistake in the code here destroyed my Ender 3 and it's enclosure. Luckily I had it in a tiled room and didn't set the house on fire. This happened so quickly that even though I was home and checking it regularly it still caught fire after only 4 minutes.

     

    For the love of God, please fix this now before someone else uses the same code.

  • Link to post
    Share on other sites

    Posted · Changing Cura generated start code
    5 hours ago, haydenwicks said:

     

    This mistake in the code here...

     

    I'm pretty sure the misinput in the g-code should have been caught by a safety precaution in the firmware by usual standards. Nevertheless, sorry to hear it caught fire tho, glad to hear you are safe! 

     

    - edit: learned which mistake. 

  • Link to post
    Share on other sites

    Posted (edited) · Changing Cura generated start code

    I fixed the old comment.

      

    4 hours ago, haydenwicks said:

    This mistake in the code here destroyed my Ender 3 and it's enclosure

     

    I am very sorry that happened to you.

     

    I am also surprised there are still printers around that you can set on fire this easily via gcode.

    Edited by ahoeben
  • Link to post
    Share on other sites

    Posted (edited) · Changing Cura generated start code
    5 hours ago, haydenwicks said:

     

    This mistake in the code here destroyed my Ender 3 and it's enclosure.

     

    Just curious , normaly on Ender3 in the firmware configuration the MAXTEMP is set to 150°C and HEATER to 275°C

    #define BED_MAXTEMP 150

    As most of the times the material_print_temperature is always upper to 180/190°C  using M190 S{material_print_temperature} should have protected your printer from accidental overheating by going over the BED_MAXTEMP limit.  What was your print temperature in that case ?

    Edited by Cuq
  • Link to post
    Share on other sites

    Posted · Changing Cura generated start code
    8 hours ago, SandervG said:

     

    I'm pretty sure the misinput in the g-code should have been caught by a safety precaution in the firmware by usual standards. Nevertheless, sorry to hear it caught fire tho, glad to hear you are safe! 

     

    - edit: learned which mistake. 

     

    Not all Ender 3 have thermal runaway protection enabled... Big fault made by Creality...

  • Link to post
    Share on other sites

    Posted · Changing Cura generated start code

    I'm surprised that 4 years later and this problem still exists. 

    This actually a poor design and very bad programming, there is "Start gcode" under printer and under extruder, both do nothing if filled with own code but starts act wired when empty.

    This and all I have red here,  prevents me to purchase anything from ultimaker and furter use their products.

    To the rest of all who having this problem, do yourself a favor and better stick to Prusa and SuperSlicer.  

  • Link to post
    Share on other sites

    Posted · Changing Cura generated start code
    6 hours ago, heszar said:

    This actually a poor design and very bad programming, there is "Start gcode" under printer and under extruder, both do nothing if filled with own code but starts act wired when empty.

    The design is there so your printer does not try to extrude cold.

     

    As has been shown in this thread, if your start gcode snippet contains a heatup-sequence, then Cura will not add its own. So you can in fact choose: convenience or control. But you can also choose to use different software.

  • Link to post
    Share on other sites

    Posted (edited) · Changing Cura generated start code

    There seems to be multiple things going on here.

    The mainboards of the Creality Ender line have a screw-in connection for the main power leads coming from the power supply.  Creality didn't bother to put ferrules on the ends of the 24v wires.  They opted just to tin the wires with solder.  The constant heat-up/cool-down cycling of the wire ends causes them to deform and they don't go back to their original shape.  The end result of that is they self-loosen causing a high resistance connection and fire hazard.  That isn't covered under any firmware setting.  It's a well known mechanical defect on at least the Ender 3 and 3 Pro.  Here is mine.  It was a time bomb.  Fortunately for me, it simply quit working before it could ignite the plastic of the connector.

    DSCN2577.thumb.JPG.74dc8f5b0e291d60aef897ea9a9422dc.JPG

     

    @heszar - What version of Cura and what printer are we talking about here?

    Was the line "M190 S{material_print_temperature}" present in the definition file for that printer?

    I can only go back as far as 3.2.1 but as far as I am aware Creality has never used keywords (replacement patterns) in their StartUp G-Code in the definition file (the End Gcode will often include {machine_depth}).  In 3.2.1 the Ender series wasn't present as an option.  The Cura 3.2.1version CR10 definition file did not use replacement patterns.  I am wondering if that typo was made by a user who was personalizing their StartUp G-Code.  It could be passed along if someone loaded a project file that contained that typo in the StartUp G-Code.

    Edited by GregValiant
  • 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
        • 18 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...