From 891a88c62290fe77bfcf238f05e122b66489544b Mon Sep 17 00:00:00 2001 From: mp49 Date: Fri, 20 May 2011 17:12:41 +0000 Subject: [PATCH] motor: I added a 50ms sleep when doing a set position in the XPS driver, just before the GroupReferencingStop() command. Some types of XPS axes seem to need this sent a little later than others (eg. a spindle type axis can be left in state 64 if this command is sent too quickly after a GroupReferencingActionExecute(). --- motorApp/NewportSrc/drvXPSAsyn.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/motorApp/NewportSrc/drvXPSAsyn.c b/motorApp/NewportSrc/drvXPSAsyn.c index 382c37ca..80890f31 100644 --- a/motorApp/NewportSrc/drvXPSAsyn.c +++ b/motorApp/NewportSrc/drvXPSAsyn.c @@ -665,6 +665,9 @@ static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double "None", value*(pAxis->stepSize)); /*Stop referencing, then we are homed on all axes in group.*/ + /*Some types of XPS axes (eg. spindle) need a sleep here, otherwise + the axis can be left in referencing mode.*/ + epicsThreadSleep(0.05); status = GroupReferencingStop(pAxis->pollSocket, pAxis->groupName); if (status != 0) { @@ -696,6 +699,9 @@ static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double "SetPosition", "None", value*(pAxis->stepSize)); + /*Some types of XPS axes (eg. spindle) need a sleep here, otherwise + the axis can be left in referencing mode.*/ + epicsThreadSleep(0.05); status = GroupReferencingStop(pAxis->pollSocket, pAxis->groupName); if (status != 0) {