From 1bc379f7920537c538834fd395fa87d6dd200c3a Mon Sep 17 00:00:00 2001 From: mp49 Date: Fri, 20 May 2011 17:25:45 +0000 Subject: [PATCH] motor: added check for zero acceleration when doing a normal move in the XPS driver. This can happen if in the motor record VELO=VBAS. The move will fail if a zero acceleration is sent to the controller. So in the case of a zero acceleration I ignore it and use the controller value. --- motorApp/NewportSrc/drvXPSAsyn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/motorApp/NewportSrc/drvXPSAsyn.c b/motorApp/NewportSrc/drvXPSAsyn.c index 94da24c6..3975b861 100644 --- a/motorApp/NewportSrc/drvXPSAsyn.c +++ b/motorApp/NewportSrc/drvXPSAsyn.c @@ -927,10 +927,11 @@ static int motorAxisMove(AXIS_HDL pAxis, double position, int relative, return MOTOR_AXIS_ERROR; } } + status = PositionerSGammaParametersSet(pAxis->pollSocket, pAxis->positionerName, max_velocity*pAxis->stepSize, - acceleration*pAxis->stepSize, + ((acceleration!=0) ? acceleration*pAxis->stepSize : pAxis->accel), pAxis->minJerkTime, pAxis->maxJerkTime); if (status != 0) {