Possible G-Code?

Get answers & advice for all of your 3D printing & Free Software needs here!
Post Reply
mhristau
Posts: 45
Joined: Sun Jun 24, 2018 3:18 pm
Contact:

Possible G-Code?

Post by mhristau » Thu Jun 27, 2019 3:14 pm

Possible to compose G-Code routine that positions hot-end in center of build plate at 1st layer printing height then stop? (This to facilitate fine tuning of z-height.)

;This G-Code has been generated specifically for the LulzBot Mini 2
;
M75 ; Start GLCD Print Timer
G26 ; clear potential 'probe fail' condition
G21 ; set units to Millimetres
M107 ; disable fans
G90 ; absolute positioning
M82 ; set extruder to absolute mode
G92 E0 ; set extruder position to 0
M140 S{material_bed_temperature} ; start bed heating up
G0 X0 Y187 Z156 F200 ; move away from endstops
M117 Mini 2 Wiping... ; progress indicator message on LCD
M109 R{material_soften_temperature} ; soften filament before retraction
G1 E-15 F75 ; retract filament
M109 R{material_wipe_temperature} ; wait for extruder to reach wiping temp
G1 X45 Y176 F11520 ; move above wiper pad
G1 Z0 F1200 ; push nozzle into wiper
;
; Wiping routine
;
G1 X115 Y176 Z-0.5 F1000 ; wiping
G1 Z10 ; raise extruder
G28 X0 Y0 ; home X and Y
M109 R{material_probe_temperature} ; wait for extruder to reach probe temp
M204 S300 ; set probing acceleration
G29 ; start auto-leveling sequence
M425 Z ; use measured Z backlash for compensation
M425 Z F0 ; turn off measured Z backlash compensation. (if activated in the quality settings, this command will automatically be ignored)
M204 S2000 ; restore standard acceleration
G1 X5 Y15 Z10 F5000 ; move up off last probe point
G4 S1 ; pause
M400 ; wait for moves to finish
;———
; code to position hot-end in center of build plate at first layer printing height and stop
;———
;Delete rest:

JoeBowler300
Posts: 91
Joined: Thu Apr 28, 2016 12:20 am

Re: Possible G-Code?

Post by JoeBowler300 » Thu Jun 27, 2019 10:16 pm

You can try checking the option "Origin at center" under Machine Settings
Center.JPG
Center.JPG (33.72 KiB) Viewed 240 times
If that don't work you can try this Gcode:
G90 X80 Y80

Then auto home with G28

b-morgan
Posts: 287
Joined: Fri Aug 11, 2017 8:53 am

Re: Possible G-Code?

Post by b-morgan » Sat Jun 29, 2019 4:20 pm

JoeBowler300 wrote:
Thu Jun 27, 2019 10:16 pm
You can try checking the option "Origin at center" under Machine Settings
Don't do that. The G-Code you want to insert is:

Code: Select all

G0 X80 Y80 ; Move to center of the bed (Z should be at 10)
G0 Z0.5 F200; Move Z down (slowly) close to the bed (adjust Z lower if you dare)
This assumes that the G-Code you posted is the standard LulzBot Mini 2 start code and that it contains a G28 and a G29 to zero the axis and auto level the bed. The "G0 X0 Y187 Z156 F200 ; move away from the endstops" is a bit suspicious, I don't understand the Z value.

mhristau
Posts: 45
Joined: Sun Jun 24, 2018 3:18 pm
Contact:

Re: Possible G-Code?

Post by mhristau » Sun Jun 30, 2019 3:46 pm

Thanks for suggestions. Thinking this will help when switching between tool heads. However, use at your own risk cause I barely know what I'm doing here! :?

I added another printer titled Print Height Check, and through Machine settings deleted Stop Code and replaced the last few lines of the Start Code with:

Code: Select all

M400 ; wait for moves to finish
;----
G0 X81 Y0 ; Move to front center of the bed (Z should be at 10)
G0 Z0.0 F200 ; Move Z down (slowly) to printing height
M400 ; wait for moves to finish
END.GCODE
;----
;M117 Heating... ; progress indicator message on LCD
;M109 R{material_print_temperature_layer_0} ; wait for extruder to reach initial printing temp
;M190 S{material_bed_temperature_layer_0} ; wait for bed to reach printing temp
;G1 Z2 E0 F75 ; prime tiny bit of filment into the nozzle
;M117 Mini 2 Printing... ; progress indicator message on LCD
Last edited by mhristau on Sun Jun 30, 2019 4:04 pm, edited 1 time in total.

b-morgan
Posts: 287
Joined: Fri Aug 11, 2017 8:53 am

Re: Possible G-Code?

Post by b-morgan » Sun Jun 30, 2019 3:53 pm

I'd be careful with using Z0.0 because if anything is a bit "out of whack" you run the danger of putting a dimple in the bed.

Post Reply