Page 1 of 1
immediate backlash take up
Posted: Wed Mar 13, 2019 2:18 pm
by robosilo
Is there a way to set the backlash to be taken up upon completion of a movement instead of waiting until direction is reversed? I have the backlash set for my z-axis but I'd like the screw to reverse immediately once the destination is reached to make sure the weight is loaded on the screw in the pulling direction.
Thank you,
Erik
Re: immediate backlash take up
Posted: Wed Mar 13, 2019 7:27 pm
by TomKerekes
Hi Erik,
That wouldn’t be normal as there isn’t a way to tell if the next motion will continue forward or reverse.
You could add in a microscopic reversal in the GCode to cause it to occur.
Otherwise you could write a C Program to detect stopped motion and force the backlash reversal.
Re: immediate backlash take up
Posted: Thu Mar 14, 2019 11:52 am
by robosilo
Thanks Tom,
I did think about editing the post processor to accomplish this. I don't think the post processor lets me edit commands for just the Z-Axis but I'll look again into adding:
G91 G01 Z-.0001
G01 Z.0001
G90
If I go the C-program route would I use something along the lines of:
while(!CheckDone(Zaxis)); // wait until movement stops
MoveRel(Zaxis) = -1; // move one encoder count negative
MoveRel(Zaxis) = 1; // move in positive direction
while(CheckDone(Zaxis)); // block until movement commanded again
Re: immediate backlash take up
Posted: Thu Mar 14, 2019 7:22 pm
by TomKerekes
Hi Erik,
If I go the C-program route would I use something along the lines of:
while(!CheckDone(Zaxis)); // wait until movement stops
MoveRel(Zaxis) = -1; // move one encoder count negative
MoveRel(Zaxis) = 1; // move in positive direction
while(CheckDone(Zaxis)); // block until movement commanded again
No those commands are related to Independent axis movements not coordinated motion type of movements (GCode).
You might try this C Code:
Code: Select all
#include "KMotionDef.h"
#define ZAXIS 2
void main()
{
for (;;)
{
double LastDest = chan[ZAXIS].Dest;
WaitNextTimeSlice();
if (LastDest == chan[ZAXIS].Dest) // stopped?
chan[ZAXIS].BacklashDirection = -1; // yes, force reverse direction
}
}