Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return to Zero not considering limits when Z-axis reversed #2303

Open
PopcornAWH opened this issue Aug 31, 2023 · 2 comments
Open

Return to Zero not considering limits when Z-axis reversed #2303

PopcornAWH opened this issue Aug 31, 2023 · 2 comments

Comments

@PopcornAWH
Copy link

Version

2.0.20

Hardware / Firmware

GRBL 1.1

What happened

I might be doing something wrong, but I encountered this:

After Homing, when machine is at X0Y0Z0, if you press return to zero, it causes a limit-alarm because it wants to move to the safety height set in options. The safety height can only be set >1 (default 5).

I know returning to Zero right after homing is an unusual scenario, but consider POS X100Y100Z-4, it still would cause a limit-alarm with default safety height.

Having the safety height is a good feature, but it would be nice if it considered the limits.

Verbose output (excerpt):

Grbl 1.1f ['$' for help]
Grbl for ARM32
Version:ARM32 V2.6
$0 = 10 (step pulse,usec)
$1 = 25 (step idle delay,msec)
$2 = 0 (stepport invert mask)
$3 = 4 (dirport invert mask)
$4 = 0 (stepenable invert,bool)
$5 = 1 (lims pin invert,bool)
$6 = 1 (probe pin invert,bool)

$H

ok
<Idle|WPos:0.000,0.000,0.000,0.000|Bf:35,254|FS:0,0|Pn:RHS|WCO:0.000,0.000,0.000,0.000>
<Idle|WPos:0.000,0.000,0.000,0.000|Bf:35,254|FS:0,0|Pn:RHS|Ov:100,100,100>
<Idle|WPos:0.000,0.000,0.000,0.000|Bf:35,254|FS:0,0|Pn:RHS>

G21G90 G0Z1 // It wants to go to Z1, but my Z is inverted: $3 = 4 (dirport invert mask)
G90 G0 X0 Y0
G90 G0 Z0

ok
<Run|WPos:0.000,0.000,0.211,0.000|Bf:33,254|FS:228,0|Pn:RHS>

[MSG:Check Limits]
Error while processing response : An unexpected command was completed by the controller.
An unexpected error was detected: (ALARM:3) Reset while in motion. Machine position is likely lost due to sudden halt. Re-homing is highly recommended.
[MSG:Check Limits]
Grbl 1.1f ['$' for help]
Grbl 1.1f ['$' for help]
Grbl for ARM32
Version:ARM32 V2.6

Options

How to reproduce

Invert Z-axis, set safety height to 5, move to POS X100Y100Z-4, press Return to Zero.

Operating System

WIN10 22H2

Anything else

No response

@breiler
Copy link
Collaborator

breiler commented Aug 31, 2023

Thanks for the feedback.

The first fix might be to make it possible to set safety height to zero - basically to disable it.

To fix this we need to handle another edge case where some controllers work in positive machine coordinate space which puts the machine zero at lower front left corner. It might be solvable due to this #2301 (comment) but it will require some work.

@PopcornAWH
Copy link
Author

PopcornAWH commented Aug 31, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants