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.
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.
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 Th3RadManI have the exact same issue - Cura is inserting both M140 and M104 commands prior to the custom g-code that I have setup, which is to heat the nozzle to 160 and bed to 60 to perform a auto-home followed by a bilinear ABL. This is then followed by heating the nozzle to the layer 0 temp and bed to layer 0 bed temp. How do I get rid of the initial M140 and M104 commands that Cura is inserting?
Unable to edit my previous post
figured out the solution: you need to have a "material_bed_temperature" and "material_print_temperature" in your g-code. If you don't, Cura will automatically insert the initial M104 and M140 commands.
Recommended Posts
obewan 36
What does the generated g code look like after you slice using this start code ?
seems ok when i test it.
Link to post
Share on other sites