Jump to content
Th3RadMan

Starting gcode issues

Recommended Posts

Posted · Starting gcode issues

I'm not sure why, but I can't get the starting gcode to work how I want it to.  I simply want to home, preheat the nozzle to 160C, and heat the bed to the desired temp.  However, I feel like I'm telling a toddler to do 5 things and it will do a couple things, out of order.  With the code below, it begins preheating the nozzle to 160, then immediatly mesh bed levels.  It doesn't home and wait nor does it even attempt to heat the bed.

 

G21 ; set units to millimeters

G90 ; use absolute positioning

M82 ; absolute extrusion mode

 

G28 ; home

 

M104 S160 ; Set extruder to 160C

M140 S{material_bed_temperature_layer_0} ; set bed temp

M109 S160 ; Wait for extruder

M190 S{material_bed_temperature_layer_0} ; wait for bed temp

 

G80 ; Mesh Bed Level

 

M104 S{material_print_temperature_layer_0} ; set extruder temp

M109 S{material_print_temperature_layer_0} ; wait for extruder temp

 

G92 E0.0 ; reset extruder distance position

G1 Y-3.0 F1000.0 ; go outside print area

G1 X60.0 E9.0 F1000.0 ; intro line

G1 X100.0 E21.5 F1000.0 ; intro line

G92 E0.0 ; reset extruder distance position

M907 E500 ; Set motor current

M221 S{if layer_height<0.075}100{else}95{endif}

 

 

Any idea why I'm not getting my desired results? 

Share this post


Link to post
Share on other sites
Posted · Starting gcode issues

What does the generated g code look like after you slice using this start code ?

 

seems ok when i test it.

 

Share this post


Link to post
Share on other sites
Posted · Starting gcode issues
On 3/7/2020 at 7:55 AM, Th3RadMan said:

M221 S{if layer_height<0.075}100{else}95{endif}

That line is not going to work in Cura; Cura has no (and never had) conditional gcode.

Share this post


Link to post
Share on other sites
Posted (edited) · Starting gcode issues
23 hours ago, obewan said:

What does the generated g code look like after you slice using this start code ?

 

seems ok when i test it.

 

 

I ran a test with set M104 S160 and M140 S65 constants as an attempt to remove variables when the first layer variables would have been.  This is what was generated up to the first layer.  It added M104 and M140 values before the start code.  But then the M109 and M190 are completely ignored and the leveling begins

 

````

;FLAVOR:Marlin
;TIME:228
;Filament used: 0.104057m
;Layer height: 0.2
;MINX:113.024
;MINY:99.024
;MINZ:0.2
;MAXX:136.976
;MAXY:110.976
;MAXZ:15.2
;LINEARADVANCEPROCESSED
;Generated with Cura_SteamEngine 4.5.0
M140 S65
M104 S215
M82 ;absolute extrusion mode
M115 U3.8.1 ; tell printer latest fw version
G21 ; set units to millimeters
G90 ; use absolute positioning
M82 ; absolute extrusion mode

G28 ; Home
M104 S160 ; set extruder temp to 160C
M140 S65 ; set bed temp
M109 S160 ; wait for extruder temp
M190 S65 ; wait for bed temp
G80 ; mesh bed leveling
M104 S220 ; set extruder temp
M109 S220 ; wait for extruder temp

G92 E0.0 ; reset extruder distance position
G1 Y-3.0 F1000.0 ; go outside print area
G1 X60.0 E9.0 F1000.0 ; intro line
G1 X100.0 E21.5 F1000.0 ; intro line
G92 E0.0 ; reset extruder distance position
M907 E500 ; Set motor current

G92 E0
G92 E0
G1 F2100 E-0.6
;LAYER_COUNT:86
M900 K30.000000 T0 ;added by LinearAdvanceSettingPlugin

Edit:  I found the solution to the main problem.  I needed to use G28 W instead of G28, so the bed leveling doesn't occur before the preheat.  Now I'm not sure why I'm getting the couple of lines before the start code.  That is the final mystery that needs to be solved.

Edited by Th3RadMan

Share this post


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

    • Survey: Understanding your workflow
      Interact with future concepts and aim to collect your feedback and opinion. In particular, if this would/could be a welcome addition to your 3D printing workflow. Interested?
      • 0 replies
    • Coronavirus: Let's do our part
      Through this post I would like to further explain what we are doing, and what you could be doing. 
      Our efforts consist of 2 layers. First; connect medical institutions and hospitals to (local) 3D Printing hubs to help them print parts of which a 3D model already exists. And second, contribute to design the necessary part and then have it printed via a (local) 3D printing hub. Experts are available from within Ultimaker and from within our network of 3D printing experts.
        • Like
      • 49 replies
×
×
  • Create New...

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!