Some gcode help?

I dont know if this is the wrong place, but I know the knowledge is here.

I have recently switched my FLSUN delta firmware to marlin.
Everything is good, prints better than ever.

My problem (I think) is in the Start/Stop gcode.

Symptom: start new print and the printer doesnt start spewing filament for lets just say "too long".

I MUST do a skirt to make sure that by the time the part starts I will be extruding filament. I am assuming it is my start/stop gcode. I have looked up all the gcodes and I had thought I had fixed it, but alas the issue remains.

Here is the current code:

START

G21
G90
M82
M107 T0
M190 S{material_bed_temperature_layer_0}
M109 S{material_print_temperature_layer_0} T0
G28
G92 E0
G0 E0 F200
G92 E0

STOP

M107 T0
M104 S0
M104 S0 T1
M140 S0
G92 E0
G91
G1 E0 F300
G1 Z+0.5 E-1 X-20 Y-20 F9000
G28 X0 Y0
M84 ;steppers off
G90 ;absolute positioning

Again apologies as I know this isnt a real Octoprint question, but any help would be appreciated.

What slicer do you use?
Or are those start/stop gcode scripts in OctoPrint?

1 Like

Using M190 and M109 back to back means that the bed must reach its target temperature before the nozzle can start heating. A better sequence is M140, M109, M190 or M104, M190, M109. Either of these sequences allows for parallel heating of the bed and the nozzle.

I believe the commands after the first G92 E0 are redundant (i.e. they don't do anything useful).

Cura.

Im not sure. Im digging around now.

You sure I need to add it to Octo? It says "Anything you put here will be executed before any lines in your files." To me that says it would run my start code 2x.

please correct me if im wrong.

I am gonna look into this. Thanks for the reply!

No. I just was asking.

I asked for the slicer, because Cura uses [ and ] for the tokens.
In the snippet you used { and }

I thought {} was used in Cura, with [] being used in PrusaSlicer (or Slic3r derivatives).

Oops. Did I mix it up? Too bad. Sorry

It's actually more confusing these days. {} is Cura, but PrusaSlicer, SuperSlicer, etc. can use both [] or {}.

[] are the legacy variable place holders, but {} can be used to create more complex expressions, including just single variables.

3 Likes

It is quite common to include the code for purge line in the slicer custom gcodes for startup. Most slicers will create a skirt for you. Prusaslicer now does inside, outside and both.

Here's my cura start gcode with purge line:

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

You have to adjust the size and position of the line, but I've never worked with a round bed so I don't know what would work for you.
I would move the head via the controls tab and check the coordinates.

I am also getting this from octo after my print completes

octoerror

Any other advice as to what is going on? Im pretty good with my printers and octo, but admittedly once it comes down to actual gcode im in over my head.

Ok. wow. I took this code and modded it for my printer. Total difference. That is what I needed. Thank you.

However I am still getting the errors above. Any ideas on those errors folks?

Dont know if there is a better place to post it but for anyone with the same printer. here is the code:

FLSUN QQS Pro purge line(s):

M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
G28 ;Home
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
G1 X-40 Y-110 Z0.28 F5000.0 ;Move to start position
G1 X40 Y-110 Z0.28 F1500.0 E15 ;Draw the first line
G1 X40 Y-109.7 Z0.28 F5000.0 ;Move to side a little
G1 X-40 Y-109.7 Z0.28 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up

Does your printer have more than one extruder? If it does not, then check the configuration in the slicer to make sure you only have one setup. It looks like OctoPrint tried to change the tool by sending T0 to the printer, but it sent back an error.

Hey Charlie,

I only have 1 extruder and "Extruder 1" is the only one that shows up in Cura under machine settings (assuming thats where you mean)

Can you share a gcode file?

1 Like

I could potentially DM it to you, but it is every single print I run. I have dug through all the octo setup and everything looks right. That is why I am confused.

Then just sent the first 100 lines or so.
We need to see what going on to run OctoPrint (not octo) fine again.

here is the first 100 lines of a file I am able to share.

;FLAVOR:Marlin
;TIME:22178
;Filament used: 23.9221m
;Layer height: 0.2
;MINX:-109.485
;MINY:-45.749
;MINZ:0.18
;MAXX:110.262
;MAXY:44.811
;MAXZ:20.995
;Generated with Cura_SteamEngine 4.11.0
M82 ;absolute extrusion mode
G21
G90
M82
M107 T0
M190 S60
M109 S210 T0
G28
G92 E0
G0 E0 F200
G92 E0
G92 E0
G92 E0
G1 F3600 E-7
;LAYER_COUNT:100
;LAYER:-6
M107
G0 F7200 X51.329 Y24.631 Z0.18
;TYPE:SUPPORT-INTERFACE
G1 F3600 E0
G1 F1125 X51.692 Y24.579 E0.02195
G1 X52.052 Y24.416 E0.04561
G1 X52.356 Y24.157 E0.06952
G1 X52.573 Y23.817 E0.09367
G1 X53.059 Y22.691 E0.16709
G1 X54.356 Y19.573 E0.36927
G1 X54.72 Y18.617 E0.43051
G1 X54.788 Y18.445 E0.44158
G1 X59.812 Y6.486 E1.21816
G1 X61.805 Y1.782 E1.52401
G1 X62.04 Y1.249 E1.55889
G1 X62.263 Y0.664 E1.59637
G1 X62.563 Y-0.018 E1.64098
G1 X62.759 Y-.486 E1.67135
G1 X62.855 Y-.748 E1.68806
G1 X63.164 Y-1.545 E1.73923
G1 X63.381 Y-2.025 E1.77077
G1 X63.621 Y-2.602 E1.80818
G1 X63.851 Y-3.111 E1.84162
G1 X64.082 Y-3.666 E1.87761
G1 X64.285 Y-4.13 E1.90793
G1 X64.503 Y-4.712 E1.94514
G1 X64.658 Y-5.072 E1.96861
G1 X64.948 Y-5.753 E2.01292
G1 X65.06 Y-5.999 E2.0291
G1 X66.138 Y-8.58 E2.19656
G1 X66.742 Y-9.957 E2.28658
G1 X66.889 Y-10.496 E2.32003
G1 X66.862 Y-10.891 E2.34373
G1 X66.726 Y-11.263 E2.36744
G1 X66.492 Y-11.582 E2.39113
G1 X66.177 Y-11.823 E2.41487
G1 X65.813 Y-11.965 E2.43826
G1 X65.512 Y-11.999 E2.4564
G1 X-67.036 Y-11.999 E10.39181
G1 X-67.399 Y-11.947 E10.41377
G1 X-67.759 Y-11.784 E10.43743
G1 X-68.061 Y-11.527 E10.46117
G1 X-68.278 Y-11.195 E10.48491
G1 X-68.394 Y-10.817 E10.50858
G1 X-68.4 Y-10.422 E10.53224
G1 X-68.308 Y-10.081 E10.55338
G1 X-67.565 Y-8.316 E10.66803
G1 X-67.467 Y-8.127 E10.68077
G1 X-67.225 Y-7.586 E10.71626
G1 X-67.107 Y-7.272 E10.73634
G1 X-66.302 Y-5.305 E10.86358
G1 X-66.136 Y-4.942 E10.88748
G1 X-64.881 Y-1.978 E11.08018
G1 X-64.758 Y-1.674 E11.09981
G1 X-64.544 Y-1.141 E11.1342
G1 X-61.457 Y6.196 E11.61074
G1 X-60.985 Y7.396 E11.68794
G1 X-60.542 Y8.419 E11.75469
G1 X-60.273 Y9.002 E11.79312
G1 X-60.052 Y9.571 E11.82967
G1 X-59.99 Y9.753 E11.84118
G1 X-59.426 Y11.072 E11.92706
G1 X-57.961 Y14.606 E12.1561
G1 X-54.294 Y23.385 E12.72569
G1 X-54.128 Y23.788 E12.75178
G1 X-53.942 Y24.106 E12.77384
G1 X-53.653 Y24.377 E12.79755
G1 X-53.296 Y24.56 E12.82157
G1 X-52.877 Y24.63 E12.847
G1 X51.329 Y24.631 E19.08563
G0 F7200 X53.695 Y44.591
G1 F1125 X-55.278 Y44.592 E25.60966
G1 X-55.877 Y44.568 E25.64555

Marlin_QQS_Pro_SL_Gen_3_Router_Base_Mount.gcode (3.7 MB)

Same thing. Prints ok. at the end gives me that screen shot error.

Thank you for the help.