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.

This commit is contained in:
mp49
2011-07-29 10:28:10 +00:00
parent f513da466f
commit 48e99a40e6
+8
View File
@@ -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)) {