diff --git a/dsmApp/src/MD90Driver.cpp b/dsmApp/src/MD90Driver.cpp index 7f40972..a0e5976 100644 --- a/dsmApp/src/MD90Driver.cpp +++ b/dsmApp/src/MD90Driver.cpp @@ -174,7 +174,8 @@ asynStatus MD90Axis::move(double position, int relative, double minVelocity, dou status = sendAccelAndVelocity(acceleration, maxVelocity); - // Position specified in nanometers + // Position specified in encoder steps (10 nm), but motor move commands are in nanometers + position = position * 10; if (relative) { sprintf(pC_->outString_, "CRM %d", NINT(position)); } else { @@ -268,7 +269,7 @@ asynStatus MD90Axis::poll(bool *moving) // TODO: Will need to add some more error handling for the motor return codes. - // Read the current motor position + // Read the current motor position in encoder steps (10 nm) sprintf(pC_->outString_, "GEC"); comStatus = pC_->writeReadController(); if (comStatus) goto skip; diff --git a/iocs/dsmIOC/iocBoot/iocDsm/motor.substitutions.md90 b/iocs/dsmIOC/iocBoot/iocDsm/motor.substitutions.md90 index 2e0aed8..f1751fa 100644 --- a/iocs/dsmIOC/iocBoot/iocDsm/motor.substitutions.md90 +++ b/iocs/dsmIOC/iocBoot/iocDsm/motor.substitutions.md90 @@ -2,5 +2,5 @@ file "$(MOTOR)/db/basic_asyn_motor.db" { pattern {P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} -{DSM:, 0, "m$(N)", "asynMotor", MD900, 0, "MD-90", mm, Pos, 2.0, 0.1, .2, 0, 1, .2, .001, 3, 20000, -20000, ""} +{DSM:, 0, "m$(N)", "asynMotor", MD900, 0, "MD-90", mm, Pos, 2.0, 0.1, .2, 0, 1, .2, .01, 2, 20000, -20000, ""} }