Closedown
This commit is contained in:
@@ -35,7 +35,7 @@ def startTest(testName, DEVICE, params):
|
||||
test.getPath() string, path of this test file
|
||||
test.getName() string, name of this test
|
||||
test.getDeviceName() string, device for which the test must run (typically it is the beginning of a process variable name)
|
||||
test.getPlotName() string, name to be given to the plot when using setPlotName(). Example: scan.setPlotName(test.getPlotName())
|
||||
test.getPlotName() string, name to be given to the plot when using setPlotTitle(). Example: scan.setPlotTitle(test.getPlotName())
|
||||
-----------------------------------
|
||||
GETTING TEST PARAMETERS:
|
||||
-----------------------------------
|
||||
@@ -84,7 +84,7 @@ def startTest(testName, DEVICE, params):
|
||||
# initialise plot tab with 2 plots: pass here the axis names:
|
||||
scan = ManualScan(['sample'], ['Status (MSTA)', 'Position (VAL)'])
|
||||
# set plot name(tab title):
|
||||
scan.setPlotName(test.getPlotName())
|
||||
scan.setPlotTitle(test.getPlotName())
|
||||
# start plots. See further below how to add points to the plots (scan):
|
||||
scan.start()
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#TestingList for pshell: configuration properties
|
||||
#Fri May 12 17:36:14 CEST 2017
|
||||
#Fri May 12 17:55:12 CEST 2017
|
||||
customPanel=
|
||||
showEnabledTestsOnly=true
|
||||
listFilter=LabTests
|
||||
|
||||
@@ -29,7 +29,7 @@ def startTest(testName, DEVICE, params):
|
||||
#by default, failed
|
||||
ret = 'Test failed'
|
||||
success = False
|
||||
#plot name to be given to the scan. Use: scan.setPlotName(plotName)
|
||||
#plot name to be given to the scan. Use: scan.setPlotTitle(plotName)
|
||||
plotName = DEVICE + ' - ' + testName
|
||||
|
||||
###### WRITE YOUR CODE HERE BELOW #######
|
||||
@@ -57,7 +57,7 @@ def startTest(testName, DEVICE, params):
|
||||
return
|
||||
|
||||
scan = ManualScan(['idX'], ['idMotorPosition', 'idEncoderPosition', 'idError'] )
|
||||
scan.setPlotName(plotName)
|
||||
scan.setPlotTitle(plotName)
|
||||
scan.start()
|
||||
#Creating channels: dimension 1
|
||||
try:
|
||||
|
||||
@@ -30,7 +30,7 @@ def startTest(testName, DEVICE, params):
|
||||
test.log( 'device: ' + DEVICE )
|
||||
#scan = ManualScan(['time'], ['SetV', 'ActualV', 'ActualI'] , [0.0], [30.0], [20])
|
||||
scan = ManualScan(['time'], ['SetV', 'ActualV', 'ActualI'])
|
||||
scan.setPlotName(plotName)
|
||||
scan.setPlotTitle(plotName)
|
||||
scan.start()
|
||||
|
||||
try:
|
||||
@@ -115,6 +115,7 @@ def startTest(testName, DEVICE, params):
|
||||
test.sendFeedback(ret, success)
|
||||
except:
|
||||
# generic error handler
|
||||
import traceback
|
||||
ret = traceback.format_exc()
|
||||
success = False
|
||||
test.sendFeedback(ret, success)
|
||||
|
||||
@@ -86,7 +86,7 @@ def startTest(testName, DEVICE, params):
|
||||
scan.start()
|
||||
|
||||
#in this example we initialise also a plot type to show how to add several curves on the same plot
|
||||
p1 = plot(None,name="motor_msta", context = plotName + " Multi curves")[0]
|
||||
p1 = plot(None,name="motor_msta", title = plotName + " Multi curves")[0]
|
||||
#opionally set plot ranges
|
||||
#p1.getAxis(p1.AxisId.X).setRange(0.0,80.0)
|
||||
#p1.getAxis(p1.AxisId.Y).setRange(0.0,70.0)
|
||||
|
||||
Reference in New Issue
Block a user