Skip to content
Snippets Groups Projects
Commit 73cc75d0 authored by jmcchesn's avatar jmcchesn
Browse files

Update iexcode/instruments/shutters.py

parent 7798c044
No related branches found
No related tags found
No related merge requests found
......@@ -70,11 +70,13 @@ def main_shutter_check_open():
################################ branch shutters ##############################
##############################################################################################################
def branch_shutter_status(branch=iex.BL.branch,verbose=False):
def branch_shutter_status(branch=None,verbose=False):
"""
checks on the status of the main shutter
and returns shutter_open = True / False
"""
if branch == None:
branch = iex.BL.branch
pvA="PA:29ID:S"+branch+"S_BLOCKING_BEAM.VAL"
pvB="PB:29ID:S"+branch+"S_BLOCKING_BEAM.VAL"
#"ON" = 1 => shutter open
......@@ -89,27 +91,31 @@ def branch_shutter_status(branch=iex.BL.branch,verbose=False):
print(branch+"-shutter is "+status)
return shutter_open
def branch_shutter_close(branch=iex.BL.branch,verbose=False):
def branch_shutter_close(branch=None,verbose=False):
"""
closes current branch shutter
Previously: Close_BranchShutter
"""
if branch == None:
branch = iex.BL.branch
caput("PC:29ID:S"+branch+"S_CLOSE_REQUEST.VAL",1,wait=True,timeout=18000)
print("Closing "+branch+"-Shutter...")
def branch_shutter_open(branch=iex.BL.branch,verbose=False):
def branch_shutter_open(branch=None,verbose=False):
"""
Opens current branch shutter
Previoulsy: Open_BranchShutter
"""
if branch == None:
branch = iex.BL.branch
shutter_status = branch_shutter_status()
if shutter_status:
print(branch+"-Shutter already open...")
else:
caput("PC:29ID:S"+branch+"S_OPEN_REQUEST.VAL",1,wait=True,timeout=18000)
print("Opening "+branch+"-Shutter...")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment