Fixed scaling of the written motorVelocity value
This commit is contained in:
@@ -510,9 +510,6 @@ asynStatus masterMacsAxis::doPoll(bool *moving) {
|
|||||||
setAxisParamChecked(this, motorEncoderPosition, currentPosition);
|
setAxisParamChecked(this, motorEncoderPosition, currentPosition);
|
||||||
|
|
||||||
if (pMasterMacsA_->lastMoveCommand == velocityMode && !speedEqualZero()) {
|
if (pMasterMacsA_->lastMoveCommand == velocityMode && !speedEqualZero()) {
|
||||||
|
|
||||||
// TODO: Not sure whether the RVEL field of the motor record does not
|
|
||||||
// work - has to be clarified
|
|
||||||
double actualVelocity = 0.0;
|
double actualVelocity = 0.0;
|
||||||
|
|
||||||
rwStatus = pC_->read(axisNo_, 14, response);
|
rwStatus = pC_->read(axisNo_, 14, response);
|
||||||
@@ -525,8 +522,10 @@ asynStatus masterMacsAxis::doPoll(bool *moving) {
|
|||||||
__PRETTY_FUNCTION__, __LINE__);
|
__PRETTY_FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the actual velocity to the paramLib (TODO: does it though?)
|
// Writes the actual speed in steps per second to the paramLib. This
|
||||||
setAxisParamChecked(this, motorVelocity, actualVelocity);
|
// value is then returned by the RVEL field of the motor record.
|
||||||
|
setAxisParamChecked(this, motorVelocity,
|
||||||
|
actualVelocity / motorRecResolution);
|
||||||
|
|
||||||
// Motor is moving in velocity mode
|
// Motor is moving in velocity mode
|
||||||
*moving = true;
|
*moving = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user