06.2026
This commit is contained in:
+56
-52
@@ -46,11 +46,15 @@ TBT_MAG = "X11MA-LSCI632:MFIELD"
|
||||
keithley_1a.setForcedRead(False)
|
||||
keithley_2a.setForcedRead(False)
|
||||
keithley_3a.setForcedRead(False)
|
||||
#sc = ChannelSettlingCondition("X11MA-UIND2:DONE",1)
|
||||
sc = ChannelSettlingCondition("X11PHS:alldone",1)
|
||||
ID2_mode.setSettlingCondition(sc)
|
||||
BML_energy.setSettlingCondition(sc)
|
||||
|
||||
ID2_mode.setSettlingCondition(ChannelSettlingCondition("X11PHS:alldone",1))
|
||||
#BML_energy.setSettlingCondition(ChannelSettlingCondition("X11MA-UIND2:DONE",1))
|
||||
BML_energy.setSettlingCondition(ChannelSettlingCondition("X11MA-UIND2:DONE",1))
|
||||
|
||||
|
||||
BML_FE_CY_RBV = BML_FE_centerY.readback
|
||||
BML_FE_CX_RBV = BML_FE_centerX.readback
|
||||
BML_energy_RBV = BML_energy.readback
|
||||
|
||||
|
||||
def get_next_fid(folder, prefix):
|
||||
try:
|
||||
@@ -449,53 +453,53 @@ def assert_machine_ok(wait = True):
|
||||
if get_dry_run():
|
||||
return
|
||||
|
||||
ring_status=get_ring_status()
|
||||
old_ring_status=ring_status
|
||||
checkRing=0
|
||||
|
||||
if ring_status==5:
|
||||
log ("FB off")
|
||||
#checkRing=1
|
||||
if ring_status==0:
|
||||
log ("Machine down")
|
||||
checkRing=2
|
||||
|
||||
if checkRing>0:
|
||||
status=False
|
||||
|
||||
while not status:
|
||||
id1_status=get_id_control(1)
|
||||
id2_status=get_id_control(2)
|
||||
ring_status=get_ring_status()
|
||||
if old_ring_status != ring_status:
|
||||
if ring_status == 0:
|
||||
log("Machine down")
|
||||
checkRing=2
|
||||
elif ring_status == 1:
|
||||
log("Inj. Stopped")
|
||||
checkRing=2
|
||||
elif ring_status == 2:
|
||||
log("Accumulating.")
|
||||
checkRing=2
|
||||
elif ring_status == 3:
|
||||
log("Accumulating")
|
||||
checkRing=2
|
||||
elif ring_status == 4:
|
||||
log("Top-up ready, Gap still open")
|
||||
checkRing=2
|
||||
elif ring_status == 5:
|
||||
log("Light-Available, no OFB")
|
||||
checkRing=2
|
||||
elif ring_status == 6:
|
||||
log("Light Available")
|
||||
checkRing=2
|
||||
old_ring_status=ring_status
|
||||
status= (ring_status ==6) and (id1_status==1) and (id2_status==1)
|
||||
if not wait:
|
||||
raise Exception ("Ring error: " + str(ring_status))
|
||||
time.sleep(1)
|
||||
print "Machine ok"
|
||||
|
||||
# ring_status=get_ring_status()
|
||||
# old_ring_status=ring_status
|
||||
# checkRing=0
|
||||
#
|
||||
# if ring_status==5:
|
||||
# log ("FB off")
|
||||
# #checkRing=1
|
||||
# if ring_status==0:
|
||||
# log ("Machine down")
|
||||
# checkRing=2
|
||||
#
|
||||
# if checkRing>0:
|
||||
# status=False
|
||||
#
|
||||
# while not status:
|
||||
# id1_status=get_id_control(1)
|
||||
# id2_status=get_id_control(2)
|
||||
# ring_status=get_ring_status()
|
||||
# if old_ring_status != ring_status:
|
||||
# if ring_status == 0:
|
||||
# log("Machine down")
|
||||
# checkRing=2
|
||||
# elif ring_status == 1:
|
||||
# log("Inj. Stopped")
|
||||
# checkRing=2
|
||||
# elif ring_status == 2:
|
||||
# log("Accumulating.")
|
||||
# checkRing=2
|
||||
# elif ring_status == 3:
|
||||
# log("Accumulating")
|
||||
# checkRing=2
|
||||
# elif ring_status == 4:
|
||||
# log("Top-up ready, Gap still open")
|
||||
# checkRing=2
|
||||
# elif ring_status == 5:
|
||||
# log("Light-Available, no OFB")
|
||||
# checkRing=2
|
||||
# elif ring_status == 6:
|
||||
# log("Light Available")
|
||||
# checkRing=2
|
||||
# old_ring_status=ring_status
|
||||
# status= (ring_status ==6) and (id1_status==1) and (id2_status==1)
|
||||
# if not wait:
|
||||
# raise Exception ("Ring error: " + str(ring_status))
|
||||
# time.sleep(1)
|
||||
# print "Machine ok"
|
||||
#
|
||||
|
||||
def assert_beamline_ok():
|
||||
print "Checking beamline..."
|
||||
|
||||
Reference in New Issue
Block a user