Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
ref #253
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jun 18, 2019
1 parent 747e61f commit 9fea592
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions profile_bluesky/startup/11-motors.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,20 @@ def set_size(self, *args, h=None, v=None):
move_motors(self.h_size, h, self.v_size, v)


class GuardSlitMotor(UsaxsMotor):
status_update = Component(EpicsSignal, ".STUP")


class GSlitDevice(MotorBundle):
"""
guard slit
* aperture: (h_size, v_size)
"""
bot = Component(UsaxsMotor, '9idcLAX:mxv:c0:m6', labels=("gslit",))
inb = Component(UsaxsMotor, '9idcLAX:mxv:c0:m4', labels=("gslit",))
outb = Component(UsaxsMotor, '9idcLAX:mxv:c0:m3', labels=("gslit",))
top = Component(UsaxsMotor, '9idcLAX:mxv:c0:m5', labels=("gslit",))
bot = Component(GuardSlitMotor, '9idcLAX:mxv:c0:m6', labels=("gslit",))
inb = Component(GuardSlitMotor, '9idcLAX:mxv:c0:m4', labels=("gslit",))
outb = Component(GuardSlitMotor, '9idcLAX:mxv:c0:m3', labels=("gslit",))
top = Component(GuardSlitMotor, '9idcLAX:mxv:c0:m5', labels=("gslit",))
x = Component(UsaxsMotor, '9idcLAX:m58:c1:m5', labels=("gslit",))
y = Component(UsaxsMotor, '9idcLAX:m58:c0:m6', labels=("gslit",))

Expand Down Expand Up @@ -100,6 +104,18 @@ def v_h_gap_ok(self):
def gap_ok(self):
return self.h_gap_ok and self.v_h_gap_ok

def status_update(self):
# TODO: Did this code cause the following exception?
# RuntimeError: Another set() call is still in progress
yield from bps.abs_set(self.top.status_update, 1)
yield from bps.sleep(0.05)
yield from bps.abs_set(self.bot.status_update, 1)
yield from bps.sleep(0.05)
yield from bps.abs_set(self.outb.status_update, 1)
yield from bps.sleep(0.05)
yield from bps.abs_set(self.inb.status_update, 1)
yield from bps.sleep(0.05)


class UsaxsCollimatorStageDevice(MotorBundle):
"""USAXS Collimator (Monochromator) stage"""
Expand Down

0 comments on commit 9fea592

Please sign in to comment.