But how do I stop this all together from bring in the gcode? I don't want it at all... No matter what the proper code is
GregValiant 1,115
I'm big on work-arounds. Hopefully somebody will drop by and explain how to keep the G29 from being added. In the mean time...
In Cura go to Extensions / Post-Processing / Modify Gcode and in the dialog box select "Add a Script". From the list select "Search and Replace". In the "Search" box put G29 and in the "Replace" box put ;G29 .
All G29's in the file will be commented out.
Edited by GregValiantPlease attach a project file so we can see your machine settings (file/save) attach the .3mf
13 hours ago, GregValiant said:I'm big on work-arounds. Hopefully somebody will drop by and explain how to keep the G29 from being added. In the mean time...
In Cura go to Extensions / Post-Processing / Modify Gcode and in the dialog box select "Add a Script". From the list select "Search and Replace". In the "Search" box put G29 and in the "Replace" box put ;G29 .
All G29's in the file will be commented out.
This worked PERFECTLY! Thank you so much for the help!!!!
GregValiant 1,115
It looks like it gets added to the Start-Up Gcode box in Cura as a default for your printer. You can either delete the line from your Start-Up Gcode, or put a semi-colon in front of the G92 so the printer will ignore it. Either way would allow you to get rid of the Search and Replace plugin.
- 2 weeks later...
Hi. I am new to 3D printing. I have update Cura to the latest version and my CR10S Pro is auto-leveling before each print too. Will this cause problems with the printer? Should I disable it ? Thanks.
It was causing issues where I would level the bed and then the auto level was reading differently when the printer did it before each print
See above comment on how I disabled it
-
1
- 2 weeks later...
Thanks for your input. Worked perfectly well !
I am having a similar issue, however it started at 4.6 for me. I was using 4.5 and updated to 4.6. I downgraded back to 4.5 and all was fine. Thought maybe it was just a 4.6 issue so I updated to 4.7 the other day and it is still occurring. However, I am seeing more than just the G92. My printer is an Ender 3 Pro, and I do have an TH3D EZABL Pro so I have start g-code for generating the mesh. This is my start G-code:
;*** Start Dual Nozzle/Bed Preheating *** M140 S{material_bed_temperature_layer_0} ; start preheating the bed M104 S{material_print_temperature_layer_0} T0 ; start preheating hotend G28 ; home M190 S{material_bed_temperature_layer_0} ; heat to Cura Bed setting M109 S{material_print_temperature_layer_0} T0 ; heat to Cura Hotend ;*** End Preheating *** M117 Print Starting... M75 ; Start Print Timer and Engage Fil Sensor if USB Printing M84 E ; Disable E Motor for probe accuracy on direct drive systems M117 Antiblob retract... G92 E0 ; Reset Extruder distance to 0 G1 E-2 ; Retracts filament to prevent blobs during probing G92 E0 ; Reset Extruder distance to 0 M117 Homing All... G28 ; home all axes M117 Homing Z Probe... G28 Z ; home z again M117 Generating mesh... G29; auto bed leveling M117 Heaters Recovering... G4 S30; wait for heaters to recover M420 Z0; Z fade M900 K0; LA M117 Purging extruder... ;*** Draw a Nozzle Cleaning line on the Left Side of Bed G92 E0 ; Reset Extruder G1 Z2.0 F3000 ; Move Z Axis up little G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line G92 E0 ; Reset Extruder G1 Z2.0 F3000 ; Move Z Axis up little G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish M117 Printing.....
And then this is the beginning of the g-code that is output by Cura:
;FLAVOR:Marlin ;TIME:9087 ;Filament used: 7.62933m ;Layer height: 0.2 ;MINX:79 ;MINY:92.423 ;MINZ:0.2 ;MAXX:141 ;MAXY:165.577 ;MAXZ:33.8 ;POSTPROCESSED ;Generated with Cura_SteamEngine 4.7.1 M82 ;absolute extrusion mode ;*** Start Dual Nozzle/Bed Preheating *** M140 S60 ; start preheating the bed M104 S200 T0 ; start preheating hotend G28 ; home M190 S60 ; heat to Cura Bed setting M109 S200 T0 ; heat to Cura Hotend ;*** End Preheating *** M117 Print Starting... M75 ; Start Print Timer and Engage Fil Sensor if USB Printing M84 E ; Disable E Motor for probe accuracy on direct drive systems M117 Antiblob retract... G92 E0 ; Reset Extruder distance to 0 G1 E-2 ; Retracts filament to prevent blobs during probing G92 E0 ; Reset Extruder distance to 0 M117 Homing All... G28 ; home all axes M117 Homing Z Probe... G28 Z ; home z again M117 Generating mesh... G29; auto bed leveling M117 Heaters Recovering... G4 S30; wait for heaters to recover M420 Z0; Z fade M900 K0; LA M117 Purging extruder... ;*** Draw a Nozzle Cleaning line on the Left Side of Bed G92 E0 ; Reset Extruder G1 Z2.0 F3000 ; Move Z Axis up little G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line G92 E0 ; Reset Extruder G1 Z2.0 F3000 ; Move Z Axis up little G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish M117 Printing..... G92 E0 M117 Auto Home First... G28 ; Go to origin on all axes M117 Print Starting... M75 ; Start Print Timer and Engage Fil Sensor if USB Printing M84 E ; Disable E Motor for probe accuracy on direct drive systems M117 Antiblob retract... G92 E0 ; Reset Extruder distance to 0 G1 E-2 ; Retracts filament to prevent blobs during probing G92 E0 ; Reset Extruder distance to 0 M117 Homing All... G28 ; home all axes M117 Homing Z Probe... G28 Z ; home z again M117 Generating mesh... G29; auto bed leveling M117 Heaters Recovering... G4 S30; wait for heaters to recover M420 Z0; Z fade M900 K0; LA M117 Purging extruder... G92 E0 ; reset extruder G1 Z1.0 F3000 ; move z up little to prevent scratching of surface G1 X0.1 Y20 Z0.3 F5000.0 ; move to start-line position G1 X0.1 Y100.0 Z0.3 F500.0 E15 ; draw 1st line G1 X0.4 Y100.0 Z0.3 F5000.0 ; move to side a little G1 X0.4 Y20 Z0.3 F500.0 E30 ; draw 2nd line G92 E0 ; reset extruder G1 Z1.0 F3000 ; move z up little to prevent scratching of surface
My print still came out fine but there is something definitely odd going on.
- 1 year later...
On 9/2/2020 at 3:05 AM, GregValiant said:I'm big on work-arounds. Hopefully somebody will drop by and explain how to keep the G29 from being added. In the mean time...
In Cura go to Extensions / Post-Processing / Modify Gcode and in the dialog box select "Add a Script". From the list select "Search and Replace". In the "Search" box put G29 and in the "Replace" box put ;G29 .
All G29's in the file will be commented out.
Hello There!
I tried your fix but ist still does the levelling each time it starts a pring. Any other idea why it does this?
GregValiant 1,115
I need to see a Gcode file that you sliced and that shows the problem. So slice a calibration cube or benchy (something small) and post the gcode here.
- 2 weeks later...
Hi, looking over this i thought i add a few things
This issue happened a while ago to a cr10s pro i have. I never made the connection to Cura at the time, But i have noticed more and more features being added that has unfortunately hindered my production in the past.
However with time and research its possible to workaround the issues. However i would like to address the root cause of the issue. or at least point out to someone with the ability to correct/address some of the issues like this one that Cura slicer brings now. (Cura dev team)
The issue here being the auto bed level command that gets added to each gcode file effecting cr10s since version 4.6.
m sure this will effect over printers with marlin 1.1.9 and a mesh bed level system.
When having this problem i checked start Gcode, i was looking for the G29 command but couldn't find it within the printer settings in cura. I was prepared to just manually edit the Gcode each time after slicing but before the print. However i found an old profile that i was able to use (thankfully i save my profiles as files externally to Cura so all i have to do is open up the file and tweak settings as and when i need to. Best way imo)
I save the project as a 3mf file.
One of these files had a profile i made back in Cura v4.6, when slicing with this profile using the cr10s printer settings. (also loaded in using the 3mf file - an option to update the current printer settings appears when opening this file) very useful!
Once i sliced using this old profile i saved my gcode and inspected it. - i found no auto levelling command! excellent i thought.
Settings must be in the profile within Cura. - i created a bran new profile within newest version of cura and tested. - still got the autoleveling command there as suspected.
I realised that somewhere in my old Cura profile it does not add autolevel command G29.
I discovered new profiles within Cura 4.7 or above will just automatically add the G29 (auto level) command to the gcode when slicing. I found no hint of a auto level setting within Cura profile settings so i suspect its a hidden function called by the profile when slicing. Since we cannot see the full extent of code in Cura's profiles we cannot edit out the auto level function.
The only solution i could find in the time i gave myself was to manually remove the command from gcode after slicing or use my old Cura profile created in cura 4.6 or below to do the slicing as this left out the g29 command.
Also i had another issue when my printer would pause between sequential prints, turns out Cura was adding a wait for bed temp command, pointless as i already was a the correct them, all this achieved was some ooze to poor out and ruin the next object. I have to manually remove this command too. Again another settings that cannot be changed in curas anywhere.
Considering Cura is meant to be granular, i seem to be noticing some issues with how the gcode is generated - that i would like more control of.
Commands to look out for in your gcode file.
M190 S60 - wait for bed temp - if doing sequential prints you only need one of these at the start. delete the rest.
G29 ;Auto bed Level - This will need to be removed - thankfully only the one command unlike the above command.
(or use a script like GregValiant mentioned above)
If anyone has a better solution please let me know.
Kind regards,
Lit
GregValiant here is a copy of the new gcode Cura makes with a new profile for the cr10s:
I've only added the first 30lines of code so you can see the stage G32 code is added.
;FLAVOR:Marlin
;TIME:7275
;Filament used: 3.23418m
;Layer height: 0.2
;MINX:57.546
;MINY:51.99
;MINZ:0.2
;MAXX:259.945
;MAXY:238.344
;MAXZ:24.102
;Generated with Cura_SteamEngine 4.7.1
M140 S70
M105
M190 S70
M104 S200
M105
M109 S200
M82 ;absolute extrusion mode
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
G28 ;Home
G29 ;Auto bed Level
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
GregValiant 1,115
You have gone to "Settings | Printer | Manage Printers | Machine Settings" and within the lower left textbox of the Machine Settings dialog labeled "StartUp G-Code"; there is no line that says "G29" that you can add a semi-colon in front of to comment out?
Everything pertaining to your printer is contained within the printer definition files. The definition for the CR10S loads in the following order:
-
fdmprinter.def.json (the base definition file for all printers in Cura. If you add a custom FFF printer this is the definition used.) This was written by Ultimaker and contains this generic StartUp Gcode:
- G28 ;Home
- G1 Z15.0 F6000 ;Move the platform down 15mm
- ;Prime the extruder
- G92 E0
- G1 F200 E3
- G92 E0"
-
creality_base.def.json (loads for all Creality printers and was written by Trouch.com). It has this over-ride for StartUp Gcode:
- M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
- M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
- M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
- M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
- M220 S100 ;Reset Feedrate
- M221 S100 ;Reset Flowrate
- G28 ;Home
- G92 E0 ;Reset Extruder
- G1 Z2.0 F3000 ;Move Z Axis up
- G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
- G1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
- G1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
- G1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
- G92 E0 ;Reset Extruder
- G1 Z2.0 F3000 ;Move Z Axis up
- creality_cr10.def.json (loads for all Creality CR10 printers and was written by Trouch.com) There is no over-ride for the StartUp Gcode.
- creality_cr10s.def.json (loads specifically for the Creality CR10s printer and was written by Trouch.com) There is no over-ride for the StartUp Gcode.
@litprints - what I see in your gcode snippet is that there are no purge lines, and there is a G29 in a line that the definition file leaves blank. It appears to me that your StartUp Gcode has been altered from what is in the Cura definition files for a CR10s.
Now...within the creality_CR10max.def.json file is this over-ride for the StartUp Gcode:
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
G28 ;Home
G29 ;Auto bed Level
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
G1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
G1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
G1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
My assumptions from all of that is: The CR10s as delivered does not have ABL but if ABL is added then something might over-ride the StartUp Gcode and add the G29 line (and remove the purge lines). The CR10MAX comes with an ABL system and so the G29 line is added to the StartUp Gcode from the definition as written by Trouch.com. But the CR10Max definition still contains the purge lines.
I am a simple user. I have one printer and it is a Creality Ender 3 Pro. I don't know for certain, but I'm fairly confident (99.999999%) that Ultimaker did not add some sub-routine to Cura that checks to see if the active printer is a CR10S and if it is, then add a G29 into the middle of what should be the StartUp Gcode from the definition file. Why would Ultimaker care to mess around and add the ABL command to a printer when they have no idea whether or not it has an ABL system?
I load a lot of 3mf files as I do my little detective work around here (it's my contribution to the "community"). I have to be very careful when opening a 3mf that includes an Ender 3 Pro because I have a custom StartUp G-Code (and custom End Gcode) that I don't want over-written...and it would be if I allowed the 3mf to "update" my printer. I always select "Install New". I end up with a lot of installed printers and have to go through them and do some deletions from time to time. My best guess as to what happened is that at some point you opened a 3mf file and your StartUp Gcode got "updated". Either that or someone has altered your creality_base.def.json file.
Hiya GregVailiant,
I haven't gone in-depth with this due to time, But taking in what you have said and what i have seen it is starting to make sense.
I have ABL on my cr10s pro using tinymachines firmware.
I found no line of code for the G29 in my start-up code in cura printer settings ("Settings | Printer | Manage Printers | Machine Settings") this is true for both a newly created printer config or the old printer config loaded with the .3mf file i saved many moons ago.
I also reinstalled cura from the ground up early this month. So im not sure why purge lines are missing or why my code would be altered as it should be default.
But still when creating the gcode with the newly created cr10s pro config i still get the ABL code G29, Maybe this is an overwrite from a definition i have somewhere, i haven't investigated or learnt anything about that yet but from what your saying this could be the case.
I suspect in my case over time the printer configs have been updated as cura improved and as a result i now have the abl command generated in the gcode.
Ive never edited any of the definition files so i guess this ABL feature was added to cura profile later?
I think if i load an old 3mf file and select 'update' then .3mf file updates currently loaded printer settings in cura (if it is the same printer name) or adds a new printer if the currently loaded printer name does not match the printer name that has been created with in the .3mf file. )
Also i have issues with cura atm as it will not hold my printer profiles/configs created in appdata. This will be due to the domain network im on or some element that is broken in folder redirection or some corrupt file somewhere in appdate. Either way this kinda works for me as i now just save the printer profile i want as a .3mf file and load it in as new printer every time i want to use it since no other printer exists in cura when i load it up (yes it acts like it never been opened before, i have attempted to fix it a few times but no i cba). Currently cura works for me and stops all the printer profiles from building up when im working.
My takeway from this is:
i have a new install of cura.
If creating a new profile for the crs10 pro - G29 auto level will be added by default. It will not appear in cura's printer settings under startup code. I think G29 gets added in or part of the gcode is overwritten by these base definitions you mention. does make sense and im sure these definitions will be used to build the frame work for the gcode. Start and end. i guess cura's gcode start and end windows allows you to add commands in addition before generating gcode.
In the past i believe the G29 command was not automatically added or was never implemented at the time. So when creating a .3mf file in the past Cura would also save a definition that the file references when building gcode.
I guess that's why i see the difference between my old and new printer profiles
For now i use a work around in cura using post processing scripts to remove the G29 code automatically or just load up my old 3mf file.
Either way its nice to know what's going on even if it can not be solved directly.
Thanks for your time and effort on this one GregVilliant 🙂
GregValiant 1,115
Maybe @nallath of the Cura Team can make something of this. @litprints - if you would load a model and then use the "File | Save Project" command and post the project file here it would be helpful.
My understanding from the gcode files I've seen is that:
Cura generates a gcode from the slices. (That part is magic to me).
- Creates a header (;firmware, ;filament used, ;maxX, Y, Z, ; generated with...,etc.)
- If the StartUp gcode does not contain temperature information it is added to prevent cold extrusion.
- The StartUp Gcode for the active printer goes in.
- The body of the gcode is added.
- The Active Printer's End Gcode goes in.
- The "footer" that includes the "settings" section is added.
I just don't see a way for a "Phantom G29" to slip in there into the middle of the StartUp Gcode section. Somehow as you load the different 3mf files, one has a "G29" in the StartUp Gcode and when you load that file it becomes the default. If you don't have a G29 in the StartUp Gcode then one should not appear in the middle of your StartUp Gcode in a gcode file. That implies there is a search routine that knows to add the line after the G28 line.
On 1/21/2022 at 2:07 PM, GregValiant said:I am a simple user. I have one printer and it is a Creality Ender 3 Pro. I don't know for certain, but I'm fairly confident (99.999999%) that Ultimaker did not add some sub-routine to Cura that checks to see if the active printer is a CR10S and if it is, then add a G29 into the middle of what should be the StartUp Gcode from the definition file. Why would Ultimaker care to mess around and add the ABL command to a printer when they have no idea whether or not it has an ABL system?
You can make that a 100% 😉
As for the G29 command; The engine does not add it. It is only ever added by the start / end gcode as set in the frontend.
If a project file could be shared with the setup, I could have a look.
Hi Guys,
I reinstalled Cura 4.7 some days ago due to appdata issues. Maybe that was the root cause of the phantom G29. I guess when i reinstalled it last time, and used it to generate the Gcode posted above, the program was still broken/ not installed correctly. Since wiping the profile i used on this computer I believe the issue was having regarding G29 is now resolved.
To confirm, i created a new printer from dropdown list within cura, behold the G29 auto level is visible in start up Gcode.
To back track I asked a friend of mine whom uses this computer as well and found they had done a bunch of things to cura but could not remember everything that was done. Once i found that out i just wiped the computer profile and made a new one. Im sure the roaming domain profile used on this computer was corrupted and caused issues. I mean i couldn't even set a desktop background image on the pc. Looking into that just re-enforced my idea of a broken profile.
Since the user data and users appdata is stored on a server and not the PC i think this could have been the issue. Other than that i have no clue as this is working for me now. I can see the G29 code in startup gcode in version 4.7.
It would be pintless to share my profile now as its working just fine. But next tie i will do just that.
So to sum up, my solution to the original issue i was having when posting here is to remove the G29 command from startup gcode in cura version 4.7 and above.
I feel bad now as my issues where computer/network related and not so much cura software.
Thanks so much for your time and effort in assisting me.
I have a few questions regarding cura update process:
Do the definitions get overwritten during a cura update?
what kind of settings are stored in appdata?
Kind regards,
-
1
GregValiant 1,115
There ya go. Fixed. Thanks for getting back and letting us know.
- 10 months later...
On 9/2/2020 at 2:05 AM, GregValiant said:I'm big on work-arounds. Hopefully somebody will drop by and explain how to keep the G29 from being added. In the mean time...
In Cura go to Extensions / Post-Processing / Modify Gcode and in the dialog box select "Add a Script". From the list select "Search and Replace". In the "Search" box put G29 and in the "Replace" box put ;G29 .
All G29's in the file will be commented out.
Hi, I have the same problem, tried this , it didn't work, cant delete the line, its annoying having to wait after every print ,when nothing else hws been altered. if necessary we can run bed level through the prepare. menue
GregValiant 1,115
@Barney did you look in the Manage Printers \ Machine Settings dialog? The StartUp gcode is in the lower left box. You should be able to put a semi-colon in front of the G29 line and the printer will ignore it.
The line is added by the CR-10SPro definition file that was likely submitted by a member of the community.
Recommended Posts
Longtoke 25
One change I noticed in version 4.7 was the line you have highlighted. Previously bed leveling was done with M420 and it's related parameters. There's some discussion going on among CR10 users prior to 4.7 release in a couple of threads where some were having issues with a triangular extrusion pattern between the bed leveling process and initial purge print, possibly resulting in the change from M420 to G29 in the 4.7 release. We would have to have someone from Ultimaker confirm that to be certain though.
Best thing i can suggest is go have a read of marlin's g-code on their site, it elaborates on the differences between G29 and M420.
G29 info here - https://marlinfw.org/docs/gcode/G029.html
M420 info here - https://marlinfw.org/docs/gcode/M420.html
You may need to double check what functions are enabled in your firmware version too. If you're using firmware 1.70 from Creality, M420 is bugged thus you need to use G29.
Edited by Longtokeaddition info
Link to post
Share on other sites