diff --git a/dsmApp/src/MD90Driver.cpp b/dsmApp/src/MD90Driver.cpp index 33d0181..db5907a 100644 --- a/dsmApp/src/MD90Driver.cpp +++ b/dsmApp/src/MD90Driver.cpp @@ -185,7 +185,7 @@ asynStatus MD90Axis::sendAccelAndVelocity(double acceleration, double velocity) // Velocity provided in steps/sec // Our unit step size of the encoder is 10 nm, but the motor moves in steps approx. 5 micrometers. // Motor controller accepts step frequency in Hz. - freq = NINT(fabs(velocity / COUNTS_PER_STEP)); + freq = NINT(fabs(velocity / 500.)); sprintf(pC_->outString_, "SSF %d", freq); status = pC_->writeReadController(); if (!status) { @@ -446,7 +446,7 @@ asynStatus MD90Axis::poll(bool *moving) if (comStatus) goto skip; // The response string is of the form "0: Current step frequency: 100" sscanf(pC_->inString_, "%d: %[^:]: %d", &replyStatus, replyString, &replyValue); - velocity = replyValue * COUNTS_PER_STEP; + velocity = replyValue * 500.0; setDoubleParam(pC_->motorVelocity_, velocity); // Read the current motor integral gain (range 1-1000) diff --git a/dsmApp/src/MD90Driver.h b/dsmApp/src/MD90Driver.h index 80e1859..0b1e056 100644 --- a/dsmApp/src/MD90Driver.h +++ b/dsmApp/src/MD90Driver.h @@ -2,6 +2,9 @@ FILENAME... MD90Driver.h USAGE... Motor driver support for the DSM MD-90 controller. +Mark Rivers +March 1, 2012 + */ #include "asynMotorController.h" @@ -12,8 +15,6 @@ USAGE... Motor driver support for the DSM MD-90 controller. // No controller-specific parameters yet #define NUM_MD90_PARAMS 0 -#define COUNTS_PER_STEP 1000.0 - class epicsShareClass MD90Axis : public asynMotorAxis { public: