Closedown
This commit is contained in:
@@ -2,7 +2,7 @@ pol_mode=ch.psi.pshell.epics.DiscretePositioner|X11MA-ID2:MODE|||true
|
||||
pol_angle=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ALPHA|||true
|
||||
pol_offset=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ENERGY-OFFS|||true
|
||||
pol_done=ch.psi.pshell.epics.ChannelString|X11MA-ID2:DONE|Read||true
|
||||
energy=ch.psi.pshell.epics.ChannelDouble|X11MA-PHS:E_SP|||
|
||||
energy=ch.psi.pshell.epics.ChannelDouble|X11PHS-E:GO.A|||
|
||||
id_error=ch.psi.pshell.epics.ChannelInteger|X11MA-ID2-PLC:ERROR|||true
|
||||
beam_status=ch.psi.pshell.epics.DiscretePositioner|ACOAU-ACCU:OP-MODE|Read||true
|
||||
edata=ch.psi.pshell.epics.ChannelDoubleArray|EDATA 3|Read||
|
||||
|
||||
@@ -108,25 +108,11 @@ def plot_file(file, ctxt = None):
|
||||
table = Table.load(file, sep, '#')
|
||||
plots = plot(table, title = ctxt)
|
||||
|
||||
#If True, then wait_beam will not continue checking machine status
|
||||
maintenance_mode = True
|
||||
|
||||
def has_beam():
|
||||
"""
|
||||
"""
|
||||
return beam_status.readback.read() !="Machine Down"
|
||||
|
||||
def wait_beam():
|
||||
"""
|
||||
"""
|
||||
print "Waiting for beam... ",
|
||||
while not has_beam():
|
||||
if maintenance_mode:
|
||||
print "Maintenence mode: disregarding beam state"
|
||||
return
|
||||
sleep(0.1)
|
||||
print "Beam OK."
|
||||
|
||||
def is_id_error():
|
||||
return (id_error.read()==0)
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#Parameters
|
||||
|
||||
E1 = 500
|
||||
E2 = 600
|
||||
E1 = 510
|
||||
E2 = 590
|
||||
TIME = 1 #min
|
||||
DELAY = 2.0 #s
|
||||
MODE = 'CIRC +'
|
||||
|
||||
Reference in New Issue
Block a user