-
Notifications
You must be signed in to change notification settings - Fork 21
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
Allowing for bypassing detune check during motor move #133
Conversation
:return: | ||
""" | ||
|
||
self.check_abort() | ||
maxSteps = abs(maxSteps) | ||
|
||
if changeLimits: | ||
# on the off chance that someone tries to write a negative maximum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a negative no longer a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just immediately turns max steps into a positive number regardless of what the user requested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is the max steps possible for all cavities, which is some default in utils.DEFAULT_STEPPER_MAX_STEPS? Is the default sometimes neg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lisa clarified, it's the maxSteps for one tuner movement.
|
||
def issueMoveCommand(self, numSteps): | ||
def issueMoveCommand(self, numSteps: int, check_detune: bool = True): | ||
# this is necessary because the tuners for the HLs move the other direction | ||
if self.cavity.cryomodule.is_harmonic_linearizer: | ||
numSteps *= -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is the answer to my q above. You check here now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is numSteps, which is slightly different (I should probably figure out a way to rewrite this lol). It's the number of steps requested by the user vs the maximum number of steps allowed by the stepper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
:return: | ||
""" | ||
|
||
self.check_abort() | ||
maxSteps = abs(maxSteps) | ||
|
||
if changeLimits: | ||
# on the off chance that someone tries to write a negative maximum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lisa clarified, it's the maxSteps for one tuner movement.
Also addressing issue #132