I'm writing a macro that probes for the center of an square/circle. Part of the macro is finding Y0 (min) and Y1(max) so it can get to the exact center Yc = (Y0 + Y1)/2. At the end of the macro, it sets zero the X-Y coordinate at (Xc,Yc).
If I run this macro repeatedly in one place (a few times), I will get to a case when Y0 = negative Y1 (according to the status output because it already at center) but the Yc = (Y0+Y1)/2 will be something very small/very huge, so the machine would crash on the next move.
My guess is that the result from (Y0+Y1) isn't quite zero but something extremely small. The math error thus is due to number overflow and a pretty dangerous one (sending my cnc crashing badly).
Attached is the macro. I'll post the screen shot of the status output later.