Hi. I'm relatively new to cnc and completely new to writing macros and C#. Hope someone can help.
I wanted to write a custom probing macro to find the centre of a round bar. The probing screen in UCCNC appears to have the
capability but I couldn't get my head round it and my machine doesn't do homing. I don't understand why the following code doesn't
work. The G1 code starts OK and the probe LED lights up - the probe is working. What I expected it to do was to sit in the while loop until the
probe LED came on. I need to add some timeout code but there's no point if it doesn't stop when I know it's made contact. Running it manually in macro
M1000 not replacing M31, the machine moves.
exec.Code("G1F" + FastRate + " X" + MaxTravel);
//Wait til probe is touched
while (!AS3.GetLED(37)){};
exec.Stop();
TIA Gordon