Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect acceleration calculation for controllers that don't support VBAS #76

Open
kmpeters opened this issue Aug 28, 2017 · 4 comments
Milestone

Comments

@kmpeters
Copy link
Member

Problem

If a motor controller doesn't support setting a base velocity and the associated motor record is configured to have a non-zero VBAS, the motor record will calculate an acceleration that results in a shorter acceleration period than the one specified by ACCL.

Proposed solution

  • Add a bit to the MSTA field to allow drivers to tell the motor record if they support setting a base velocity (0=base velocity is supported, for backwards compatibility).
  • Set this new bit to 1 in every driver that doesn't support setting a base velocity.

Previous discussion

#75

@tboegi
Copy link
Contributor

tboegi commented Sep 4, 2017

A first attempt is here:
#80

@kmpeters kmpeters removed this from the R7-0 milestone May 2, 2018
@kmpeters
Copy link
Member Author

kmpeters commented May 2, 2018

Likely to be fixed by #81

@kmpeters
Copy link
Member Author

#81 was closed, so this will still be an issue.

An example of how drivers can workaround the problem by correcting the acceleration passed by the motor record to give the desired acceleration time (ACCL) can be found here:

double ANF2Axis::correctAccel(double minVelocity, double maxVelocity, double acceleration)

@tboegi
Copy link
Contributor

tboegi commented Jul 12, 2018

#81 was closed, so this will still be an issue.
It was closed because
a) Adding bits to MSTA is not a good way to go
b) The problem is that the driver may want to "push" VBAS from the driver into the record,
and this is not at all addressed by the patch.

A possible solution how to push values from driver (in this case the softlimits,
sometimes named "read only soft limits) can be seen here:
https://github.com/EuropeanSpallationSource/motor/blob/ess-6.9.x/motorApp/MotorSrc/motorRecord.cc#L1525

@kmpeters kmpeters added this to the R7-1 milestone Aug 20, 2018
@kmpeters kmpeters modified the milestones: R7-1, Future Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants