Closedown

This commit is contained in:
boccioli_m
2017-08-25 16:25:57 +02:00
parent b4b1f40c41
commit 32b597bd95
2 changed files with 13 additions and 8 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
#TestingList for pshell: configuration properties
#Wed Aug 23 15:21:43 CEST 2017
customPanel=Kollimators
#Fri Aug 25 16:25:44 CEST 2017
customPanel=
showEnabledTestsOnly=true
listFilter=Collimator
listFilter=testOfTests
@@ -32,7 +32,7 @@ def startTest(testName, DEVICE, params):
return
#get parameters from the calling interface
scan = ManualScan(['time [1/'+ str(1/samplePeriod) + ' s]'],
scan = ManualScan(['time [s]'],
['Motor Pos (IST3:2)', 'Poti Position (IST2:1)', 'Motor Pos - Poti Pos'] )
scan.setPlotTitle(plotName)
scan.start()
@@ -50,23 +50,28 @@ def startTest(testName, DEVICE, params):
test.sendFeedback( 'Unable to create channel - ' + traceback.format_exc(), False)
return
r1 = tscan((idMotorPosition, idPotiPosition), int(monitorTime/0.02), 0.02)
test.log( 'Monitoring movement for ' + str(monitorTime) + 's')
#scan quickly the output during some seconds
timeElapsed=0
while timeElapsed<(monitorTime*10):
startTime=float(java.lang.System.currentTimeMillis())
currentTime = float(java.lang.System.currentTimeMillis())
timeElapsed=currentTime-startTime
while timeElapsed<(monitorTime*1000):
#Detector time
currentTime = float(java.lang.System.currentTimeMillis())
timeElapsed=currentTime-startTime
motorPosition = idMotorPosition.get()
#potiPosFromBeam = idPotiPosFromBeam.get()
potiPosition = idPotiPosition.get()
#potiRef1Position = idPotiRef1Position.get()
#potiRef2Position = idPotiRef2Position.get()
diff1 = motorPosition-potiPosition
scan.append ([currentTime], [currentTime], [motorPosition, potiPosition, diff1])
scan.append ([timeElapsed/1000], [timeElapsed/1000], [motorPosition, potiPosition, diff1])
sleep( samplePeriod ) # Settling time
timeElapsed=timeElapsed+1
#timeElapsed=timeElapsed+1
#Closing channels
idCom.close()