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

Improve how EpicsMotor deals with .velocity and .acceleration #1122

Open
tacaswell opened this issue Jun 6, 2023 · 2 comments
Open

Improve how EpicsMotor deals with .velocity and .acceleration #1122

tacaswell opened this issue Jun 6, 2023 · 2 comments

Comments

@tacaswell
Copy link
Contributor

tacaswell commented Jun 6, 2023

Lifting a comment from slack from @dperl-dls .

If you try to set the velocity of an EpicsMotor out of bounds via yield from bps.mv(mtr.velocity, target) it will hang (I assume that the IOC clips the velocity to its valid range).

I think there are 3 things that can fix this and we probably should do all three.

  1. set "sensible" limit on the velocity and acceleration components of EpicsMotor (simplest)
  2. make at least the read and write timeouts runtime mutable (also simple, but has broader consequences)
  3. write a EpicsMotorVelocity(EpicsSignal) class that knows how to dig out VMAX (and add VMAX to EpicsMotor) and use that to check limits (bit of work, but most correct, lets us give better error messages, fail before we touch hardwore to reduce clean up, etc)
@coretl
Copy link
Collaborator

coretl commented Aug 2, 2023

I believe if you do a caput callback on the velocity it will return quickly, then you can caget the value to see whether it got clipped...

@tacaswell
Copy link
Contributor Author

Moving to using put-complete + checking is a better option than 1 and 2 and complimentary with 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants