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

Commit

Permalink
#73 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Service Account for Jan Ilavsky committed Aug 14, 2018
1 parent 974ac4a commit 3a5243e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions profile_bluesky/startup/28-protection_plc.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def wait_for_interlock(self, verbose=True):
t0 = time.time()
msg = "Waiting %g for PLC interlock, check limit switches"
while not self.interlocked:
time.sleep(self.SLEEP_POLL_s)
yield from bps.sleep(self.SLEEP_POLL_s)
if verbose:
print(msg % time.time()-t0)

Expand All @@ -39,8 +39,10 @@ def stop_if_tripped(self, verbose=True): # TODO: should be a Bluesky suspender
print("Fix PLC protection before any move. Stopping now.")
print("Call beamline scientists if you do not understand.")
print("!!!!!! DO NOT TRY TO FIX YOURSELF !!!!!!")
ti_filter_shutter.close()
user_data.collection_in_progress.put(0) # notify the GUI and others
yield from bps.mv(
ti_filter_shutter, "close",
user_data.collection_in_progress, 0, # notify the GUI and others
)


plc_protect = PlcProtectionDevice('9idcLAX:plc:', name='plc_protect')
Expand Down

0 comments on commit 3a5243e

Please sign in to comment.