How to set Z to 5mm manually?

Discussion about the arduino based g-code interpreter, grbl
Post Reply
flashonja
Posts: 37
Joined: Fri Dec 13, 2013 9:47 am
Location: Slovenia, Europe

How to set Z to 5mm manually?

Post by flashonja » Sat Dec 13, 2014 3:58 pm

Hey guys (and girls:),

I'm not sure if this is the right topic, but I couldn't find one dedicated to g-code.
I've recently installed a simple Z-touch probe, with grbl 0.9 we can finally easily set the Z origin without jogging! It works like a charm and I almost fell in love with it :))

The thing I was wondering was whether is it possible to set the Z value to something else except 0?
Let me explain...my touch probe is 5mm high and when the drill touches it its Z coordinate is Z=5mm.
Is there a g-code command that could set the Z to 5mm?

Was I clear enough?
What is your workflow to fix this?

Thank you,
matej
SO2 full kit + limit switches
Kress 1050 FME
Win 7 64bit

RobCee
Posts: 587
Joined: Wed Jan 08, 2014 11:33 am
Location: Birmingham, UK

Re: How to set Z to 5mm manually?

Post by RobCee » Sat Dec 13, 2014 4:14 pm

If my memory serves me, you can use G10 P1 L20 Z5 - change the P1 for the coordinate set you are using (P1=G54, P2=G55, etc)
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

flashonja
Posts: 37
Joined: Fri Dec 13, 2013 9:47 am
Location: Slovenia, Europe

Re: How to set Z to 5mm manually?

Post by flashonja » Sat Dec 13, 2014 8:15 pm

Thank you RobCee!
But can you (or someone else) elaborate a bit please? I'm more of a noobie as far g-code is in question.

cheers
m
SO2 full kit + limit switches
Kress 1050 FME
Win 7 64bit

RobCee
Posts: 587
Joined: Wed Jan 08, 2014 11:33 am
Location: Birmingham, UK

Re: How to set Z to 5mm manually?

Post by RobCee » Sat Dec 13, 2014 10:12 pm

This is how you set your user/work coordinate systems using gcode

For more info check out the Using the Work Coordinate Systems wiki here - look towards the bottom of that page

G10 P1 L20 Z5

G10 - set coordinate system
P1 - first definable coordinate system (G54)
L20 - use an offset value
Z5 - The current Z position is Z=5
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

flashonja
Posts: 37
Joined: Fri Dec 13, 2013 9:47 am
Location: Slovenia, Europe

Re: How to set Z to 5mm manually?

Post by flashonja » Sun Dec 14, 2014 11:18 am

Thanks I get it now!
cheers
m
SO2 full kit + limit switches
Kress 1050 FME
Win 7 64bit

Post Reply