-
Notifications
You must be signed in to change notification settings - Fork 11
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 enums for detector motion #57
Comments
from ophyd_async.core import StandardReadable
from ophyd_async.epics.motor import Motor
class DetectorMotion(StandardReadable):
"""Physical motion for detector travel"""
def __init__(self, prefix: str, name: str = "") -> None:
self.y = Motor(prefix + "Y") # Vertical
self.z = Motor(prefix + "Z") # Beam
super().__init__(name)
at the moment the file does not have binary setpoints so either it's the wrong file or it has changed substantially since. @noemifrisina from git log I infer you might have more context here, what happened here? |
I'm not sure, I think that the original issue may have been referring to this DetectorMotion device ? |
ah I see self.shutter_closed_lim = epics_signal_r(
float, f"{prefix}{device_prefix}CLOSE_LIMIT"
) # on limit = 1, off = 0
self.shutter_open_lim = epics_signal_r(
float, f"{prefix}{device_prefix}OPEN_LIMIT"
) # on limit = 1, off = 0
self.z_disabled = epics_signal_r(
float, f"{prefix}{device_prefix}Z:DISABLED"
) # robot interlock, 0=ok to move, 1=blocked
self.crate_power = epics_signal_r(
float, f"{prefix}{pmac_prefix}CRATE2_HEALTHY"
) # returns 0 if no power
self.in_robot_load_safe_position = epics_signal_r(
int, f"{prefix}{pmac_prefix}GPIO_INP_BITS.B2"
) # returns 1 if safe |
A lot of the movements in
DetectorMotion
are binary setpoints, using 0/1 to mean open/closed. We should refactor these to be enums to be more descriptiveThe text was updated successfully, but these errors were encountered: