file Frage Repeatability of a probe ...

Mehr
29 Aug 2018 09:40 #54525 von WalterSKW
Repeatability of a probe ... wurde erstellt von WalterSKW
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 (MeasuredZ<MinimumZ) MinimumZ=MeasuredZ; 	// New minimum value ?
	if (MeasuredZ>MaximumZ) 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!

Dieser Beitrag enthält einen Anhang.
Bitte anmelden (oder registrieren) um ihn zu sehen.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Powered by Kunena Forum

© 2024 STEPCRAFT GmbH & Co. KG

Wir benutzen Cookies

Wir nutzen Cookies auf unserer Website. Einige von ihnen sind essenziell für den Betrieb der Seite, während andere uns helfen, diese Website und die Nutzererfahrung zu verbessern (Tracking Cookies). Sie können selbst entscheiden, ob Sie die Cookies zulassen möchten. Bitte beachten Sie, dass bei einer Ablehnung womöglich nicht mehr alle Funktionalitäten der Seite zur Verfügung stehen.