Jump to content
Ultimaker Community of 3D Printing Experts
Sign in to follow this  

Set z=0 at a different point (printing on top of something else)

Recommended Posts

Hi everyone!

I have both a Ultimaker Original and a Ultimaker 2 available and I'd like to be able to set the z=0 at any point I want as I'm trying to print on top of an object lying on the printing bed (build plate). I'm pretty sure this can be done by editing the gcode in Cura but I can't seem to make it work.

If anyone has any advice or pointers for me to try I'll be very grateful.

Thank you.


Share this post

Link to post
Share on other sites

Quick and dirty: You can press your endstop early, and finetune by turning the Z spindle by hand.

Slow and semi dirty: edit your Gcode so that every Z value is your desired height higher.

Perhaps possible and quite ok: pause print at the start, tune Z height and resume print(I believe this requires some different firmware, like the one with the babysteps)

Just three options that popped into my head


Share this post

Link to post
Share on other sites

Thank you for your response.

Your first solution: Is that while leveling the build plate? I tried doing that and got it level to where I wanted it but then when I wanted to print it just ignored it and tried to go all the way up to its usual zero. This was on the Ultimaker 2. I haven't tried it yet on the Ultimaker Original.

How do I avoid my plate slamming into the nozzle when it starts printing?


Share this post

Link to post
Share on other sites

if you know the exact hight of the plate you can write some start code that will firstly move the head down then set that hight as the home position and then everything else will start from there. you can move the z-stage by using G1 Zxx.x and then using G92 Z0.0 to set that as zero.

please do keep your finger near the off switch. my G-code is a little rusty :p

you can check here: http://reprap.org/wiki/G-code


Share this post

Link to post
Share on other sites

;Sliced at: {day} {date} {time}

;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}

;Print time: {print_time}

;Filament used: {filament_amount}m {filament_weight}g

;Filament cost: {filament_cost}

;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line

;M109 S{print_temperature} ;Uncomment to add your own temperature line

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


G1 Z16

G92 Z0


G1 Z15.0 F{travel_speed} ;move the platform down 15mm

G92 E0 ;zero the extruded length

G1 F200 E3 ;extrude 3mm of feed stock

G92 E0 ;zero the extruded length again

G1 F{travel_speed}

M117 Printing... ;Put printing message on LCD screen



I had this as my start gcode because I wanted the platform 16 mm lower, but the printer started printing something like 8 cm above the platform.

Confuses me a lot..


Share this post

Link to post
Share on other sites

I've used G92 for many things. Maybe I never did G92 on the UM2, but that's hard to believe. Possible though.

Anyway Martijn's solution is the better solution. You can play with it using pronterface, or just the Cura pronterface interface and send the commands manually.

For example:

G0 Z10

moves to 10mm off the bed

G92 Z0

Tells Marlin that this is the new Z=0

G0 Z1

Should go 1mm higher

G0 Z0

Should go back to the new z=0 location (10mm up).

G0 X100 Y100 Z0

Should go to center of platform at the new z=0 spot.


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
Sign in to follow this  

  • Our picks

    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies

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!