Script execution
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
#Script imported from: PTEST-VME-HW_mot.xml
|
||||
|
||||
#Pre-actions
|
||||
caput('PTEST-VME-HW:MOTOR.TWF', '0')
|
||||
sleep(0.5)
|
||||
caput('PTEST-VME-HW:MOTOR.RDBD', '0.1')
|
||||
|
||||
#TODO: Set the diplay names of positioners and detectors
|
||||
scan = ManualScan(['VAL'], ['time', 'RVAL', 'TWF', 'RBV', 'Busy'] , [40.0], [44.0], [22])
|
||||
scan.start()
|
||||
|
||||
#Creating channels: dimension 1
|
||||
#RegionPositioner VAL
|
||||
VAL = Channel('PTEST-VME-HW:MOTOR.VAL', type = 'd')
|
||||
VALReadback = Channel('PTEST-VME-HW:MOTOR.RBV', type = 'd')
|
||||
#Timestamp time
|
||||
#ScalarDetector RVAL
|
||||
RVAL = Channel('PTEST-VME-HW:MOTOR.RVAL', type = 'd')
|
||||
#ScalarDetector TWF
|
||||
TWF = Channel('PTEST-VME-HW:MOTOR.TWF', type = 'd')
|
||||
#ScalarDetector RBV
|
||||
RBV = Channel('PTEST-VME-HW:MOTOR.RBV', type = 'd')
|
||||
#ScalarDetector Busy
|
||||
Busy = Channel('PTEST-VME-HW:MOTOR.DMOV', type = 'd')
|
||||
|
||||
#Dimension 1
|
||||
#RegionPositioner VAL
|
||||
for setpoint1 in frange(40.0, 42.0, 0.2, True) + frange(41.8, 40.0, 0.2, True):
|
||||
VAL.put(setpoint1, timeout=None) # TODO: Set appropriate timeout
|
||||
readback1 = VALReadback.get()
|
||||
if abs(readback1 - setpoint1) > 0.1 : # TODO: Check accuracy
|
||||
raise Exception('Actor VAL could not be set to the value ' + str(setpoint1))
|
||||
#Detector time
|
||||
detector1 = float(java.lang.System.currentTimeMillis())
|
||||
#Detector RVAL
|
||||
detector2 = RVAL.get()
|
||||
#Detector TWF
|
||||
detector3 = TWF.get()
|
||||
#Detector RBV
|
||||
detector4 = RBV.get()
|
||||
#Detector Busy
|
||||
detector5 = Busy.get()
|
||||
scan.append ([setpoint1], [readback1], [detector1, detector2, detector3, detector4, detector5])
|
||||
|
||||
#Closing channels
|
||||
VAL.close()
|
||||
VALReadback.close()
|
||||
RVAL.close()
|
||||
TWF.close()
|
||||
RBV.close()
|
||||
Busy.close()
|
||||
|
||||
scan.end()
|
||||
|
||||
#Post-actions
|
||||
caput('PTEST-VME-HW:MOTOR.RDBD', '1')
|
||||
Reference in New Issue
Block a user