file Question Repeatability of a probe ...

  • WalterSKW
  • WalterSKW's Avatar Topic Author
  • Offline
  • Forum Nutzer
  • Forum Nutzer
More
29 Aug 2018 09:40 #54525 by WalterSKW
Repeatability of a probe ... was created by 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!

This message has an attachment file.
Please log in or register to see it.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

© 2022 STEPCRAFT GmbH & Co. KG

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.