Zeroing out machine position

When I zero out the machine coordinates it behaves in a way that I don’t expect. I was running a G-Code program that drills four holes. The center is at (0,0). I zeroed out the bit in the center of the workpiece. When I run the program it drives the end mill straight down into the workpiece. You can see in the screenshot that the Z position is -37.17 at the center. There is not supposed to be a hole in the center, only at the four positions.

The program runs as expected if it is run after the controller boots up, but if the coordinates are manually zeroed it does not.

What am I doing wrong?

What CAM program? What post processor?
Can you share your gcode?

I’m using Fusion 360 with a GRBL post-processor. The gcode has run ok previously, so I don’t think it’s related to the gcode file.

The diagnostic file has a bunch of soft limit alarms which may be related to the issue.

Recent Alarms
2/18/2024, 8:03:45 PM
Reset while in motion. Machine position is likely lost due to sudden halt. Re-homing is highly
recommended.
Input:G20
2/19/2024, 6:21:47 PM
Reset while in motion. Machine position is likely lost due to sudden halt. Re-homing is highly
recommended.
Input:G21 ; Set units to mm
2/19/2024, 6:34:33 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
Alarm may be safely unlocked.
Input:G1 X96.7359 Y181.3263 F1200
2/19/2024, 6:34:34 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
Alarm may be safely unlocked.
Input:G1 X96.6694 Y181.3220
2/19/2024, 6:34:34 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
Alarm may be safely unlocked.
Input:G1 X96.6023 Y181.3146
2/19/2024, 6:34:35 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
Alarm may be safely unlocked.
Input:G1 X96.5350 Y181.3039
2/19/2024, 6:34:35 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
Alarm may be safely unlocked.
Input:G1 X96.4669 Y181.2902
2/19/2024, 6:34:36 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
Alarm may be safely unlocked.
Input:G1 X96.3981 Y181.2732
2/19/2024, 6:34:36 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
Alarm may be safely unlocked.
Input:G1 X96.3285 Y181.2529
2/19/2024, 6:34:44 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
Alarm may be safely unlocked.
Input:G1 X96.7359 Y181.3263 F1200
2/19/2024, 6:34:44 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
Alarm may be safely unlocked.
Input:G1 X96.6694 Y181.3220
2/19/2024, 6:34:45 PM
Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained.
3 /

There might be a clue in the gcode if you can share it.

Do you have limit switches? It appears no.
How are you setting your work zeroes?
Are you using G28 safe retracts?

@Ryanwallace @NeilFerreri All those alarms were well over a month ago. I would think that there would be more recent alarms if they relate to your current issue.

Thanks @gwilki and @NeilFerreri

I don’t have the ability to upload files here as my account is new, but the gcode is below:

(Top Lid Drill 1)
(T7 D=8 CR=0 - ZMIN=-25.912 - flat end mill)
G90 G94
G17
G21
G28 G91 Z0
G90

(Drill2)
T7
S5000 M3
G17 G90 G94
G54
M8
G0 X96.665 Y-74.462
Z15
G0 Z5
Z-20.912
G1 Z-25.912 F30.3
G0 Z5
Y74.462
Z-20.912
G1 Z-25.912 F30.3
G0 Z5
X-96.665
Z-20.912
G1 Z-25.912 F30.3
G0 Z5
Y-74.462
Z-20.912
G1 Z-25.912 F30.3
G0 Z5
Z15

M9
G28 G91 Z0
G90
G28 G91 X0 Y0
G90
M5
M30

image

This is returning the machine to machine (not workspace) Z zero and is the reason you’re experiencing what you are.

You need to check which post processor you’re using to prevent this or remove the line.

3 Likes

ok, thank you. That would certainly cause that issue.

@Ryanwallace This is why I asked about G28. This seems to be a common issue here lately (Link, Link, Link)with our new Fusion users.

When you post, you can select to use your clearance height rather than G28.

1 Like

@NeilFerreri
Yes, you were right. That was the issue.

2 posts were split to a new topic: Z movement issue