Added actual velocity to status update

This commit is contained in:
Ron Sluiter
2013-04-24 19:41:05 +00:00
parent 5c206450c6
commit f1e107c0de
+15
View File
@@ -64,6 +64,7 @@ in file LICENSE that is included with this distribution.
* - Reading both feedback and commanded positions.
* - Deleted duplicate error messages.
* .17 09-27-12 rls - Bug fix for incorrect jog acceleration rate.
* .18 09-27-12 rls - Support for actual velocity in status update.
*/
@@ -801,6 +802,20 @@ static void EnsemblePoller(EnsembleController *pController)
}
}
}
sprintf(outputBuff, "VFBK(@%d)", pAxis->axis);
comStatus = sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff));
if (comStatus != asynSuccess)
{
motorParam->setInteger(pAxis->params, motorAxisCommError, 1);
epicsMutexUnlock(pAxis->mutexId);
continue;
}
else
{
double actvelocity = atof(&inputBuff[1]) * 1000.;
motorParam->setDouble(pAxis->params, motorAxisActualVel, actvelocity);
}
motorParam->callCallback(pAxis->params);
epicsMutexUnlock(pAxis->mutexId);
} /* Next axis */