grblHAL / core

grblHAL core code and master Wiki
Other
320 stars 84 forks source link

Question: homing with X and y auto squaring #209

Closed matthiasng closed 1 year ago

matthiasng commented 1 year ago

https://github.com/grblHAL/core/blob/893f0de66ad671d207e3ef2466327815772a1ca1/machine_limits.c#L492

The function noted above says it only can home one auto squared axis at a time. $H on the other side always tries to home all axis. This means if I have an X and y axis with auto squaring enabled there is no way I can use $H for homing. Is there any particular reason why the function does not support it ?

Furthermore I'm also confused about the return Boolean return value. It actually returns false in this case, but the calling function (mc_homing_cycle) doesn't set any alarms. This means, the controller is only homing Z, stops then and sets the status of all axis to homes (which seems like a bug to me).

terjeio commented 1 year ago

$H on the other side always tries to home all axis.

Yes, but according to the homing passes defined by $44-46, each pass can home a single axis if so configured. If a pass fail the sequence is exited.

This means, the controller is only homing Z, stops then and sets the status of all axis to homes (which seems like a bug to me).

Yep - it seems like it does if you try to home X and Y at the same time and both are auto-squared. An alarm should be raised? Or returning an error is better?

matthiasng commented 1 year ago

Ty for the clarification. I must have overlooked the homing cycle setting.

I think the way you have done it now is perfect. This way users will get feedback when their configration is wrong (like mine) 👍.