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
immediate backlash take up
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: immediate backlash take up
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.
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.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: immediate backlash take up
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
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
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: immediate backlash take up
Hi Erik,
You might try this C Code:
No those commands are related to Independent axis movements not coordinated motion type of movements (GCode).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
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
}
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.