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

Allowing for bypassing detune check during motor move #133

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

lisazacarias
Copy link
Collaborator

Also addressing issue #132

:return:
"""

self.check_abort()
maxSteps = abs(maxSteps)

if changeLimits:
# on the off chance that someone tries to write a negative maximum
Copy link
Member

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?

Copy link
Collaborator Author

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

Copy link
Member

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?

Copy link
Member

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
Copy link
Member

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?

Copy link
Collaborator Author

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

Copy link
Member

@nneveu nneveu left a 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
Copy link
Member

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.

@nneveu nneveu merged commit 4c62a2b into slaclab:main Feb 13, 2024
2 checks passed
Derikka pushed a commit to Derikka/lcls-tools that referenced this pull request Mar 17, 2024
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

Successfully merging this pull request may close these issues.

2 participants