Knee mill table height; external offset or something else?

More
2 years 11 months ago - 2 years 11 months ago #286268 by Aciera
Are you still using the same kinematic you posted above?
 
Last edit: 2 years 11 months ago by Aciera.

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

More
2 years 11 months ago #286330 by m0602232
Not the same, something like:

static double pos3 = 0;
int kinematicsForward(const double joints,
EmcPose pos,
const KINEMATICS_FORWARD_FLAGS * fflags,
KINEMATICS_INVERSE_FLAGS * iflags)

{

pos->tran.x = joints[0];
pos->tran.y = joints[1];
pos->tran.z = joints[2] + joints[3];
pos3 = joints[3];
pos->a = joints[3];
pos->b = 0;
pos->c = 0;
pos->u = 0;
pos->v = 0;
pos->w = 0;

return 0;
}

int kinematicsInverse(const EmcPose * pos,
double joints,
const KINEMATICS_INVERSE_FLAGS iflags,
KINEMATICS_FORWARD_FLAGS * fflags)

{

joints[0] = pos->tran.x;
joints[1] = pos->tran.y;
joints[2] = pos->tran.z - pos3;
joints[3] = pos->a;
joints[4] = pos->b;
joints[5] = pos->c;
joints[6] = pos->u;
joints[7] = pos->v;
joints[8] = pos->w;

return 0;

}

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

More
2 years 11 months ago #286334 by Aciera
Not sure but what is the purpose of the variable 'pos3'?

I would have tried something like this:

Code:
int kinematicsForward(const double joints, EmcPose pos, const KINEMATICS_FORWARD_FLAGS * fflags, KINEMATICS_INVERSE_FLAGS * iflags) { pos->tran.x = joints[0]; pos->tran.y = joints[1]; pos->tran.z = joints[2] + joints[3]; pos->a = joints[3]; pos->b = 0; pos->c = 0; pos->u = 0; pos->v = 0; pos->w = 0; return 0; } int kinematicsInverse(const EmcPose * pos, double joints, const KINEMATICS_INVERSE_FLAGS iflags, KINEMATICS_FORWARD_FLAGS * fflags) { joints[0] = pos->tran.x; joints[1] = pos->tran.y; joints[2] = pos->tran.z - pos->a; joints[3] = pos->a; joints[4] = pos->b; joints[5] = pos->c; joints[6] = pos->u; joints[7] = pos->v; joints[8] = pos->w; return 0; }

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

More
2 years 11 months ago #286349 by tightmopedman9
This is something I've wanted to do on my knee mill as well. Finding the correct table height to run a program using both jobber twist drills and short end mills can be a pain. If you do decide to run such programs in one program it leads to a loss in rigidity from doing some cutting with the quill almost fully extended.

How I was thinking of accomplishing this is by changing the tool length offset when the height of the knee changes. What would be nice is a prompt after a tool change that requests a knee height adjustment to target minimum quill length extension. I was thinking you could do this with a Python script that processes an ngc. The script would look at the minimum Z height for a given tool, then replace the M6 with an O code routine. The O code routine would prompt the user 'Adjust Knee Height X Length, Press Resume After Adjustment' then check the new knee position and if within range, issue a G10 L10 (set tool table) for the entire tool table.

This solution would be a bit clunky, as you'd have to run the script on every file you post to the machine, unless you can integrate this feature into your post processor. Also, adjusting the entire tool table can be slow - I have 12 in mine, and rewriting all of them from a script takes ~20 seconds (from memory). It would probably be quicker to do a G10 L2 (set coordinate system) instead, but the problem with this (I think) is that your tool length offsets would be invalid after exiting an ngc.

Can you provide details and/or pictures on how you mounted your linear encoder and wired it to your controller?

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

More
2 years 11 months ago #286410 by m0602232
Thanks for suggestion, pos3 is there because without it there is no change in neither joint.2.pos-cmd nor joint.3.pos-cmd when table is moved. Z value in dro changes though. I would like to understand why it does that.

When pos3 is added to kinematics, joint.2.pos-cmd follows the position of the table encoder, but pid goes crazy. Screenshot attached. 

 

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

More
2 years 11 months ago #286415 by m0602232
 

tightmopedman9, I just connected some cheap chinese linear encoder to Mesa board encoder input. 

 

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

Time to create page: 0.171 seconds
Powered by Kunena Forum