I would think so. How big would the letters be? What precision would you expect?
I'm hoping for +/- a mm say in a cutting a letter that is 150mm high... I would like to be able to cut much larger shapes too.
When I saw the move of 300mm go out and return to 0 I figured that was good, but I guess there is more to it than that. Is the difference between the command and position what I see referred to as "following error" and is it that, that determines accuracy?
I created a C program to log the data over a 300 count move. I've attached the program, and the output data. Can you verify what I've done for the move is similar to what is done on the Step Response screen. I have a delay after the first move, perhaps I shouldn't have that there. I should probably only write every 10th data point (or maybe even less)... as it's 244444 samples. Excel is a bit sluggish plotting the data.
What I did was save the setup to an C program, load that in thread1, execute it, then loaded the move/log program in thread2 and execute it from within KMotion using the C Program window.
The attached data and plot are not using any I gain yet. One other thing, the velocity that I'm testing at is the max speed for moving the stone into position (I guess this is called Jog), I would never cut at that velocity. Max cutting speed would be half. Should I try tuning with the Motion Profile - Velocity on the Step Response screen set to the lower cutting speed (20 counts/sec instead of 40 it is now)?
Thanks again.
Code:
#include "KMotionDef.h"
main()
{
double T0;
double* p = gather_buffer;
int i,n_Samples = 20 / TIMEBASE;
printf("Gathering %d samples...\n",n_Samples);
gather.Inject = FALSE; // Don't inject any Data anywhere
gather.list[0].type = GATHER_DOUBLE_TYPE;
gather.list[0].addr = &ch0->Dest;
gather.list[1].type = GATHER_DOUBLE_TYPE;
gather.list[1].addr = &ch0->Position;
gather.list[2].type = GATHER_FLOAT_TYPE;
gather.list[2].addr = &ch0->Output;
gather.list[3].type = GATHER_END_TYPE;
gather.bufptr = gather_buffer;//(double *)0xfffffffc; // force more than endbuf
gather.endptr = gather_buffer + 3 * n_Samples;
printf("Zeroing axis\n");
Zero(0);
printf("Starting move...\n");
TriggerGather(); // start capturing data
Delay_sec(0.2);
MoveRel(0,300); // Start a motion
while (!CheckDone(0));
printf("First move complete.\n");
Delay_sec(0.2);
MoveRel(0,-300);
while (!CheckDone(0));
printf("Second move complete.\n");
while (!CheckDoneGather()) ; // what till all captured
printf("Move and capture done, writing data to disk...\n");
Zero(0);
FILE *f=fopen("d:\\temp\\kflopdata.txt","wt");
if (f!=NULL)
{
//Sample,Time,Command,Position,Output
fprintf(f,"Sample,Command,Position,Output\n");
for (i=0; i<n_Samples; i++)
{
// round times to neaarest servo tick
//p[0] = ((int)(p[0]/TIMEBASE + 0.5))*TIMEBASE;
fprintf(f,"%d,%f,%f,%f\n",i,p[0],p[1],p[2]);
p += 3;
}
fclose(f);
}
else
{
printf("Error opening file.\n");
}
printf("Finished writing file.\n");
}