From 48e99a40e61cd0a07a97c7a9ddf7b6bc0bac5889 Mon Sep 17 00:00:00 2001 From: mp49 Date: Fri, 29 Jul 2011 10:28:10 +0000 Subject: [PATCH] motor: XPS model 3 driver. added limits monitoring to poller. This is useful for when the limits can change on the controller. A seperate set of records is needed to monitor the Asyn parameters and set the motor record limits accordingly. --- motorApp/NewportSrc/XPSAxis.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/motorApp/NewportSrc/XPSAxis.cpp b/motorApp/NewportSrc/XPSAxis.cpp index 7a7e05a0..83f07372 100644 --- a/motorApp/NewportSrc/XPSAxis.cpp +++ b/motorApp/NewportSrc/XPSAxis.cpp @@ -554,6 +554,14 @@ asynStatus XPSAxis::poll(bool *moving) axisDone &= !deferredMove_; *moving = axisDone ? false : true; setIntegerParam(pC_->motorStatusDone_, axisDone); + + /*Read the controller software limits in case these have been changed by a TCL script.*/ + status = PositionerUserTravelLimitsGet(pollSocket_, positionerName_, &lowLimit_, &highLimit_); + if (status == 0) { + setDoubleParam(pC_->motorHighLimit_, (highLimit_/stepSize_)); + setDoubleParam(pC_->motorLowLimit_, (lowLimit_/stepSize_)); + } + setIntegerParam(pC_->motorStatusHome_, (axisStatus_ == 11) ? 1 : 0); if ((axisStatus_ >= 0 && axisStatus_ <= 9) || (axisStatus_ >= 20 && axisStatus_ <= 42)) {