Repeatability of a ...
 
Benachrichtigungen
Alles löschen

Repeatability of a probe ...

1 Beiträge
1 Benutzer
0 Reactions
2,958 Ansichten
(@walterskw)
Beiträge: 5
Active Member
Themenstarter
 

Hupsakee : this is my first contribution ...

I'm new to CNC stuff but very experienced in 3D printing and I saw the CNC as a logical step. I'm always thinking about improvements and making things by myself.

So one of the first things I wanted to do after finishing my Stepcraft 600 is checking different options for a Z-probe.
I made a touchplate as that was the easiest thing to do, but ... forgetting to connect the drill is starting for potential disaster. And I did forget that quite often.
So I searched my collection of potential switches to be build into a probe and one of the first questions that arises is : "What about repeatability??"
So I wrote a macro to check this:

// -----
// Purpose : Check probe for repeatability
// Author : WHu
// -----
// Date 		Version	Remarks
// 20180825		1.0		Base
// -----
//
// 
double Zmin = -100; 		//Max.Z depth
double Feedrate = 200; 		//Feedrate for probing 
double retractheight = 20; 	//The retract height 
double MinimumZ= 1000000;	// Min measured Z height
double MaximumZ= -1000000;	// Max measured Z Height
double AverageZ= 0;			// Average Z height
double MaxDev=0;			// Max registered deviation
double Deviation=0;			// intermediate value, actual deviation
double MeasuredZ=0; 		// Actual measured Z height
int i=0;					// loop counter
//
for(i=0; i<10;i++)
{
	exec.Code("G31 Z" + Zmin + "F" + Feedrate); 	// Start probing 
	while(exec.IsMoving()){} 						// Wait until movement stopped 
	exec.Wait(1000); 								// Safety wait for the UC100 syncronisation 
	MeasuredZ=exec.GetZmachpos();					// read actual Z-height
	AverageZ= AverageZ + MeasuredZ;					// Add to average
	if (MeasuredZMaximumZ) MaximumZ=MeasuredZ; 	// New maximum value ?
	Deviation= Math.Abs(AverageZ/(i+1) - MeasuredZ);
	if (Deviation > MaxDev) MaxDev = Deviation;
	// Uncomment line below to show the intermediate value
	//MessageBox.Show("Probe[" + (i+1) + "]: "+ MeasuredZ+"nMin value :"+MinimumZ+"nMax value :"+MaximumZ+"nMax Deviation :"+MaxDev); 
	
	double Zup = exec.GetZmachpos() + retractheight;//Calculate the new coordinate for the retract of Z axis
	exec.Code("G00 G53 Z" + Zup); 					//Retract the Z-axis 
	while(exec.IsMoving()){} 						// Wait until movement stopped  
} 
if(MaxDev<0.001) MaxDev=0;	// Absurd to show these values. Even 0.001 is just a gimmick for the Stepcraft ...
MessageBox.Show("Average value :"+AverageZ/10+"nMin value :"+MinimumZ+"nMax value :"+MaximumZ+"nMax Deviation :"+MaxDev);

I checked the touchplate and deviation is between 0.01 and 0.02
I checked these cheap switches used in a small keyboard : same result
I had some swiss made microswitches : always spot on. 10 times in a row identical values.

So if you want to check your probe or do some experiments : go ahead!

 
Veröffentlicht : 29/08/2018 10:40 am
Teilen: