mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-04 21:55:40 -05:00
Updated to use the setClosedLoop method to set persistent move.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user