version 2106 probe macro
Posted: Tue Feb 12, 2019 7:29 pm
hello,
i just updated to 2106 which worked fine. there is just one issue with my z probe macro which worked fine in 2049. between the g31 moves it does not move the z axis up 2mm. here is the macro:
//Simple Probe for Zero
//This routine probes in negative Z at the current XY location
//Z offsets for G54 to G59 are then re-written to the new Z0
double ZRetractHeight = 2; //Height above Z0 to which probe will retract
double CoarseRate = 200; //Feedrate for initial probing
double FineRate = 100; //Feedrate for fine probing
double Zmin = -20; //maximum probing distance
double PlateThickness = 32.44; //thickness of the probing plate
double MaterialOffset = 0; //compensation for part thickness
double CombinedOffset = PlateThickness - MaterialOffset; //really for use later when PlateThickness and MaterialOffset are DROs
exec.Code("G91 G31 Z" + Zmin + "F" + CoarseRate); // Probe Z quickly to get rough height
while(exec.IsMoving()){}
exec.Wait(200);
exec.Code ("G00 Z" + 2 ); // Retract 2mm above the plate /////////////////////////////////////////////////////////////////////////here it is not working any more
while(exec.IsMoving()){}
exec.Wait(100);
exec.Code("G31 Z" + Zmin + "F" + FineRate); // Probe Z slowly for better resolution
while(exec.IsMoving()){}
exec.Wait(200);
exec.mainform.sumoffsetcontrol1.G54.newCzinput(CombinedOffset); // Set G54 to new Zzero
exec.mainform.sumoffsetcontrol1.G55.newCzinput(CombinedOffset); // Set G55 to new Zzero
exec.mainform.sumoffsetcontrol1.G56.newCzinput(CombinedOffset); // Set G56 to new Zzero
exec.mainform.sumoffsetcontrol1.G57.newCzinput(CombinedOffset); // Set G57 to new Zzero
exec.mainform.sumoffsetcontrol1.G58.newCzinput(CombinedOffset); // Set G58 to new Zzero
exec.mainform.sumoffsetcontrol1.G59.newCzinput(CombinedOffset); // Set G59 to new Zzero
exec.Code ("G00 Z" + ZRetractHeight); //Retract Z axis
while(exec.IsMoving()){}
exec.Wait(200);
exec.Code ("G90");
thanks for help,
michael
i just updated to 2106 which worked fine. there is just one issue with my z probe macro which worked fine in 2049. between the g31 moves it does not move the z axis up 2mm. here is the macro:
//Simple Probe for Zero
//This routine probes in negative Z at the current XY location
//Z offsets for G54 to G59 are then re-written to the new Z0
double ZRetractHeight = 2; //Height above Z0 to which probe will retract
double CoarseRate = 200; //Feedrate for initial probing
double FineRate = 100; //Feedrate for fine probing
double Zmin = -20; //maximum probing distance
double PlateThickness = 32.44; //thickness of the probing plate
double MaterialOffset = 0; //compensation for part thickness
double CombinedOffset = PlateThickness - MaterialOffset; //really for use later when PlateThickness and MaterialOffset are DROs
exec.Code("G91 G31 Z" + Zmin + "F" + CoarseRate); // Probe Z quickly to get rough height
while(exec.IsMoving()){}
exec.Wait(200);
exec.Code ("G00 Z" + 2 ); // Retract 2mm above the plate /////////////////////////////////////////////////////////////////////////here it is not working any more
while(exec.IsMoving()){}
exec.Wait(100);
exec.Code("G31 Z" + Zmin + "F" + FineRate); // Probe Z slowly for better resolution
while(exec.IsMoving()){}
exec.Wait(200);
exec.mainform.sumoffsetcontrol1.G54.newCzinput(CombinedOffset); // Set G54 to new Zzero
exec.mainform.sumoffsetcontrol1.G55.newCzinput(CombinedOffset); // Set G55 to new Zzero
exec.mainform.sumoffsetcontrol1.G56.newCzinput(CombinedOffset); // Set G56 to new Zzero
exec.mainform.sumoffsetcontrol1.G57.newCzinput(CombinedOffset); // Set G57 to new Zzero
exec.mainform.sumoffsetcontrol1.G58.newCzinput(CombinedOffset); // Set G58 to new Zzero
exec.mainform.sumoffsetcontrol1.G59.newCzinput(CombinedOffset); // Set G59 to new Zzero
exec.Code ("G00 Z" + ZRetractHeight); //Retract Z axis
while(exec.IsMoving()){}
exec.Wait(200);
exec.Code ("G90");
thanks for help,
michael