Change in macro behavior in 1.2031?
Posted: Wed Jan 11, 2017 2:57 am
I wrote most of my probing macros a few version back, and they've been working fine.
While doing some testing in 1.2031, I noticed that the feedrate commands were being ignored. Here's how I had it written:
I couldn't go back to an older version to test, because my screen no longer works in the older versions. ( I suspect it's due to the blinking LEDS?)
So, I added the feedrate to the probe move for a quick fix.
Did something change?
And, on a related note, when do we need to use while(exec.IsMoving()){} or exec.wait(200)?
At the end of my macros, this block of code ran fine:
I also found that adding exec.wait to the original code also got it working:
While doing some testing in 1.2031, I noticed that the feedrate commands were being ignored. Here's how I had it written:
- Code: Select all
YStart = AS3.Getfielddouble(227); // Current Y axis Work Coordinate
ProbeL = YStart + Dmax; // Probe Length
exec.Code("F" + Frate1); // Set First Probe Feedrate
exec.AddStatusmessage(" ");
exec.AddStatusmessage("Probing for Y+ Position...");
exec.Code("G31 Y" + ProbeL); // Do First Probe move
while(exec.IsMoving()){}
Yhit = exec.Getvar(5062); // Read the touch point
Y1 = Yhit + ProbeD/2 + PlateOff; // Tool Center Position at Y=0
if (Frate2 != 0)
{
exec.Code("G0 Y" + (Yhit - Retract)); // Back away from edge
while(exec.IsMoving()){}
exec.AddStatusmessage("Slow Probing for Y+ Position...");
exec.Code("F" + Frate2); // Set Slow Probe Feedrate
exec.Code("G31 Y" + ProbeL); // Do Slow Probe move
while(exec.IsMoving()){}
Yhit = exec.Getvar(5062); // Read the touch point
Y1 = Yhit + ProbeD/2 + PlateOff; // Tool Center Position at Y=0
} // End Slow Probing
I couldn't go back to an older version to test, because my screen no longer works in the older versions. ( I suspect it's due to the blinking LEDS?)
So, I added the feedrate to the probe move for a quick fix.
- Code: Select all
exec.Code("G31 Y" + ProbeL + " F" + Frate2); // Do Slow Probe move
while(exec.IsMoving()){}
Did something change?
And, on a related note, when do we need to use while(exec.IsMoving()){} or exec.wait(200)?
At the end of my macros, this block of code ran fine:
- Code: Select all
exec.Code("F" + CurrentFeed); // Set Feedrate back to previous
if (originaldistancemode == 91)
{
exec.Code("G91");
}
if (originalmodalmode == 1)
{
exec.Code("G1");
}
I also found that adding exec.wait to the original code also got it working:
- Code: Select all
exec.Code("F" + Frate2); // Set Slow Probe Feedrate
exec.Wait(200);