From 4bc06cea767af82185be757cdfe9ba7e7d41db2c Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Wed, 26 Jun 2013 17:20:21 +1000 Subject: [PATCH] SICS-501 Special one-shot move after changing direction for backlash --- site_ansto/motor_dmc2280.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site_ansto/motor_dmc2280.c b/site_ansto/motor_dmc2280.c index 3ea4c91a..cd995315 100644 --- a/site_ansto/motor_dmc2280.c +++ b/site_ansto/motor_dmc2280.c @@ -2516,6 +2516,7 @@ static void DMCState_Moving(pDMC2280Driv self, pEvtEvent event) { SICSLogWrite(line, eStatus); } set_lastMotion(self, self->currSteps, self->currCounts); + self->preseek = 2; /* special one-shot */ absolute = motCreep(self, target); } } @@ -2555,6 +2556,8 @@ static void DMCState_Moving(pDMC2280Driv self, pEvtEvent event) { } cmdPosition(self, absolute); self->subState = 3; + if (self->preseek == 2) /* change of direction */ + self->preseek = 0; /* don't do it again */ return; } }