Hi eng101,
Can you describe in detail how and what strategy you would wish to use to do the probing?
Do you have your probe interfaced to KFLOP?
We don't have plans to add G38.x but you should be able to do the equivalent with custom MCodes.
See this Thread (you might ask if JoeKumanchik is willing to share his code):
https://www.cnczone.com/forums/dynom...ml#post1999582
Here is a basic ProbeDirection.c example:
Code:
#include "KMotionDef.h"
// For basic KMotionCNC Probing configure KMotionCNC to call this C Program
// with an MCode and 3 parameters P Q R passed in variables 50,51,52 to
// specify the X Y Z Probe directions speeds
//
// Modify this program for the input bit you are using for your probe. As
// written the program keeps moving until the bit goes high. If the polarity
// of your probe is opposit this then remove the NOT Symbol '!' applied to the
// ReadBit result.
//
// For Example:
//
// M100 = Exec/Wait/Sync Thread 2 Var 50 <>\C programs\ProbeDirection.c
//
// Then to probe in the X direction at 100 counts/sec use GCode as:
//
// M100 P100 Q0 R0
//
// Then to probe in the Y direction at 50 counts/sec use GCode as:
//
// M100 P0 Q50 R0
//
//
main()
{
Jog(0,*(float *)&persist.UserData[50]); // move in the velocites specified
Jog(1,*(float *)&persist.UserData[51]);
Jog(2,*(float *)&persist.UserData[52]);
// printf("X Y Z Speeds = %f %f %f\n",
// *(float *)&persist.UserData[50],
// *(float *)&persist.UserData[51],
// *(float *)&persist.UserData[52]);
while (!ReadBit(46)) ; // wait for switch to go high
Jog(0,0); //Stop
Jog(1,0);
Jog(2,0);
}
Doing all the probing in KFLOP in C rather than in the PC in GCode would probably be somewhat faster if that is an issue.
Here is a code fragment writing CSV data to a disk file taken from the CaptureXYZMotionToFile.c example.
Code:
p=gather_buffer;
FILE *f=fopen("C:\\temp\\kflopdata.txt","wt");
for (i=0; i<N; i++)
{
// round times to neaarest servo tick
p[0] = ((int)(p[0]/TIMEBASE + 0.5))*TIMEBASE;
fprintf(f,"%16.9f,%16.3f,%16.3f,%16.3f\n",p[0],p[1],p[2],p[3]);
p += 4;
}
fclose(f);
Regards