From 9493eed8d446bd23b7f922dffad28fa9f6c730c9 Mon Sep 17 00:00:00 2001 From: kmpeters Date: Tue, 29 Oct 2013 15:46:51 +0000 Subject: [PATCH] Modified MMC200Driver.cpp to clear errors if present while polling. --- motorApp/MicronixSrc/MMC200Driver.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/motorApp/MicronixSrc/MMC200Driver.cpp b/motorApp/MicronixSrc/MMC200Driver.cpp index e714abce..3de0f65b 100644 --- a/motorApp/MicronixSrc/MMC200Driver.cpp +++ b/motorApp/MicronixSrc/MMC200Driver.cpp @@ -393,6 +393,13 @@ asynStatus MMC200Axis::poll(bool *moving) //setIntegerParam(pC_->motorStatusAtHome_, limit); + // Clear error buffer + if (status & 0x80) + { + sprintf(pC_->outString_, "%dCER", axisIndex_); + status = pC_->writeController(); + } + // Read the drive power on status sprintf(pC_->outString_, "%dMOT?", axisIndex_); comStatus = pC_->writeReadController();