Script execution
This commit is contained in:
@@ -63,7 +63,7 @@ if abs(field.readback.read() - START_FIELD) > FIELD_PRECISION:
|
||||
else:
|
||||
time.sleep(3.0)
|
||||
wait_device(field_done, 1) #ramp_done.wait_for_value(1.0)
|
||||
wait_device(pol_done, "DONE")
|
||||
|
||||
|
||||
#open(2.0)
|
||||
|
||||
@@ -72,6 +72,9 @@ setpoint2 = ENERGIES[0]
|
||||
print setpoint2
|
||||
energy.write(setpoint2)
|
||||
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
|
||||
|
||||
wait_device(energy_done, 1 )
|
||||
wait_device(pol_done, "DONE")
|
||||
|
||||
print "Set end field"
|
||||
field.write(END_FIELD) #caputq('X07MA-PC-PS2:M:GO.A', END_FIELD)
|
||||
@@ -88,12 +91,15 @@ while(True):
|
||||
energy.write(setpoint2)
|
||||
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
|
||||
else:
|
||||
sleep( 0.1 ) # TODO: Check
|
||||
sleep( 0.25 ) # TODO: Check
|
||||
|
||||
#TODO: change to Controlled variable?
|
||||
readback2 = energy_readback.read() #EnergyReadback.get()
|
||||
if abs(readback2 - setpoint2) > 0.1 : # TODO: Check accuracy
|
||||
raise Exception('Energy could not be set to the value ' + str(setpoint2))
|
||||
# raise Exception('Energy could not be set to the value ' + str(setpoint2))
|
||||
print 'Energy could not be set to the value, try again. ' + str(setpoint2)
|
||||
energy.write(setpoint2)
|
||||
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
|
||||
|
||||
#Detector field readback
|
||||
field_readback = field.readback.read() #fieldReadback.get()
|
||||
|
||||
Reference in New Issue
Block a user