Updated to use the setClosedLoop method to set persistent move.

This commit is contained in:
2024-06-05 15:32:14 -05:00
parent b8b090a804
commit 71ae063b23

View File

@@ -232,12 +232,18 @@ asynStatus MD90Axis::stop(double acceleration )
return status; return status;
} }
/** The ACS driver used this to turn on/off the motor winding current, so
* we'll use this for enabling/disabling the persistent move state. */
asynStatus MD90Axis::setClosedLoop(bool closedLoop) asynStatus MD90Axis::setClosedLoop(bool closedLoop)
{ {
asynStatus status; asynStatus status;
//static const char *functionName = "MD90Axis::setClosedLoop"; //static const char *functionName = "MD90Axis::setClosedLoop";
sprintf(pC_->outString_, "#%02dW=%d", axisNo_, closedLoop ? 1:0); if (closedLoop == 1) {
sprintf(pC_->outString_, "EPM");
} else {
sprintf(pC_->outString_, "DPM");
}
status = pC_->writeReadController(); status = pC_->writeReadController();
return status; return status;
} }