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

Add support for UniBlitz shutter #1036

Open
prjemian opened this issue Oct 31, 2024 · 7 comments
Open

Add support for UniBlitz shutter #1036

prjemian opened this issue Oct 31, 2024 · 7 comments

Comments

@prjemian
Copy link
Contributor

USAXS reports they have a UniBlitz shutter. It has two PVs, one to open the shutter and the other to close it. There is no PV for the status.

@prjemian
Copy link
Contributor Author

Not seeing any such support now in apstools. Tried searching all of GitHub. No obvious determination of state. Only known state is when it has just been set (assume that it has not been changed).

There is no way to determine conclusively the state of this shutter (unless the EPICS database keeps track of it).

@prjemian
Copy link
Contributor Author

It is trivial to implement controls for each of the PVs but nonsense to make it consistent with the other apstools shutter classes without a clear way to determine the state of the shutter.

@prjemian
Copy link
Contributor Author

@jkirchman @kmpeters: Is there any state PV? Is it possible to add such a state PV (keeps track of the last OPEN or CLOSE command)?

@prjemian
Copy link
Contributor Author

Digging deeper through the source code, the ApsPssShutter class matches this exactly:

class ApsPssShutter(ShutterBase):
"""
APS PSS shutter
.. index:: Ophyd Device; ApsPssShutter
* APS PSS shutters have separate bit PVs for open and close
* set either bit, the shutter moves, and the bit resets a short time later
* no indication that the shutter has actually moved from the bits
(see :func:`ApsPssShutterWithStatus()` for alternative)
Since there is no direct indication that a shutter has moved, the
``state`` property will always return *unknown* and the
``isOpen`` and ``isClosed`` properties will always return *False*.

@prjemian
Copy link
Contributor Author

prjemian commented Oct 31, 2024

uniblitz_shutter = ApsPssShutter(
    "",
    name="uniblitz_shutter",
    open_pv=f"{PREFIX}open",
    close_pv=f"{PREFIX}close"
)

Apparently, both open_pv and close_pv are complete PV names.

@prjemian
Copy link
Contributor Author

Note that the support uses a fixed value of 1 when writing to then open:

self.open_signal.put(1)

and close PV:
self.close_signal.put(1)

The base class supports custom values for self.open_value and self.close_value:

open_value = 1 # value of "open"
close_value = 0 # value of "close"

The base class constructor does not provide kwargs to set these. Might be a good addition, otherwise need to set shutter.close_value=1 once the shutter object is created.

@prjemian
Copy link
Contributor Author

Add to documentation that ApsPssShutter can also be used for the UniBlitz shutter.

@prjemian prjemian reopened this Oct 31, 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

No branches or pull requests

1 participant