From ee7698ccdc281fb50de98511d17b33df1ca20eb5 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Tue, 16 May 2017 11:44:07 +0200 Subject: [PATCH] Startup --- script/tests/templates/testTemplate.py | 2 ++ script/tests/tests.properties | 10 +++---- .../Calibrate/Calibrate.py | 4 +-- .../Drive Out/Drive Out.py | 4 +-- .../Monitor Movement/Monitor Movement.py | 4 +-- .../Motor Test 1/Motor Test 1.py | 4 +-- .../Motor Test 1/Motor Test 1.py.bak | 4 +-- .../Motor Test 2/Motor Test 2.py | 4 +-- .../Motor Test 2/Motor Test 2.py.bak | 4 +-- .../Motor Test 3/Motor Test 3.py | 4 +-- .../Move Ref 1/Move Ref 1 - Copy.py | 4 +-- .../Move Ref 1/Move Ref 1.py | 4 +-- .../Move Ref 2/Move Ref 2.py | 4 +-- .../monitorAllParams/monitorAllParams.py | 4 +-- .../Calibrate test vme/Calibrate test vme.py | 2 +- .../Go to specific position.py | 4 +-- .../Motor Test 1/Motor Test 1.py | 4 +-- .../Motor Test 2/Motor Test 2.py | 4 +-- .../Display Test/Display Test.py | 4 +-- .../Calibrate-try-to-use-external-module.py | 4 +-- .../Linear Slide Tests/Calibrate/Calibrate.py | 4 +-- .../Check Linearity/Check Linearity - Copy.py | 4 +-- .../Check Linearity/Check Linearity.py | 4 +-- .../tests/tests/PS Tests/newTest/newTest.py | 4 +-- .../playground-pw84/playground-pw84.py | 3 +- ...-supply-A - Copy works with testcommons.py | 4 +-- .../power-supply-A/power-supply-A - Copy.py | 4 +-- .../PS Tests/power-supply-A/power-supply-A.py | 6 ++-- .../power-supply-B/power-supply-B - Copy.py | 4 +-- .../PS Tests/power-supply-B/power-supply-B.py | 7 +++-- .../test without ioc - Copy.py | 4 +-- .../test without ioc 2/test without ioc 2.py | 4 +-- .../test without ioc - Copy.py | 4 +-- .../test without ioc 3/test without ioc 3.py | 4 +-- .../test without ioc - Copy.py | 4 +-- .../test without ioc/test without ioc.py | 28 +++++++++---------- .../Calibrate/Calibrate.py | 4 +-- .../Check Linearity/Check Linearity.py | 4 +-- .../Monitor All/Monitor All - Copy.py | 4 +-- .../Monitor All/Monitor All.py | 4 +-- script/tests/tests/sad/sdd/sdd.py | 4 +-- 41 files changed, 101 insertions(+), 93 deletions(-) diff --git a/script/tests/templates/testTemplate.py b/script/tests/templates/testTemplate.py index 34d343e..0031187 100644 --- a/script/tests/templates/testTemplate.py +++ b/script/tests/templates/testTemplate.py @@ -151,11 +151,13 @@ def startTest(testName, DEVICE, params): test.sendFeedback(ret, success) except (KeyboardInterrupt): # user stop error handler. + import traceback ret = 'Test stopped by user.' success = False test.sendFeedback(ret, success) except: # generic error handler. + import traceback ret = traceback.format_exc() success = False test.sendFeedback(ret, success) diff --git a/script/tests/tests.properties b/script/tests/tests.properties index 986d91a..ed448db 100644 --- a/script/tests/tests.properties +++ b/script/tests/tests.properties @@ -1,5 +1,5 @@ -#TestingList for pshell: configuration properties -#Fri May 12 18:14:37 CEST 2017 -customPanel= -showEnabledTestsOnly=true -listFilter=LabTests +#TestingList for pshell: configuration properties +#Tue May 16 11:43:50 CEST 2017 +customPanel= +showEnabledTestsOnly=true +listFilter=LabTests diff --git a/script/tests/tests/Collimator Tests pro/Calibrate/Calibrate.py b/script/tests/tests/Collimator Tests pro/Calibrate/Calibrate.py index 69c57c2..344762f 100644 --- a/script/tests/tests/Collimator Tests pro/Calibrate/Calibrate.py +++ b/script/tests/tests/Collimator Tests pro/Calibrate/Calibrate.py @@ -7,7 +7,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test 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 # put the whole custom code under try/catch try: @@ -23,7 +23,7 @@ def startTest(testName, DEVICE, params): 'Diameter (DIAM:2)', 'Logical Position (IST:2)', 'Motor Pos Raw (IST3:1)','Poti Pos From Beam (IST1:2)', 'Poti Raw (POSA:1)', 'Poti Ref1 Position (REF1:1)', 'Poti Ref2 Position (REF2:1)']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() try: diff --git a/script/tests/tests/Collimator Tests pro/Drive Out/Drive Out.py b/script/tests/tests/Collimator Tests pro/Drive Out/Drive Out.py index e6c7a58..53b0594 100644 --- a/script/tests/tests/Collimator Tests pro/Drive Out/Drive Out.py +++ b/script/tests/tests/Collimator Tests pro/Drive Out/Drive Out.py @@ -9,7 +9,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test 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 # put the whole custom code under try/catch try: @@ -25,7 +25,7 @@ def startTest(testName, DEVICE, params): 'Diameter (DIAM:2)', 'Com (COM:2)', 'Logical Position (IST:2)', 'Motor Pos Raw (IST3:1)','Poti Pos From Beam (IST1:2)', 'Poti Raw (POSA:1)', 'Poti Ref1 Position (REF1:1)', 'Poti Ref2 Position (REF2:1)']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() try: diff --git a/script/tests/tests/Collimator Tests pro/Monitor Movement/Monitor Movement.py b/script/tests/tests/Collimator Tests pro/Monitor Movement/Monitor Movement.py index d877c75..f86235b 100644 --- a/script/tests/tests/Collimator Tests pro/Monitor Movement/Monitor Movement.py +++ b/script/tests/tests/Collimator Tests pro/Monitor Movement/Monitor Movement.py @@ -7,7 +7,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -34,7 +34,7 @@ def startTest(testName, DEVICE, params): #get parameters from the calling interface scan = ManualScan(['time [1/'+ str(1/samplePeriod) + ' s]'], ['Motor Pos (IST3:2)', 'Poti Position (IST2:1)', 'Motor Pos - Poti Pos'] ) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 diff --git a/script/tests/tests/Collimator Tests pro/Motor Test 1/Motor Test 1.py b/script/tests/tests/Collimator Tests pro/Motor Test 1/Motor Test 1.py index e141279..e449c36 100644 --- a/script/tests/tests/Collimator Tests pro/Motor Test 1/Motor Test 1.py +++ b/script/tests/tests/Collimator Tests pro/Motor Test 1/Motor Test 1.py @@ -11,7 +11,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test 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 # put the whole custom code under try/catch try: @@ -51,7 +51,7 @@ def startTest(testName, DEVICE, params): 'Poti Ref2 Position (REF2:1)']) p1 = plot(None, name = "Motor Position - Btvs Poti Position", context = plotName + " pos difference")[0] - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() # Creating channels: dimension 1 try: diff --git a/script/tests/tests/Collimator Tests pro/Motor Test 1/Motor Test 1.py.bak b/script/tests/tests/Collimator Tests pro/Motor Test 1/Motor Test 1.py.bak index 8cde793..0d66c9a 100644 --- a/script/tests/tests/Collimator Tests pro/Motor Test 1/Motor Test 1.py.bak +++ b/script/tests/tests/Collimator Tests pro/Motor Test 1/Motor Test 1.py.bak @@ -11,7 +11,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test 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 # put the whole custom code under try/catch try: @@ -42,7 +42,7 @@ def startTest(testName, DEVICE, params): 'Btvs Raw (IST3:1)','Motor Position (IST1:2)', 'Poti Raw (POSA:1)', 'Poti Ref1 Position (REF1:1)', 'Poti Ref2 Position (REF2:1)']) p1 = plot(None, name = "Poti Pos From Beam - Motor Position", context = plotName + " pos difference")[0] - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() # Creating channels: dimension 1 try: diff --git a/script/tests/tests/Collimator Tests pro/Motor Test 2/Motor Test 2.py b/script/tests/tests/Collimator Tests pro/Motor Test 2/Motor Test 2.py index 09e806a..5cb7aa4 100644 --- a/script/tests/tests/Collimator Tests pro/Motor Test 2/Motor Test 2.py +++ b/script/tests/tests/Collimator Tests pro/Motor Test 2/Motor Test 2.py @@ -10,7 +10,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test 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 # put the whole custom code under try/catch try: @@ -41,7 +41,7 @@ def startTest(testName, DEVICE, params): 'Diameter (DIAM:2)', 'Logical Position (IST:2)', 'Btvs Raw (IST3:1)','Motor Position (IST1:2)', 'Poti Raw (POSA:1)', 'Poti Ref1 Position (REF1:1)', 'Poti Ref2 Position (REF2:1)']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() # coloured plot (one colour per scan) p1 = plot(None, name="Motor Position - Btvs Poti Position", context=plotName + " difference")[0] diff --git a/script/tests/tests/Collimator Tests pro/Motor Test 2/Motor Test 2.py.bak b/script/tests/tests/Collimator Tests pro/Motor Test 2/Motor Test 2.py.bak index 7fef0f6..0ef89b0 100644 --- a/script/tests/tests/Collimator Tests pro/Motor Test 2/Motor Test 2.py.bak +++ b/script/tests/tests/Collimator Tests pro/Motor Test 2/Motor Test 2.py.bak @@ -10,7 +10,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test 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 # put the whole custom code under try/catch try: @@ -40,7 +40,7 @@ def startTest(testName, DEVICE, params): 'Diameter (DIAM:2)', 'Logical Position (IST:2)', 'Motor Pos Raw (IST3:1)','Poti Pos From Beam (IST1:2)', 'Poti Raw (POSA:1)', 'Poti Ref1 Position (REF1:1)', 'Poti Ref2 Position (REF2:1)']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() # coloured plot (one colour per scan) p1 = plot(None, name="Poti-Increment difference", context=plotName + " difference")[0] diff --git a/script/tests/tests/Collimator Tests pro/Motor Test 3/Motor Test 3.py b/script/tests/tests/Collimator Tests pro/Motor Test 3/Motor Test 3.py index e01781f..1a8d2b1 100644 --- a/script/tests/tests/Collimator Tests pro/Motor Test 3/Motor Test 3.py +++ b/script/tests/tests/Collimator Tests pro/Motor Test 3/Motor Test 3.py @@ -9,7 +9,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -46,7 +46,7 @@ def startTest(testName, DEVICE, params): 'Poti Raw (POSA:1)', 'Poti Ref1 Position (REF1:1)', 'Poti Ref2 Position (REF2:1)']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() p1 = plot(None, name = "Motor Position - Btvs Poti Position", context = plotName + " Motor-Poti difference")[0] # Creating channels diff --git a/script/tests/tests/Collimator Tests pro/Move Ref 1/Move Ref 1 - Copy.py b/script/tests/tests/Collimator Tests pro/Move Ref 1/Move Ref 1 - Copy.py index 9272085..ebcd9cb 100644 --- a/script/tests/tests/Collimator Tests pro/Move Ref 1/Move Ref 1 - Copy.py +++ b/script/tests/tests/Collimator Tests pro/Move Ref 1/Move Ref 1 - Copy.py @@ -6,7 +6,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 ####### #get parameters from the calling interface @@ -14,7 +14,7 @@ def startTest(testName, DEVICE, params): print_log(testName, DEVICE, 'parameters:' + str( params) ) print_log(testName, DEVICE, 'device: ' + DEVICE ) scan = ManualScan(['time'], ['idMotorStep', 'idPotiPosition', 'idPotiRef1Position','idMotorStep-idPotiPosition'] , [0.0], [30.0], [20]) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 diff --git a/script/tests/tests/Collimator Tests pro/Move Ref 1/Move Ref 1.py b/script/tests/tests/Collimator Tests pro/Move Ref 1/Move Ref 1.py index 1d6e853..0a631ac 100644 --- a/script/tests/tests/Collimator Tests pro/Move Ref 1/Move Ref 1.py +++ b/script/tests/tests/Collimator Tests pro/Move Ref 1/Move Ref 1.py @@ -10,7 +10,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test 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 # put the whole custom code under try/catch try: @@ -26,7 +26,7 @@ def startTest(testName, DEVICE, params): 'Diameter (DIAM:2)', 'Com (COM:2)', 'Logical Position (IST:2)', 'Motor Pos Raw (IST3:1)','Poti Pos From Beam (IST1:2)', 'Poti Raw (POSA:1)', 'Poti Ref1 Position (REF1:1)', 'Poti Ref2 Position (REF2:1)']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() try: diff --git a/script/tests/tests/Collimator Tests pro/Move Ref 2/Move Ref 2.py b/script/tests/tests/Collimator Tests pro/Move Ref 2/Move Ref 2.py index 286ce9a..ea100da 100644 --- a/script/tests/tests/Collimator Tests pro/Move Ref 2/Move Ref 2.py +++ b/script/tests/tests/Collimator Tests pro/Move Ref 2/Move Ref 2.py @@ -10,7 +10,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test 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 # put the whole custom code under try/catch try: @@ -26,7 +26,7 @@ def startTest(testName, DEVICE, params): 'Diameter (DIAM:2)', 'Com (COM:2)', 'Logical Position (IST:2)', 'Motor Pos Raw (IST3:1)','Poti Pos From Beam (IST1:2)', 'Poti Raw (POSA:1)', 'Poti Ref1 Position (REF1:1)', 'Poti Ref2 Position (REF2:1)']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() try: diff --git a/script/tests/tests/Collimator Tests pro/monitorAllParams/monitorAllParams.py b/script/tests/tests/Collimator Tests pro/monitorAllParams/monitorAllParams.py index b9a9396..529764f 100644 --- a/script/tests/tests/Collimator Tests pro/monitorAllParams/monitorAllParams.py +++ b/script/tests/tests/Collimator Tests pro/monitorAllParams/monitorAllParams.py @@ -10,7 +10,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test 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 # put the whole custom code under try/catch try: @@ -77,7 +77,7 @@ def startTest(testName, DEVICE, params): # initialise plot tab with 2 plots scan = ManualScan(['sample'], ['Motor Status (MSTA)', 'Motor Position (VAL)']) # set plot name(tab title) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) # start plots. See further below how to add points to the plots scan.start() diff --git a/script/tests/tests/Collimator Tests/Calibrate test vme/Calibrate test vme.py b/script/tests/tests/Collimator Tests/Calibrate test vme/Calibrate test vme.py index 37f0441..d47c358 100644 --- a/script/tests/tests/Collimator Tests/Calibrate test vme/Calibrate test vme.py +++ b/script/tests/tests/Collimator Tests/Calibrate test vme/Calibrate test vme.py @@ -11,7 +11,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 ####### diff --git a/script/tests/tests/Collimator Tests/Go to specific position/Go to specific position.py b/script/tests/tests/Collimator Tests/Go to specific position/Go to specific position.py index 261ab72..18616d1 100644 --- a/script/tests/tests/Collimator Tests/Go to specific position/Go to specific position.py +++ b/script/tests/tests/Collimator Tests/Go to specific position/Go to specific position.py @@ -30,7 +30,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 ####### @@ -51,7 +51,7 @@ def startTest(testName, DEVICE, params): #scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idEncoderPosition', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20]) scan = ManualScan(['idX'], ['idMotorStatus', 'idMotorPosition', 'idEncoderPosition', 'idError']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 diff --git a/script/tests/tests/Collimator Tests/Motor Test 1/Motor Test 1.py b/script/tests/tests/Collimator Tests/Motor Test 1/Motor Test 1.py index cc7fa1f..95dcf4d 100644 --- a/script/tests/tests/Collimator Tests/Motor Test 1/Motor Test 1.py +++ b/script/tests/tests/Collimator Tests/Motor Test 1/Motor Test 1.py @@ -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 ######## @@ -50,7 +50,7 @@ def startTest(testName, DEVICE, params): #TODO: Set the diplay names of positioners and detectors #scan = ManualScan(['idX', 'idInkr'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [-0.5, 0.0], [4.0, 3000.0], [3000, 20]) scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20]) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 try: diff --git a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py index 4687da7..b5ca1ad 100644 --- a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py +++ b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py @@ -13,7 +13,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 ####### @@ -31,7 +31,7 @@ def startTest(testName, DEVICE, params): #scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20]) scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 diff --git a/script/tests/tests/Display Tests/Display Test/Display Test.py b/script/tests/tests/Display Tests/Display Test/Display Test.py index 507cbf2..bc2f098 100644 --- a/script/tests/tests/Display Tests/Display Test/Display Test.py +++ b/script/tests/tests/Display Tests/Display Test/Display Test.py @@ -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 ####### @@ -49,7 +49,7 @@ def startTest(testName, DEVICE, params): return scan = ManualScan(['idX'], ['idPositioner'] ) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() try: idInit = Channel(DEVICE+':DEMAND', type = 'l') diff --git a/script/tests/tests/Linear Slide Tests/Calibrate/Calibrate-try-to-use-external-module.py b/script/tests/tests/Linear Slide Tests/Calibrate/Calibrate-try-to-use-external-module.py index d3703b6..d261ea7 100644 --- a/script/tests/tests/Linear Slide Tests/Calibrate/Calibrate-try-to-use-external-module.py +++ b/script/tests/tests/Linear Slide Tests/Calibrate/Calibrate-try-to-use-external-module.py @@ -18,7 +18,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 ####### @@ -46,7 +46,7 @@ def startTest(testName, DEVICE, params): return scan = ManualScan(['idX'], ['Motor Position (RBV)', 'Encoder Position (ENCODER)', 'Diff Motor - Encoder'] ) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 try: diff --git a/script/tests/tests/Linear Slide Tests/Calibrate/Calibrate.py b/script/tests/tests/Linear Slide Tests/Calibrate/Calibrate.py index 9f40785..08f215d 100644 --- a/script/tests/tests/Linear Slide Tests/Calibrate/Calibrate.py +++ b/script/tests/tests/Linear Slide Tests/Calibrate/Calibrate.py @@ -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'], ['Motor Position (RBV)', 'Encoder Position (ENCODER)', 'Diff Motor - Encoder'] ) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 try: diff --git a/script/tests/tests/Linear Slide Tests/Check Linearity/Check Linearity - Copy.py b/script/tests/tests/Linear Slide Tests/Check Linearity/Check Linearity - Copy.py index 2dc8fe3..f70c42c 100644 --- a/script/tests/tests/Linear Slide Tests/Check Linearity/Check Linearity - Copy.py +++ b/script/tests/tests/Linear Slide Tests/Check Linearity/Check Linearity - Copy.py @@ -30,7 +30,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 ####### @@ -51,7 +51,7 @@ def startTest(testName, DEVICE, params): #scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idEncoderPosition', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20]) scan = ManualScan(['idX'], ['idMotorStatus', 'idMotorPosition', 'idEncoderPosition', 'idError']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 diff --git a/script/tests/tests/Linear Slide Tests/Check Linearity/Check Linearity.py b/script/tests/tests/Linear Slide Tests/Check Linearity/Check Linearity.py index 4a1ef55..e0b31fe 100644 --- a/script/tests/tests/Linear Slide Tests/Check Linearity/Check Linearity.py +++ b/script/tests/tests/Linear Slide Tests/Check Linearity/Check Linearity.py @@ -9,7 +9,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -36,7 +36,7 @@ def startTest(testName, DEVICE, params): #scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idEncoderPosition', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20]) scan = ManualScan(['idX'], ['idMotorStatus', 'idMotorPosition', 'idEncoderPosition', 'idError']) - scan.setPlotName(plotName + " parameters") + scan.setPlotTitle(plotName + " parameters") scan.start() #coloured plot (one colour per scan) diff --git a/script/tests/tests/PS Tests/newTest/newTest.py b/script/tests/tests/PS Tests/newTest/newTest.py index c6336df..8179606 100644 --- a/script/tests/tests/PS Tests/newTest/newTest.py +++ b/script/tests/tests/PS Tests/newTest/newTest.py @@ -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() diff --git a/script/tests/tests/PS Tests/playground-pw84/playground-pw84.py b/script/tests/tests/PS Tests/playground-pw84/playground-pw84.py index 1105544..787fe8a 100644 --- a/script/tests/tests/PS Tests/playground-pw84/playground-pw84.py +++ b/script/tests/tests/PS Tests/playground-pw84/playground-pw84.py @@ -14,7 +14,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test failed ret = 'Test failed' status = 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 # put the whole custom code under try/catch try: @@ -110,6 +110,7 @@ def startTest(testName, DEVICE, params): test.sendFeedback(ret, success) except (KeyboardInterrupt): # user stop error handler + import traceback ret = 'Test stopped by user.' success = False test.sendFeedback(ret, success) diff --git a/script/tests/tests/PS Tests/power-supply-A/power-supply-A - Copy works with testcommons.py b/script/tests/tests/PS Tests/power-supply-A/power-supply-A - Copy works with testcommons.py index 4cf0134..3e801ae 100644 --- a/script/tests/tests/PS Tests/power-supply-A/power-supply-A - Copy works with testcommons.py +++ b/script/tests/tests/PS Tests/power-supply-A/power-supply-A - Copy works with testcommons.py @@ -19,7 +19,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 ####### @@ -29,7 +29,7 @@ def startTest(testName, DEVICE, params): print_log(testName, DEVICE, '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: #Creating channels: dimension 1 diff --git a/script/tests/tests/PS Tests/power-supply-A/power-supply-A - Copy.py b/script/tests/tests/PS Tests/power-supply-A/power-supply-A - Copy.py index 1a9bb16..5389446 100644 --- a/script/tests/tests/PS Tests/power-supply-A/power-supply-A - Copy.py +++ b/script/tests/tests/PS Tests/power-supply-A/power-supply-A - Copy.py @@ -27,7 +27,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 ####### @@ -37,7 +37,7 @@ def startTest(testName, DEVICE, params): print_log(testName, DEVICE, '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: diff --git a/script/tests/tests/PS Tests/power-supply-A/power-supply-A.py b/script/tests/tests/PS Tests/power-supply-A/power-supply-A.py index 7d31f26..914bcd5 100644 --- a/script/tests/tests/PS Tests/power-supply-A/power-supply-A.py +++ b/script/tests/tests/PS Tests/power-supply-A/power-supply-A.py @@ -7,7 +7,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -22,7 +22,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: @@ -102,11 +102,13 @@ def startTest(testName, DEVICE, params): test.sendFeedback(ret, success) except (KeyboardInterrupt): #user stop error handler + import traceback ret = 'Test stopped by user.' success = False test.sendFeedback(ret, success) except: #generic error handler + import traceback ret = traceback.format_exc() success = False test.sendFeedback(ret, success) diff --git a/script/tests/tests/PS Tests/power-supply-B/power-supply-B - Copy.py b/script/tests/tests/PS Tests/power-supply-B/power-supply-B - Copy.py index 48849b0..f4b9d72 100644 --- a/script/tests/tests/PS Tests/power-supply-B/power-supply-B - Copy.py +++ b/script/tests/tests/PS Tests/power-supply-B/power-supply-B - Copy.py @@ -26,7 +26,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 ############# print_log(testName, DEVICE, 'testpath B: ' + testPath ) @@ -34,7 +34,7 @@ def startTest(testName, DEVICE, params): print_log(testName, DEVICE, 'device: ' + DEVICE ) #scan = ManualScan(['time'], ['SetVB', 'ActualVB', 'ActualIB'] , [0.0], [30.0], [20]) scan = ManualScan(['time'], ['SetVB', 'ActualVB', 'ActualIB'] ) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 diff --git a/script/tests/tests/PS Tests/power-supply-B/power-supply-B.py b/script/tests/tests/PS Tests/power-supply-B/power-supply-B.py index 8f4baaa..bab49a9 100644 --- a/script/tests/tests/PS Tests/power-supply-B/power-supply-B.py +++ b/script/tests/tests/PS Tests/power-supply-B/power-supply-B.py @@ -7,7 +7,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -22,7 +22,7 @@ def startTest(testName, DEVICE, params): test.log( 'device: ' + DEVICE ) #scan = ManualScan(['time'], ['SetVB', 'ActualVB', 'ActualIB'] , [0.0], [30.0], [20]) scan = ManualScan(['time'], ['SetVB', 'ActualVB', 'ActualIB'] ) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 @@ -41,6 +41,7 @@ def startTest(testName, DEVICE, params): ActualIA = Channel(DEVICE + ':Actual-IB', type = 'd') #ActualIA = Channel('pw84:ai', type = 'd') except: + import traceback test.sendFeedback( 'Unable to create channel - ' + traceback.format_exc(), False) return #Init @@ -97,11 +98,13 @@ def startTest(testName, DEVICE, params): test.sendFeedback(ret, success) except (KeyboardInterrupt): #user stop error handler + import traceback ret = 'Test stopped by user.' success = False test.sendFeedback(ret, success) except: #generic error handler + import traceback ret = traceback.format_exc() success = False test.sendFeedback(ret, success) diff --git a/script/tests/tests/PS Tests/test without ioc 2/test without ioc - Copy.py b/script/tests/tests/PS Tests/test without ioc 2/test without ioc - Copy.py index f500719..ea70a3c 100644 --- a/script/tests/tests/PS Tests/test without ioc 2/test without ioc - Copy.py +++ b/script/tests/tests/PS Tests/test without ioc 2/test without ioc - Copy.py @@ -9,7 +9,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -74,7 +74,7 @@ def startTest(testName, DEVICE, params): #initialise plot tab with 2 plots scan = ManualScan(['sample'], ['Motor Status (MSTA)', 'Motor Position (VAL)'] ) #set plot name(tab title) - scan.setPlotName(plotName + "Manual Scan") + scan.setPlotTitle(plotName + "Manual Scan") #start plots. See further below how to add points to the plots scan.start() diff --git a/script/tests/tests/PS Tests/test without ioc 2/test without ioc 2.py b/script/tests/tests/PS Tests/test without ioc 2/test without ioc 2.py index c9ebf4d..76626d6 100644 --- a/script/tests/tests/PS Tests/test without ioc 2/test without ioc 2.py +++ b/script/tests/tests/PS Tests/test without ioc 2/test without ioc 2.py @@ -9,7 +9,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -74,7 +74,7 @@ def startTest(testName, DEVICE, params): #initialise plot tab with 2 plots scan = ManualScan(['sample'], ['Motor Status (MSTA)', 'Motor Position (VAL)'] ) #set plot name(tab title) - scan.setPlotName(plotName + " Manual Scan") + scan.setPlotTitle(plotName + " Manual Scan") #start plots. See further below how to add points to the plots scan.start() diff --git a/script/tests/tests/PS Tests/test without ioc 3/test without ioc - Copy.py b/script/tests/tests/PS Tests/test without ioc 3/test without ioc - Copy.py index f500719..ea70a3c 100644 --- a/script/tests/tests/PS Tests/test without ioc 3/test without ioc - Copy.py +++ b/script/tests/tests/PS Tests/test without ioc 3/test without ioc - Copy.py @@ -9,7 +9,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -74,7 +74,7 @@ def startTest(testName, DEVICE, params): #initialise plot tab with 2 plots scan = ManualScan(['sample'], ['Motor Status (MSTA)', 'Motor Position (VAL)'] ) #set plot name(tab title) - scan.setPlotName(plotName + "Manual Scan") + scan.setPlotTitle(plotName + "Manual Scan") #start plots. See further below how to add points to the plots scan.start() diff --git a/script/tests/tests/PS Tests/test without ioc 3/test without ioc 3.py b/script/tests/tests/PS Tests/test without ioc 3/test without ioc 3.py index c9ebf4d..76626d6 100644 --- a/script/tests/tests/PS Tests/test without ioc 3/test without ioc 3.py +++ b/script/tests/tests/PS Tests/test without ioc 3/test without ioc 3.py @@ -9,7 +9,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -74,7 +74,7 @@ def startTest(testName, DEVICE, params): #initialise plot tab with 2 plots scan = ManualScan(['sample'], ['Motor Status (MSTA)', 'Motor Position (VAL)'] ) #set plot name(tab title) - scan.setPlotName(plotName + " Manual Scan") + scan.setPlotTitle(plotName + " Manual Scan") #start plots. See further below how to add points to the plots scan.start() diff --git a/script/tests/tests/PS Tests/test without ioc/test without ioc - Copy.py b/script/tests/tests/PS Tests/test without ioc/test without ioc - Copy.py index f500719..ea70a3c 100644 --- a/script/tests/tests/PS Tests/test without ioc/test without ioc - Copy.py +++ b/script/tests/tests/PS Tests/test without ioc/test without ioc - Copy.py @@ -9,7 +9,7 @@ def startTest(testName, DEVICE, params): #by default, assume the test 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 #put the whole custom code under try/catch try: @@ -74,7 +74,7 @@ def startTest(testName, DEVICE, params): #initialise plot tab with 2 plots scan = ManualScan(['sample'], ['Motor Status (MSTA)', 'Motor Position (VAL)'] ) #set plot name(tab title) - scan.setPlotName(plotName + "Manual Scan") + scan.setPlotTitle(plotName + "Manual Scan") #start plots. See further below how to add points to the plots scan.start() diff --git a/script/tests/tests/PS Tests/test without ioc/test without ioc.py b/script/tests/tests/PS Tests/test without ioc/test without ioc.py index 4616cde..d74f831 100644 --- a/script/tests/tests/PS Tests/test without ioc/test without ioc.py +++ b/script/tests/tests/PS Tests/test without ioc/test without ioc.py @@ -2,18 +2,6 @@ #test that does not use any connection to IOC. It is useful to test pure pshell graphical features. -# testing environment setup (if script is launched directly without Testinglist) -is_panel = get_exec_pars().source != CommandSource.ui -test = "" -device = "" -parameters = "" -if not is_panel: - # set up params for testing - test = "test without ioc" - device = "no-device" - parameters = "{'howManySamples': {'description': 'How many samples are plotted', 'value': '50'}, 'delayBetweenSampleS': {'description': 'delay [s] between two samples', 'value': '0.05'}, 'repeatTimes': {'description': 'how many times the test is repeated', 'value': '3'}}" - pass - ###### Init - DO NOT MODIFY THE CODE BELOW ###### global sys, inspect, os, traceback import sys, inspect, os, traceback @@ -156,12 +144,24 @@ 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) -#launch the test -startTest(test, device, parameters) +# testing environment setup (if script is launched directly without Testinglist) +is_panel = get_exec_pars().source != CommandSource.ui +if not is_panel: + #launch the test with default input + test = "test without ioc" + device = "no-device" + import json + parameters = json.loads('{"howManySamples": {"description": "How many samples are plotted", "value": "50"}, "delayBetweenSampleS": {"description": "delay [s] between two samples", "value": "0.05"}, "repeatTimes": {"description": "how many times the test is repeated", "value": "3"}}') + startTest(test, device, parameters) + #pass +else: + #launch the test with input from tsting list + startTest(test, device, parameters) ################ END OF Final #################### #### IF NEEDED, ADD YOUR FUNCTIONS HERE BELOW #### diff --git a/script/tests/tests/Range Shifter Tests/Calibrate/Calibrate.py b/script/tests/tests/Range Shifter Tests/Calibrate/Calibrate.py index b109908..4d3d31e 100644 --- a/script/tests/tests/Range Shifter Tests/Calibrate/Calibrate.py +++ b/script/tests/tests/Range Shifter Tests/Calibrate/Calibrate.py @@ -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: diff --git a/script/tests/tests/Range Shifter Tests/Check Linearity/Check Linearity.py b/script/tests/tests/Range Shifter Tests/Check Linearity/Check Linearity.py index 2dc8fe3..f70c42c 100644 --- a/script/tests/tests/Range Shifter Tests/Check Linearity/Check Linearity.py +++ b/script/tests/tests/Range Shifter Tests/Check Linearity/Check Linearity.py @@ -30,7 +30,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 ####### @@ -51,7 +51,7 @@ def startTest(testName, DEVICE, params): #scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idEncoderPosition', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20]) scan = ManualScan(['idX'], ['idMotorStatus', 'idMotorPosition', 'idEncoderPosition', 'idError']) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 diff --git a/script/tests/tests/Range Shifter Tests/Monitor All/Monitor All - Copy.py b/script/tests/tests/Range Shifter Tests/Monitor All/Monitor All - Copy.py index 2604c1b..b8688f6 100644 --- a/script/tests/tests/Range Shifter Tests/Monitor All/Monitor All - Copy.py +++ b/script/tests/tests/Range Shifter Tests/Monitor All/Monitor All - Copy.py @@ -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 ####### @@ -48,7 +48,7 @@ def startTest(testName, DEVICE, params): sendFeedback(testPath, testName, DEVICE, ret, success) return scan = ManualScan(['id000000'], ['Motor Status (MSTA)', 'Motor Step Count (RVAL)', 'Motor Position (VAL)', 'Motor Home Switch (ATHM)', 'Encoder Count (ENCODERraw)', 'Encoder Position (ENCODER)', 'Motor/Encoder Diff', 'Drive Ready (RDY)', 'Drive interlock (ILK)', 'CAD_VALA', 'MOTOR_ATHM', 'MOTOR_LLS', 'MOTOR_HLS', 'MOTOR_DMOV', 'CAD_ODIR', 'MOTOR_HOMF', 'MOTOR_RLV', 'MOTOR_STOP', 'MOTOR_SET', 'MOTOR_OFF', 'MOTOR_VAL', 'MOTOR_DVAL', 'MOTOR_DLLM', 'MOTOR_DHLM', 'CAD_VALB', 'CAR_IVAL', 'CAR_IERR', 'SIR_VAL', 'ENCODERraw', 'ENCODERscale', 'ENCODER_oEN', 'ENCODER_HFF', 'FIRST_INIT'] ) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 diff --git a/script/tests/tests/Range Shifter Tests/Monitor All/Monitor All.py b/script/tests/tests/Range Shifter Tests/Monitor All/Monitor All.py index 65cb18c..584af5a 100644 --- a/script/tests/tests/Range Shifter Tests/Monitor All/Monitor All.py +++ b/script/tests/tests/Range Shifter Tests/Monitor All/Monitor All.py @@ -9,7 +9,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 try: #get the path of this script @@ -32,7 +32,7 @@ def startTest(testName, DEVICE, params): return #setup plot scan = ManualScan(['id000000'], ['Motor Status (MSTA)', 'Motor Step Count (RVAL)', 'Motor Position (VAL)', 'Motor Home Switch (ATHM)', 'Encoder Count (ENCODERraw)', 'Encoder Position (ENCODER)', 'Motor/Encoder Diff', 'Drive Ready (RDY)', 'Drive interlock (ILK)', 'CAD_VALA', 'MOTOR_ATHM', 'MOTOR_LLS', 'MOTOR_HLS', 'MOTOR_DMOV', 'CAD_ODIR', 'MOTOR_HOMF', 'MOTOR_RLV', 'MOTOR_STOP', 'MOTOR_SET', 'MOTOR_OFF', 'MOTOR_VAL', 'MOTOR_DVAL', 'MOTOR_DLLM', 'MOTOR_DHLM', 'CAD_VALB', 'CAR_IVAL', 'CAR_IERR', 'SIR_VAL', 'ENCODERraw', 'ENCODERscale', 'ENCODER_oEN', 'ENCODER_HFF', 'FIRST_INIT'] ) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) scan.start() #Creating channels: dimension 1 diff --git a/script/tests/tests/sad/sdd/sdd.py b/script/tests/tests/sad/sdd/sdd.py index 06ad5d3..409511e 100644 --- a/script/tests/tests/sad/sdd/sdd.py +++ b/script/tests/tests/sad/sdd/sdd.py @@ -14,7 +14,7 @@ def startTest(testName, DEVICE, params): # by default, assume the test failed ret = 'Test failed' status = 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 # put the whole custom code under try/catch try: @@ -81,7 +81,7 @@ def startTest(testName, DEVICE, params): # initialise plot tab with 2 plots scan = ManualScan(['sample'], ['Motor Status (MSTA)', 'Motor Position (VAL)']) # set plot name(tab title) - scan.setPlotName(plotName) + scan.setPlotTitle(plotName) # start plots. See further below how to add points to the plots scan.start()