Updated internal units to encoder steps (10 nm).

This commit is contained in:
2024-05-24 14:31:22 -05:00
parent a1827ca152
commit 7b3675fbdf
2 changed files with 4 additions and 3 deletions

View File

@@ -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;

View File

@@ -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, ""}
}