From f1e107c0de3b6c4fa57393e99fffdacc4ea73ddd Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Wed, 24 Apr 2013 19:41:05 +0000 Subject: [PATCH] Added actual velocity to status update --- motorApp/AerotechSrc/drvEnsembleAsyn.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/motorApp/AerotechSrc/drvEnsembleAsyn.cc b/motorApp/AerotechSrc/drvEnsembleAsyn.cc index ab1f7142..a47b5bf7 100644 --- a/motorApp/AerotechSrc/drvEnsembleAsyn.cc +++ b/motorApp/AerotechSrc/drvEnsembleAsyn.cc @@ -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 */