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

Undulator gets stuck during energy scan #420

Closed
prjemian opened this issue Sep 16, 2020 · 2 comments · Fixed by #421
Closed

Undulator gets stuck during energy scan #420

prjemian opened this issue Sep 16, 2020 · 2 comments · Fixed by #421
Assignees
Labels
Milestone

Comments

@prjemian
Copy link
Contributor

As reported by @gfabbris at APS 4-ID-Polar:

This issue seems to be solved with _put_complete = True. I've run dozens of scans after changing it and didn't get stuck. ... It may be good to add it to the apstools.ApsUndulator as I think all beamlines would need it.

Thanks @gfabbris for the suggestion!

@prjemian prjemian added the bug label Sep 16, 2020
@prjemian prjemian added this to the 1.3.7 milestone Sep 16, 2020
@prjemian prjemian self-assigned this Sep 16, 2020
@prjemian
Copy link
Contributor Author

Here's how ophyd.EpicsSignal handles put_complete=True:

        # using put completion:
        # timeout and settle time is handled by the status object.
        st = Status(self, timeout=timeout, settle_time=settle_time)

        def put_callback(**kwargs):
            st._finished(success=True)

        self.put(value, use_complete=True, callback=put_callback)
        return st

@prjemian
Copy link
Contributor Author

With this change, the original behavior can be obtained in a custom subclass:

class MyUndulator(apstools.devices.ApsUndulator):

    start_button = Component(EpicsSignal, "Start", put_complete=False)

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

Successfully merging a pull request may close this issue.

1 participant