Skip to content
Snippets Groups Projects
Commit 7e756a47 authored by rodolakis's avatar rodolakis
Browse files

branch shutter status

parent 3d1ee21e
No related branches found
No related tags found
No related merge requests found
......@@ -237,8 +237,9 @@ def ID_on(verbose=True):
if verbose:
print("Starting ID - "+dateandtime())
caput(ID_pvs()['energy_sp'],3.8)
#caput(ID_pvs()['energy_sp'],3.8)
caput(ID_pvs()['main_power'],0,wait=True,timeout=18000)
sleep(5)
def ID_start(ID_mode='RCP',QP_ratio=None, verbose=True):
"""
......@@ -276,21 +277,17 @@ def ID_switch_mode(ID_mode):
shutter_check(verbose=False)
ID_state = ID_state_get()
try:
if ID_state_mode(ID_mode) != ID_state:
print("Turning ID off...")
ID_off(verbose=True)
sleep(5)
ID_ready()
print("Switching ID mode, please wait...")
ID_mode_set(ID_mode)
ID_on(verbose=True)
sleep(5)
ID_ready()
print("ID Mode:",ID_mode)
except:
print_warning_message("Not a valid ID mode")
if ID_state_mode(ID_mode) != ID_state:
print("Turning ID off...")
ID_off(verbose=True)
ID_ready()
print("Switching ID mode, please wait...")
ID_mode_set(ID_mode)
ID_on(verbose=True)
ID_ready()
print("ID Mode:",ID_mode_get())
def ID_get(verbose=False):
"""
......
......@@ -84,11 +84,11 @@ def branch_shutter_status(branch=None,verbose=False):
"""
if branch == None:
branch = iex.BL.branch
pvA="PA:29ID:S"+branch.upper()+"S_BLOCKING_BEAM.VAL"
pvB="PB:29ID:S"+branch.upper()+"S_BLOCKING_BEAM.VAL"
#"ON" = 1 => shutter open
pvA = "PA:29ID:S"+branch.upper()+"S_BLOCKING_BEAM.VAL"
pvB = "PB:29ID:S"+branch.upper()+"S_BLOCKING_BEAM.VAL"
#"ON" = 1 => shutter blocking
status=caget(pvA)+caget(pvB)
if status == 2:
if status == 0:
shutter_open=True
else:
shutter_open=False
......
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