Run the following code from a button, and the second probe move does not occur, and Var #5063 is set to 0.
But if you change the second feedrate to 1 or greater, it runs fine. (Change F0.5 to F1)
Using Version 1.2029
UC300ETH with 5LPT motherboard.
- Code: Select all
exec.Code("G90");
while(exec.IsMoving()){}
exec.Code("F15"); // Set First Probe Feedrate
exec.Code("G31 Z-6"); // Do First Probe move
while(exec.IsMoving()){}
double Znew = exec.Getvar(5063); // Read the touch point
exec.Code("G0 Z" + (Znew + .1)); // Retract
while(exec.IsMoving()){}
exec.Code("F0.5"); // Set Second Probe Feedrate
Znew = (AS3.Getfielddouble(228) - 1.25);
exec.Code("G31 Z" + Znew); // Do Second Probe move
while(exec.IsMoving()){}
Znew = exec.Getvar(5063); // Read the touch point
exec.Code("G0 Z" + Znew); // Move back to touch point in case of overshoot
while(exec.IsMoving()){}