From 123be5752af46bd1ad836e707b0d4629df0c244a Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Wed, 10 Jun 2015 10:11:22 +0200 Subject: [PATCH] Closedown --- plugins/TestingList.java | 5 +- script/Check Linearity LS.py | 105 ----------------------------------- 2 files changed, 4 insertions(+), 106 deletions(-) delete mode 100644 script/Check Linearity LS.py diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 45cf61e..02cee68 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -394,7 +394,10 @@ public class TestingList extends Panel { //scan through the table and execute the selected tests int row = position; if (row <= jTable1.getRowCount() ) { - bSelected = (boolean) jTable1.getValueAt(row, COL_CHECK); + for(row = position ; row <= jTable1.getRowCount() ; row++){ + bSelected = (boolean) jTable1.getValueAt(row, COL_CHECK); + if(bSelected) break; + } if (bSelected) { sDeviceName = jTable1.getValueAt(row, COL_DEVICENAME).toString(); sTestName = jTable1.getValueAt(row, COL_TESTNAME).toString(); diff --git a/script/Check Linearity LS.py b/script/Check Linearity LS.py deleted file mode 100644 index 6f00f44..0000000 --- a/script/Check Linearity LS.py +++ /dev/null @@ -1,105 +0,0 @@ -#Script imported from: Check Linearity LS.xml - -#Pre-actions -#p = subproccess.Popen('/bin/sleep 2' +, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -#p.communicate() -#ret = p.returncode -#if ret <> true: -# raise Exception('Script returned with an exit value not equal to 0') -caput('PO2TC-NCS-LS:MOTOR.VELO', '50') -caput('PO2TC-NCS-LS:DEMAND', '350') - -#TODO: Set the diplay names of positioners and detectors -scan = ManualScan(['idCOUNT'], ['idMSTA', 'idRVAL', 'idRRBV', 'idRBV', 'idVAL', 'idATHM', 'idENCODERraw', 'idENCODER', 'idRDY', 'idILK', 'idDiff', 'idResult'] , [0.0], [200.0], [200]) -scan.start() - -#Creating channels: dimension 1 -#PseudoPositioner idCOUNT -#ScalarDetector idMSTA -idMSTA = Channel('PO2TC-NCS-LS:MOTOR.MSTA', type = 'd') -#ScalarDetector idRVAL -idRVAL = Channel('PO2TC-NCS-LS:MOTOR.RVAL', type = 'd') -#ScalarDetector idRRBV -idRRBV = Channel('PO2TC-NCS-LS:MOTOR.RRBV', type = 'd') -#ScalarDetector idRBV -idRBV = Channel('PO2TC-NCS-LS:MOTOR.RBV', type = 'd') -#ScalarDetector idVAL -idVAL = Channel('PO2TC-NCS-LS:MOTOR.VAL', type = 'd') -#ScalarDetector idATHM -idATHM = Channel('PO2TC-NCS-LS:MOTOR.ATHM', type = 'd') -#ScalarDetector idENCODERraw -idENCODERraw = Channel('PO2TC-NCS-LS:ENCODERraw', type = 'd') -#ScalarDetector idENCODER -idENCODER = Channel('PO2TC-NCS-LS:ENCODER', type = 'd') -#ScalarDetector idRDY -idRDY = Channel('PO2TC-NCS-LS:RDY', type = 'd') -#ScalarDetector idILK -idILK = Channel('PO2TC-NCS-LS:ILK', type = 'd') - -#Dimension 1 -#PseudoPositioner idCOUNT -for setpoint1 in range(0, 200): - readback1 = setpoint1 - sleep( 0.02 ) # Settling time - #Detector idMSTA - detector1 = idMSTA.get() - #Detector idRVAL - detector2 = idRVAL.get() - #Detector idRRBV - detector3 = idRRBV.get() - #Detector idRBV - detector4 = idRBV.get() - #Detector idVAL - detector5 = idVAL.get() - #Detector idATHM - detector6 = idATHM.get() - #Detector idENCODERraw - detector7 = idENCODERraw.get() - #Detector idENCODER - detector8 = idENCODER.get() - #Detector idRDY - detector9 = idRDY.get() - #Detector idILK - detector10 = idILK.get() - #Manipulation idResult - #Variable Mappings - diff = idDiff - count = setpoint1 - if (count < 160) and (diff < -5): - return( 1, "The motor/encoder position difference signal exceeded the lower limit (-5 deg)" ) - if (count < 160) and (diff > 5): - return( 2, "The motor/encoder position difference signal exceeded the upper limit (+5 deg)" ) - if (count > 160) and (diff < -0.5): - idResult = ( 3, "Note: The position difference at the end of movement was too great (more than -0.5 deg)" ) - if (count > 160) and (diff > 0.5): - idResult = ( 4, "Note: The position difference at the end of movement was too great (more than 0.5 deg)" ) - if (count < 160): - idResult = ( 0, "Note: The motor drive linearity check did not yet complete.") - else: - idResult = ( 0, "The motor drive linearity was within the acceptable limits.") - - #Manipulation idDiff - #Variable Mappings - a = detector4 - b = detector8 - count = setpoint1 - idDiff = a-b - scan.append ([setpoint1], [readback1], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, detector9, detector10, idResult, idDiff]) - -#Closing channels -idMSTA.close() -idRVAL.close() -idRRBV.close() -idRBV.close() -idVAL.close() -idATHM.close() -idENCODERraw.close() -idENCODER.close() -idRDY.close() -idILK.close() - -scan.end() - -#Post-actions -caput('PO2TC-NCS-LS:MOTOR.VELO', '270') -caput('PO2TC-NCS-LS:DEMAND', '0')