I power up the system, home all, then when I press safe Z, Uccnc will display an error about soft limits in Z being triggered.
At this point my homing is done and the MC is 0, the safe z in the settings is also 0.
I think it may be some error in the math that happens within the M216 here:
- Code: Select all
// Go to safeZ
exec.Getactualoffset();
double safeZ = exec.mainform.UCsetup.UCset.Generalsettings.SafeZ;
double Softlimitsrelative = exec.mainform.UCsetup.UCset.Axis[2].UC100axis.SoftLimitP - exec.ofc.Wzval - exec.ofc.TOZval - exec.ofc.G92zval;
if (exec.mainform.UCsetup.UCset.Generalsettings.Enablesoftlimits)
{
if (safeZ > Softlimitsrelative)
{
safeZ = Softlimitsrelative;
DialogResult result = MessageBox.Show(exec.mainform.MSG.Message[45], "Confirmation", MessageBoxButtons.YesNo);
if (result == DialogResult.No)
{
return;
}
}
}
Is there any chance that the homing sequence or this code is rounding to zero causing the error?