Script execution

This commit is contained in:
x07maop
2015-07-06 09:39:36 +02:00
parent ba9456d18b
commit 21664ac9ce

View File

@@ -1,7 +1,8 @@
#Script imported from: Fe_hyst_plus.xml
#Parameters
START_FIELD = 6.8
START_FIELD = 1.0
END_FIELD = -1.0
ENERGIES = (707.90, 703.90)
#Pre-actions
@@ -13,7 +14,7 @@ sleep(1.0)
#cawait('X07MA-ID:DONE', 'DONE', type = 's')
caputq('X07MA-PC:CSCALER.INPB', '1')
caputq('X07MA-PC-PS2:SET:DMD:RAMPRATE:TPM', '2.0')
sleep(15.0)
#sleep(15.0)
#TODO: Set the diplay names of positioners and detectors
scan = ManualScan(['index', 'Energy'], ['FieldRbk', 'TEY', 'I0', 'trans', 'polarization', 'polAngle', 'temperature', 'RingCurrent', 'fieldAnalogX', 'tey_norm', 'trans_norm'] , [0.0, 703.9], [80.0, 707.9], [80, 1])
@@ -50,7 +51,12 @@ fieldAnalogX = Channel('X07MA-ES1-AI:SIGNAL4', type = 'd')
#Dimension 1
#RegionPositioner field
#Region 1 pre-actions
caputq('X07MA-PC-PS2:M:GO.A', START_FIELD)
print "Waiting for start field"
caput('X07MA-PC-PS2:M:GO.A', START_FIELD)
print "Set end field"
caputq('X07MA-PC-PS2:M:GO.A', END_FIELD)
index = 0
while(True):
@@ -98,6 +104,7 @@ while(True):
scan.append ([index, setpoint2], [index, readback2], [field_readback, detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, tey_norm, trans_norm])
print "Field = " + fieldReadback.get()
if ramp_done.get() == 1: #If not ramping
print "Not ramping, breaking execution"
break