From 71ae063b230513a777306ce4f2b14aa44f78885d Mon Sep 17 00:00:00 2001 From: Daniel Sissom Date: Wed, 5 Jun 2024 15:32:14 -0500 Subject: [PATCH] Updated to use the setClosedLoop method to set persistent move. --- dsmApp/src/MD90Driver.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dsmApp/src/MD90Driver.cpp b/dsmApp/src/MD90Driver.cpp index 2b7529d..ec4f9ed 100644 --- a/dsmApp/src/MD90Driver.cpp +++ b/dsmApp/src/MD90Driver.cpp @@ -232,12 +232,18 @@ asynStatus MD90Axis::stop(double acceleration ) 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 status; //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(); return status; }