Start GCode for full bed and priming

Start GCode for full bed and priming

Postby tr6coug » 2015-Dec-Sun-18-Dec

I have been using the metal simple with Cura for a few months and have noticed that I didn't have use of the full dimensions of the bed (152 x 152). Even though Cura had the correct bed dimensions, sometimes my prints would over run the bed and the belts would slip. I found that the G29 command to perform the 3 point bed level check was resetting the bed origin by about 20mm in both X & Y. To fix this I put the following command into my startup GCode right after the G29 command. This command resets the X & Y coords to the correct values after the 3rd bed level check.

G92 X132.4 Y20.

I also had to print parts with skirts to prime the print head so I added a priming routine to the startup GCode. The following will print a heavy bead around the perimeter of the bed. You can comment out the lines with ";" if you do not need all four lines.

;prime nozzle with 1-4 lines
;this extrudes a box around the perimeter of the print area
;Add or remove ";" from lines below to add/remove priming lines
M107
G1 F3000 E-.50000
G0 F4500 X0 Y0 Z0.300
G1 F900 X151 Y0 E23
G1 F900 X151 Y151 E46
G1 F900 X0 Y151 E69
G1 F900 X0 Y0.500 E92
G92 E0


So the full Startup GCode is :

Code: Select all
G28 X0 Y0 Z0         ;home
G92 E0               ;set extruder to 0
G29                  ;measure bed level with prox
G92 X132.4 Y20       ;correct the bed origin.  The G29 changes the bed 0,0 point so this corrects it.

;prime nozzle with 1-4 lines
;this extrudes a box around the perimeter of the print area
;Add or remove ";" from lines below to add/remove priming lines
M107 ; fan off
G1 F3000 E-.50000           ;backup extruder slightly
G0 F4500 X0 Y0 Z0.300       ;go to bed origin
G1 F900 X151 Y0 E23         ;draw front edge extrude a 151mm line
G1 F900 X151 Y151 E46       ;draw right edge
G1 F900 X0 Y151 E69         ;draw back edge
G1 F900 X0 Y0.500 E92       ;draw left edge close box
G92 E0                      ;reset extrusion length to 0


I hope this helps anyone else that has had the same problems.
  • 1

tr6coug
Waiting to connect to printer...
 
Posts: 2
Joined: 2015-Dec-Sun-17-Dec
Reputation: 1

Start GCode for full bed and priming

Sponsor

Sponsor
 

Re: Start GCode for full bed and priming

Postby cacb » 2015-Dec-Sat-05-Dec

Thanks, this is interesting. I have had this issue on my TODO list for a long time, but other things got in the way. I will this on my Simple Metal.
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 403
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 16

Re: Start GCode for full bed and priming

Postby cacb » 2016-Jan-Thu-13-Jan

cacb wrote:Thanks, this is interesting. I have had this issue on my TODO list for a long time, but other things got in the way. I will this on my Simple Metal.

I finally did this, highly recommended! It does fix the offset error introduced by G29, so after adding this to the startup code you have access to the whole bed area.

I also added a tweaked version of the startup code to "draw" a 150mm box (it means I added a small margin) around the bed area. It so happens that the 4 box corners land exactly on the 4 small holes in the standard PB heated bed.

startup_w_margin.jpg


My KISSlicer prefix code now looks like below. Notice I lift the hotend before moving to not scratch the bed. This also causes the final "string" in the lower left corner to extend upwards. A nice handle for removing the box later 8-)
Code: Select all
M140 S<BED> ; set bed temp and return immediately
G21             ;metric values
G90             ;absolute positioning
M82             ;set extruder to absolute mode
M107            ;start with the fan off
G28 X0 Y0       ;move X/Y to min endstops
G28 Z0          ;move Z to min endstops
G29             ;Run the auto bed leveling
G92 X132.4 Y20  ;correct the bed origin.  The G29 changes the bed 0,0 point so this corrects it.
G1 Z+10.0       ; Lift hotend 10 mm
M104 S<TEMP>; set hot end temperature and return
M190 S<BED> ; wait for bed temp
;prime nozzle with 1-4 lines
;this extrudes a 150x150mm box around the perimeter of the print area
; Ideally you want low X=0 and low Y=0 but here we add a
; margin of a couple of mm on all sides and offset the whole box +1mm in x
; This causes the box corners to coincide with the 4 holes in the PB heated bed.
G92 E0                      ; Reset extruder pos
M107                        ; fan off
G1 F3000 E-.10000           ;backup extruder slightly
G0 F4500 X3 Y2 Z0.300       ;go to bed origin, offset 2+1mm in x and 2mm in y
G1 F900 X150 Y2   E26       ;draw front edge extrude a 151=150mm line
G1 F900 X150 Y150 E59       ;draw right edge
G1 F900 X3   Y150 E86       ;draw back edge
G1 F900 X3   Y2   E98       ;draw left edge close box
G1 Z+10.0                   ; Lift hotend 10 mm
G92 E0                      ; Reset extruder pos
G1 F3000 E-.10000           ;backup extruder slightly
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 403
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 16

Re: Start GCode for full bed and priming

Postby Mooselake » 2016-Jan-Thu-15-Jan

You could use a skirt to prime the extruder, running around the edge of the bed could take a fair amount of time. I usually tell it two layers or at least 10mm, but I use slic3r where these are options. I don't have a probe, my bed size is different, and slic3r supports gcode variables. YMMV.

Kirk

FWIW:
Code: Select all
G28 X0 Y0; home XY first
G28 Z0 ; then 0
M106 S0   ; turn off fan
M104 S[first_layer_temperature]
G0 X180 Y10 Z40  F5000
G92 E0
M109     ; wait until extruder up to temp
G1 E10 F1000  ; prime extruder
G1 E9.5  ; retract a bit
G4 P2000 ; time to grab extruded filament
G1 X100 Y50 Z1 E10 F5000 ; move head towards center, away from dumped filament
G92 E0
;
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
User avatar
Mooselake
My next printer is...
 
Posts: 3509
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 170

Re: Start GCode for full bed and priming

Postby cacb » 2016-Jan-Thu-15-Jan

Mooselake wrote:You could use a skirt to prime the extruder, running around the edge of the bed could take a fair amount of time. I usually tell it two layers or at least 10mm, but I use slic3r where the


As you can see I did both in that example :P This served 2 purposes. The first was to confirm that I actually had access to the whole bed, that is more like a one-off of course. the second was to use it for priming. If I find it is too much, it is easy to comment out one or more of the edges in the prefix code. It really does not take very much time, especially if it reduces the failure rate.
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 403
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 16

Re: Start GCode for full bed and priming

Postby tr6coug » 2017-Jan-Sun-01-Jan

Since I posted the original g-code above I have upgraded my Printrbot with the extended X dimension heated bed option. Part of the upgrade was to update the Printrbot firmware. This firmware fixed the offset problem, so the G92 command to correct the bed origin is no longer needed. So my startup code is much simpler now.

Code: Select all
G28 X0 Y0 Z0
G92 E0     ;set extruder to 0
G29     ;measure bed level with prox
;prime nozzle with 1-4 lines
;this extrudes a box around the perimeter of the print area
;Remove ";" from lines below to add priming lines
M107     ; fan off
G1 F3000 E-.50000     ; backup extruder slightly
G0 F4500 X248 Y0 Z0.25     ; go to bed max x/y
;G1 F900 X248 Y0 E23     ;draw left edge extrude a 151mm line
G1 F900 X0 Y0 E55     ;draw front edge with heavy extrusion to prime nozzle
G92 E0               ;reset extrusion length to 0
  • 0

tr6coug
Waiting to connect to printer...
 
Posts: 2
Joined: 2015-Dec-Sun-17-Dec
Reputation: 1


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest