Cleaned tests:
- removed old tests - replaced with tests useful for production (now same for both lab and prod environments)
This commit is contained in:
3
script/tests/devices/DMAF1/.config
Normal file
3
script/tests/devices/DMAF1/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PROF02:DMAF1
|
||||
description=Collimators
|
||||
tests=Collimator Tests pro
|
||||
4
script/tests/devices/PO2DV-NCS-LS/.config
Normal file
4
script/tests/devices/PO2DV-NCS-LS/.config
Normal file
@@ -0,0 +1,4 @@
|
||||
name=PO2DV-NCS-LS
|
||||
description=Optis 2 Linear Slide in test office setup
|
||||
#tests=Collimator Tests
|
||||
tests=Linear Slide Tests
|
||||
3
script/tests/devices/PO2DV-NCS-VHQ1/.config
Normal file
3
script/tests/devices/PO2DV-NCS-VHQ1/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PO2DV-NCS-VHQ1
|
||||
description=Optis 2 Linear Slide in test office setup
|
||||
tests=PS Tests
|
||||
3
script/tests/devices/Production/DMAF1/.config
Normal file
3
script/tests/devices/Production/DMAF1/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PROF02:DMAF1
|
||||
description=Collimators
|
||||
tests=Collimator Tests pro
|
||||
3
script/tests/devices/Production/PO2DV-NCS-VHQ1/.config
Normal file
3
script/tests/devices/Production/PO2DV-NCS-VHQ1/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PO2DV-NCS-VHQ1
|
||||
description=Optis 2 Linear Slide in test office setup
|
||||
tests=PS Tests
|
||||
3
script/tests/devices/Production/PO2TC-NCS-FIXL/.config
Normal file
3
script/tests/devices/Production/PO2TC-NCS-FIXL/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PO2TC-NCS-FIXL
|
||||
description=FIXL: Fixation Light
|
||||
tests=Display Tests
|
||||
3
script/tests/devices/Production/PO2TC-NCS-MWD/.config
Normal file
3
script/tests/devices/Production/PO2TC-NCS-MWD/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PO2TC-NCS-MWD
|
||||
description=MWD: Modulator Wheel Display
|
||||
tests=Display Tests
|
||||
3
script/tests/devices/Production/PO2TC-NCS-RS/.config
Normal file
3
script/tests/devices/Production/PO2TC-NCS-RS/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PO2TC-NCS-RS
|
||||
description=RS: Range Shifter
|
||||
tests=Range Shifter Tests
|
||||
3
script/tests/devices/Production/PO2TC-NCS-SC21/.config
Normal file
3
script/tests/devices/Production/PO2TC-NCS-SC21/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PO2TC-NCS-SC21
|
||||
description=SC21: Scatter Foil 2.1
|
||||
tests=Linear Slide Tests
|
||||
3
script/tests/devices/Production/PO2TC-NCS-SC22/.config
Normal file
3
script/tests/devices/Production/PO2TC-NCS-SC22/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PO2TC-NCS-SC22
|
||||
description=SC21: Scatter Foil 2.2
|
||||
tests=Linear Slide Tests
|
||||
3
script/tests/devices/Production/PO2TC-NCS-SC23/.config
Normal file
3
script/tests/devices/Production/PO2TC-NCS-SC23/.config
Normal file
@@ -0,0 +1,3 @@
|
||||
name=PO2TC-NCS-SC23
|
||||
description=SC23: Scatter Foil 2.3
|
||||
tests=Linear Slide Tests
|
||||
@@ -1,2 +1,2 @@
|
||||
name=Modulator Wheel Display Tests
|
||||
description=Tests on the OPTIS2 Modulator Wheel Display
|
||||
name=Modulator Wheel Display Tests
|
||||
description=Tests on the OPTIS2 Modulator Wheel Display
|
||||
6
script/tests/tests/Display Tests/Display Test/.config
Normal file
6
script/tests/tests/Display Tests/Display Test/.config
Normal file
@@ -0,0 +1,6 @@
|
||||
name=Display Test
|
||||
description=Positioning sequence
|
||||
|
||||
#optional parameters. Description is compulsory. Syntax:
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter2Name>:<parameter2Value>:<Parameter 2 description>]
|
||||
parameters=repeatTimes:2:Repeat N times;delayS:4:Delay between each initialisation [s]
|
||||
@@ -0,0 +1,90 @@
|
||||
|
||||
|
||||
|
||||
###### DO NOT MODIFY THE CODE BELOW ######
|
||||
global print_log, sendFeedback, inspect
|
||||
import sys, inspect, os, traceback
|
||||
|
||||
def print_log(testName, DEVICE, text):
|
||||
time.ctime()
|
||||
now = time.strftime('%Y.%m.%d %H:%M:%S')
|
||||
print now + ' ' + DEVICE + ' - ' + testName + ': ' + str(text)
|
||||
|
||||
#prepare and send feedback to calling tool
|
||||
def sendFeedback(testPath, testName, DEVICE, returnString, testPassed):
|
||||
print_log(testName, DEVICE, 'End of test. Result:')
|
||||
print_log(testName, DEVICE, 'Device: ' + DEVICE)
|
||||
print_log(testName, DEVICE, 'Test name: ' + testName)
|
||||
print_log(testName, DEVICE, 'Test path: ' + testPath)
|
||||
print_log(testName, DEVICE, 'Test passed: ' + str(testPassed))
|
||||
print_log(testName, DEVICE, 'Return string: ' + returnString)
|
||||
ret = [testPath, DEVICE, returnString, testPassed]
|
||||
set_return(ret)
|
||||
|
||||
def startTest(testName, DEVICE, params):
|
||||
try:
|
||||
import traceback
|
||||
#get the path of this script
|
||||
testPath = inspect.getfile(inspect.currentframe())
|
||||
#by default, failed
|
||||
ret = 'Test failed'
|
||||
success = False
|
||||
#plot name to be given to the scan. Use: scan.setPlotName(plotName)
|
||||
plotName = DEVICE + ' - ' + testName
|
||||
|
||||
###### WRITE YOUR CODE HERE BELOW #######
|
||||
|
||||
# caput(DEVICE+':INIT.PROC', '1')
|
||||
|
||||
#get parameters from the calling interface
|
||||
try:
|
||||
print_log(testName, DEVICE, "Running test Initialise with the following parameters:")
|
||||
print_log(testName, DEVICE, params )
|
||||
loopTimes = int(params["repeatTimes"]["value"])
|
||||
delaySeconds = int(params["delayS"]["value"])
|
||||
except:
|
||||
ret = 'Could not retrieve testing parameters - ' + traceback.format_exc()
|
||||
success = False
|
||||
sendFeedback(testPath, testName, DEVICE, ret, success)
|
||||
return
|
||||
|
||||
scan = ManualScan(['idX'], ['idPositioner'] )
|
||||
scan.setPlotName(plotName)
|
||||
scan.start()
|
||||
try:
|
||||
idInit = Channel(DEVICE+':DEMAND', type = 'l')
|
||||
except:
|
||||
ret = 'Unable to create channel - ' + traceback.format_exc()
|
||||
success = False
|
||||
sendFeedback(testPath, testName, DEVICE, ret, success)
|
||||
return
|
||||
|
||||
for count in range(1, loopTimes+1):
|
||||
print_log(testName, DEVICE, 'Positioning sequence #' + str(count) + '/' + str(loopTimes))
|
||||
timeStampStart = float(java.lang.System.currentTimeMillis())
|
||||
for positioner in range(1, 143):
|
||||
#Detector time
|
||||
idInit.put(positioner, timeout=1000) # TODO: Set appropriate timeout
|
||||
timeStamp = float(java.lang.System.currentTimeMillis())
|
||||
sleep( 0.01 )
|
||||
detector = idInit.get()
|
||||
scan.append ([timeStamp],[timeStamp], [detector])
|
||||
if(count < loopTimes):
|
||||
print_log(testName, DEVICE, 'Next sequence starting in ' + str(delaySeconds) + 's')
|
||||
sleep( delaySeconds ) # pause between two sequences
|
||||
|
||||
idInit.close()
|
||||
scan.end()
|
||||
|
||||
############# END OF YOUR CODE ###########
|
||||
###### DO NOT MODIFY THE CODE BELOW ######
|
||||
sendFeedback(testPath, testName, DEVICE, ret, success)
|
||||
except:
|
||||
ret = traceback.format_exc()
|
||||
success = False
|
||||
sendFeedback(testPath, testName, DEVICE, ret, success)
|
||||
return
|
||||
|
||||
#launch the test
|
||||
startTest(test, device, parameters)
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" numberOfExecution="1" failOnSensorError="true">
|
||||
<data fileName="Display Test.fda"/>
|
||||
<scan>
|
||||
|
||||
<!-- Pause -->
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" command="/bin/sleep 2" exitValue="0"/>
|
||||
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.01" id="id000000">
|
||||
<counts>1000</counts>
|
||||
</positioner>
|
||||
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinearPositioner" name="PO2TC-NCS-{DEVICE}:DEMAND" settlingTime="0.8" id="id000001">
|
||||
<start>1</start>
|
||||
<end>143</end>
|
||||
<stepSize>1</stepSize>
|
||||
</positioner>
|
||||
|
||||
</dimension>
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.01" id="id000002">
|
||||
<counts>1</counts>
|
||||
</positioner>
|
||||
|
||||
</dimension>
|
||||
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000001" title="Demand Value"/>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" numberOfExecution="1" failOnSensorError="true">
|
||||
<data fileName="Display Test.fda"/>
|
||||
<scan>
|
||||
|
||||
<!-- Pause -->
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" command="/bin/sleep 2" exitValue="0"/>
|
||||
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.01" id="id000000">
|
||||
<counts>1000</counts>
|
||||
</positioner>
|
||||
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinearPositioner" name="PO2TC-NCS-{DEVICE}:DEMAND" settlingTime="0.8" id="id000001">
|
||||
<start>1</start>
|
||||
<end>143</end>
|
||||
<stepSize>1</stepSize>
|
||||
</positioner>
|
||||
|
||||
</dimension>
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.01" id="id000002">
|
||||
<counts>1</counts>
|
||||
</positioner>
|
||||
|
||||
</dimension>
|
||||
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000001" title="Demand Value"/>
|
||||
</configuration>
|
||||
@@ -1,2 +0,0 @@
|
||||
name=Fixation Light Tests
|
||||
description=Tests on the OPTIS2 fixation light
|
||||
@@ -1,3 +0,0 @@
|
||||
name=Lamp Test
|
||||
description=Turns on every LED in sequence
|
||||
filename=Lamp Test.xml
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" numberOfExecution="1" failOnSensorError="true">
|
||||
<data fileName="Lamp Test.xml"/>
|
||||
<scan>
|
||||
|
||||
<!-- Pause -->
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" command="/bin/sleep 2" exitValue="0"/>
|
||||
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.01" id="id000000">
|
||||
<counts>1000</counts>
|
||||
</positioner>
|
||||
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinearPositioner" name="PO2TC-NCS-{DEVICE}:DEMAND" settlingTime="0.8" id="id000001">
|
||||
<start>1</start>
|
||||
<end>143</end>
|
||||
<stepSize>1</stepSize>
|
||||
</positioner>
|
||||
|
||||
</dimension>
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.01" id="id000002">
|
||||
<counts>1</counts>
|
||||
</positioner>
|
||||
|
||||
</dimension>
|
||||
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000001" title="Demand Value"/>
|
||||
</configuration>
|
||||
@@ -1,3 +0,0 @@
|
||||
name=Display Test
|
||||
description=Displays an incrementing number
|
||||
filename=Display Test.xml
|
||||
@@ -1,3 +0,0 @@
|
||||
name=Lamp Test
|
||||
description=Turns on every LED in sequence
|
||||
filename=Lamp Test.xml
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" numberOfExecution="1" failOnSensorError="true">
|
||||
<data fileName="Lamp Test.xml"/>
|
||||
<scan>
|
||||
|
||||
<!-- Pause -->
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" command="/bin/sleep 2" exitValue="0"/>
|
||||
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.01" id="id000000">
|
||||
<counts>1000</counts>
|
||||
</positioner>
|
||||
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinearPositioner" name="PO2TC-NCS-{DEVICE}:DEMAND" settlingTime="0.8" id="id000001">
|
||||
<start>1</start>
|
||||
<end>143</end>
|
||||
<stepSize>1</stepSize>
|
||||
</positioner>
|
||||
|
||||
</dimension>
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.01" id="id000002">
|
||||
<counts>1</counts>
|
||||
</positioner>
|
||||
|
||||
</dimension>
|
||||
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000001" title="Demand Value"/>
|
||||
</configuration>
|
||||
@@ -1,2 +0,0 @@
|
||||
name=Office Linear Slide Tests
|
||||
description=Tests on the office linear slides
|
||||
@@ -1,3 +0,0 @@
|
||||
name=Calibrate
|
||||
description=Calibrates the device
|
||||
filename=Calibrate.xml
|
||||
@@ -1,97 +0,0 @@
|
||||
#Script imported from: Calibrate.xml
|
||||
|
||||
ret = 'Test failed'
|
||||
status = False
|
||||
|
||||
#Pre-actions
|
||||
try:
|
||||
caput('PO2DV-NCS-'+DEVICE+':INIT.PROC', '1')
|
||||
except:
|
||||
print "Unexpected error:", sys.exc_info()[0]
|
||||
ret = 'Unable to create channel'
|
||||
success = False
|
||||
raise
|
||||
sys.exit()
|
||||
|
||||
#TODO: Set the diplay names of positioners and detectors
|
||||
scan = ManualScan(['id000000'], ['id000001', 'id000002', 'id000003', 'id000004', 'id000005', 'id000006', 'id000007', 'id000008', 'id000009', 'id000010', 'idResult'] , [0.0], [1000.0], [1000])
|
||||
scan.start()
|
||||
|
||||
#Creating channels: dimension 1
|
||||
#PseudoPositioner id000000
|
||||
#ScalarDetector id000001
|
||||
id000001 = Channel('PO2DV-NCS-'+DEVICE+':MOTOR.MSTA', type = 'd')
|
||||
#ScalarDetector id000002
|
||||
id000002 = Channel('PO2DV-NCS-'+DEVICE+':MOTOR.RVAL', type = 'd')
|
||||
#ScalarDetector id000003
|
||||
id000003 = Channel('PO2DV-NCS-'+DEVICE+':MOTOR.VAL', type = 'd')
|
||||
#ScalarDetector id000004
|
||||
id000004 = Channel('PO2DV-NCS-'+DEVICE+':MOTOR.ATHM', type = 'd')
|
||||
#ScalarDetector id000005
|
||||
id000005 = Channel('PO2DV-NCS-'+DEVICE+':MOTOR.LLS', type = 'd')
|
||||
#ScalarDetector id000006
|
||||
id000006 = Channel('PO2DV-NCS-'+DEVICE+':MOTOR.HLS', type = 'd')
|
||||
#ScalarDetector id000007
|
||||
id000007 = Channel('PO2DV-NCS-'+DEVICE+':ENCODERraw', type = 'd')
|
||||
#ScalarDetector id000008
|
||||
id000008 = Channel('PO2DV-NCS-'+DEVICE+':ENCODER', type = 'd')
|
||||
#ScalarDetector id000009
|
||||
id000009 = Channel('PO2DV-NCS-'+DEVICE+':RDY', type = 'd')
|
||||
#ScalarDetector id000010
|
||||
id000010 = Channel('PO2DV-NCS-'+DEVICE+':ILK', type = 'd')
|
||||
|
||||
#Dimension 1
|
||||
#PseudoPositioner id000000
|
||||
for setpoint1 in range(0, 1000):
|
||||
readback1 = setpoint1
|
||||
sleep( 0.05 ) # Settling time
|
||||
#Detector id000001
|
||||
detector1 = id000001.get()
|
||||
#Detector id000002
|
||||
detector2 = id000002.get()
|
||||
#Detector id000003
|
||||
detector3 = id000003.get()
|
||||
#Detector id000004
|
||||
detector4 = id000004.get()
|
||||
#Detector id000005
|
||||
detector5 = id000005.get()
|
||||
#Detector id000006
|
||||
detector6 = id000006.get()
|
||||
#Detector id000007
|
||||
detector7 = id000007.get()
|
||||
#Detector id000008
|
||||
detector8 = id000008.get()
|
||||
#Detector id000009
|
||||
detector9 = id000009.get()
|
||||
#Detector id000010
|
||||
detector10 = id000010.get()
|
||||
#Manipulation idResult
|
||||
#Variable Mappings
|
||||
ready = detector9
|
||||
interlock = detector10
|
||||
count = setpoint1
|
||||
if count < 800:
|
||||
idResult = (0, "Note: the "+DEVICE+" calibration procedure did not complete.")
|
||||
if ready == 1 and interlock == 1:
|
||||
#print "The "+DEVICE+" drive was successfully initialised. The RDY and ILK signals indicate the drive is ready."
|
||||
ret = 'Drive successfully initialised'
|
||||
status = True
|
||||
else:
|
||||
#print "The RS calibration procedure failed. The RDY and ILK signals indicate the drive was NOT ready at the expected time (after 40s)."
|
||||
ret = 'The RDY and ILK signals indicate the drive was NOT ready at the expected time (after 40s).'
|
||||
status = False
|
||||
scan.append ([setpoint1], [readback1], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, detector9, detector10, idResult])
|
||||
|
||||
#Closing channels
|
||||
id000001.close()
|
||||
id000002.close()
|
||||
id000003.close()
|
||||
id000004.close()
|
||||
id000005.close()
|
||||
id000006.close()
|
||||
id000007.close()
|
||||
id000008.close()
|
||||
id000009.close()
|
||||
id000010.close()
|
||||
|
||||
scan.end()
|
||||
@@ -1,73 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0">
|
||||
<data fileName="Calibrate.xml"/>
|
||||
<scan>
|
||||
|
||||
<!-- Send Calibrate Command -->
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="PO2DV-NCS-{DEVICE}:INIT.PROC" value="1"/>
|
||||
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.05" id="id000000">
|
||||
<counts>1000</counts>
|
||||
</positioner>
|
||||
|
||||
<!-- Motor Drive Status -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.MSTA" id="id000001"/>
|
||||
|
||||
<!-- Position Counter: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.RVAL" id="id000002"/>
|
||||
|
||||
<!-- Position Counter: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.VAL" id="id000003"/>
|
||||
|
||||
<!-- Motor Home Switch -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.ATHM" id="id000004"/>
|
||||
|
||||
<!-- Motor Low Limit Switch -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.LLS" id="id000005"/>
|
||||
|
||||
<!-- Motor High Limit Switch -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.HLS" id="id000006"/>
|
||||
|
||||
<!-- Enocder Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:ENCODERraw" id="id000007"/>
|
||||
|
||||
<!-- Encoder Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:ENCODER" id="id000008"/>
|
||||
|
||||
<!-- Ready -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:RDY" id="id000009"/>
|
||||
|
||||
<!-- Interlock -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:ILK" id="id000010"/>
|
||||
|
||||
|
||||
</dimension>
|
||||
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="idResult">
|
||||
<mapping xsi:type="IDParameterMapping" refid="id000009" variable="ready"/>
|
||||
<mapping xsi:type="IDParameterMapping" refid="id000010" variable="interlock"/>
|
||||
<mapping xsi:type="IDParameterMapping" refid="id000000" variable="count"/>
|
||||
<script>def process(ready,interlock,count):
|
||||
if count < 800:
|
||||
return (0, "Note: the {DEVICE} calibration procedure did not complete.")
|
||||
sleep(5.0)
|
||||
if ready == 1 and interlock == 1:
|
||||
return(0, "The {DEVICE} drive was successfully initialised. The RDY and ILK signals indicate the drive is ready.")
|
||||
else:
|
||||
return(1, "The RS calibration procedure failed. The RDY and ILK signals indicate the drive was NOT ready at the expected time (after 40s).")
|
||||
</script>
|
||||
</manipulation>
|
||||
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000001" title="Motor Status (MSTA)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000002" title="Motor Step Count (RVAL)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000003" title="Motor Position (VAL)" />
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000004" title="Motor Home Switch (ATHM)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000005" title="Motor Low Limit Switch (LLS)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000006" title="Motor High Limit Switch (HLS)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000007" title="Encoder Count (ENCODERraw)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000008" title="Encoder Position (ENCODER)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000009" title="Drive Ready (RDY)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000010" title="Drive interlock (ILK)"/>
|
||||
</configuration>
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
sleep 5
|
||||
@@ -1,3 +0,0 @@
|
||||
name=Check Status
|
||||
description=Checks the drive status
|
||||
filename=Check Status.xml
|
||||
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0">
|
||||
<data fileName="Check Status.xml"/>
|
||||
<scan>
|
||||
|
||||
<dimension>
|
||||
<!-- Set up a Pseudo Positioner that samples every 50ms for 1500 samples -->
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.05" id="id000000">
|
||||
<counts>1000</counts>
|
||||
</positioner>
|
||||
|
||||
<!-- Motor Drive Status -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.MSTA" id="id000001"/>
|
||||
|
||||
<!-- Position Counter: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.RVAL" id="id000002"/>
|
||||
|
||||
<!-- Position Counter: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.VAL" id="id000003"/>
|
||||
|
||||
<!-- Motor Home Switch -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.ATHM" id="id000004"/>
|
||||
|
||||
<!-- Motor Low Limit Switch -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.LLS" id="id000005"/>
|
||||
|
||||
<!-- Motor High Limit Switch -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:MOTOR.HLS" id="id000006"/>
|
||||
|
||||
<!-- Enocder Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:ENCODERraw" id="id000007"/>
|
||||
|
||||
<!-- Encoder Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:ENCODER" id="id000008"/>
|
||||
|
||||
<!-- Ready -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:RDY" id="id000009"/>
|
||||
|
||||
<!-- Interlock -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2DV-NCS-{DEVICE}:ILK" id="id000010"/>
|
||||
|
||||
|
||||
</dimension>
|
||||
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000001" title="Motor Status (MSTA)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000002" title="Motor Step Count (RVAL)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000003" title="Motor Position (VAL)" />
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000004" title="Motor Home Switch (ATHM)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000005" title="Motor Low Limit Switch (LLS)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000006" title="Motor High Limit Switch (HLS)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000007" title="Encoder Count (ENCODERraw)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000008" title="Encoder Position (ENCODER)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000009" title="Drive Ready (RDY)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000010" title="Drive interlock (ILK)"/>
|
||||
</configuration>
|
||||
@@ -1,3 +0,0 @@
|
||||
name=motor-slide
|
||||
description=Moves the device
|
||||
filename=Calibrate.xml
|
||||
@@ -1,73 +0,0 @@
|
||||
#Script imported from: PO2DV-NCS-LS_mot.xml
|
||||
import traceback
|
||||
|
||||
#by default, failed
|
||||
ret = 'Test failed'
|
||||
status = False
|
||||
|
||||
#Pre-actions
|
||||
try:
|
||||
caput('PO2DV-NCS-LS:MOTOR.TWF', '0')
|
||||
sleep(0.5)
|
||||
caput('PO2DV-NCS-LS:MOTOR.RDBD', '0.1')
|
||||
except:
|
||||
print "Unexpected error:", sys.exc_info()[0]
|
||||
ret = 'Unable to create channel - ' + traceback.format_exc()
|
||||
success = False
|
||||
raise
|
||||
sys.exit()
|
||||
|
||||
#TODO: Set the diplay names of positioners and detectors
|
||||
scan = ManualScan(['VAL'], ['time', 'RVAL', 'Encoder', 'RBV', 'Busy'] , [40.0], [44.0], [22])
|
||||
scan.start()
|
||||
|
||||
#Creating channels: dimension 1
|
||||
#RegionPositioner VAL
|
||||
VAL = Channel('PO2DV-NCS-LS:MOTOR.VAL', type = 'd')
|
||||
VALReadback = Channel('PO2DV-NCS-LS:MOTOR.RBV', type = 'd')
|
||||
#Timestamp time
|
||||
#ScalarDetector RVAL
|
||||
RVAL = Channel('PO2DV-NCS-LS:MOTOR.RVAL', type = 'd')
|
||||
#ScalarDetector ENCODER
|
||||
ENCODER = Channel('PO2DV-NCS-LS:ENCODER', type = 'd')
|
||||
#ScalarDetector RBV
|
||||
RBV = Channel('PO2DV-NCS-LS:MOTOR.RBV', type = 'd')
|
||||
#ScalarDetector Busy
|
||||
Busy = Channel('PO2DV-NCS-LS: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
|
||||
ret = 'Actor VAL could not be set to the value ' + str(setpoint2) + ' (current value: ' + str(readback2) + ')'
|
||||
success = False
|
||||
raise Exception(ret)
|
||||
#Detector time
|
||||
detector1 = float(java.lang.System.currentTimeMillis())
|
||||
#Detector RVAL
|
||||
detector2 = RVAL.get()
|
||||
#Detector TWF
|
||||
detector3 = ENCODER.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()
|
||||
ENCODER.close()
|
||||
RBV.close()
|
||||
Busy.close()
|
||||
|
||||
scan.end()
|
||||
|
||||
#Post-actions
|
||||
caput('PO2DV-NCS-LS:MOTOR.RDBD', '1')
|
||||
|
||||
ret = 'Test done'
|
||||
status = True
|
||||
@@ -1,3 +0,0 @@
|
||||
name=power-supply
|
||||
description=Moves HV
|
||||
filename=Calibrate.xml
|
||||
@@ -1,77 +0,0 @@
|
||||
#TODO: Set the diplay names of positioners and detectors
|
||||
#ManualScan(writables, readables, start = None, end = None, steps = None, relative = False)
|
||||
|
||||
#by default, failed
|
||||
ret = 'Test failed'
|
||||
status = False
|
||||
DEVICE = 'PO2DV-NCS-VHQ1'
|
||||
|
||||
scan = ManualScan(['time'], ['SetVA', 'ActualVA', 'ActualIA'] , [0.0], [20.0], [10])
|
||||
scan.start()
|
||||
|
||||
#Creating channels: dimension 1
|
||||
#Ramp rate
|
||||
SetRamp = Channel('PO2DV-NCS-VHQ1:Set-RampA', type = 'd')
|
||||
#SetRamp = Channel('pw84:ai', type = 'd')
|
||||
#LinearPositioner SetVA
|
||||
SetVA = Channel('PO2DV-NCS-VHQ1:Set-VA', type = 'd')
|
||||
#SetVA = Channel('pw84:ai', type = 'd')
|
||||
#Timestamp time
|
||||
#ScalarDetector ActualVA
|
||||
ActualVA = Channel('PO2DV-NCS-VHQ1:Actual-VA', type = 'd')
|
||||
#ActualVA = Channel('pw84:ai', type = 'd')
|
||||
#ScalarDetector ActualIA
|
||||
ActualIA = Channel('PO2DV-NCS-VHQ1:Actual-IA', type = 'd')
|
||||
#ActualIA = Channel('pw84:ai', type = 'd')
|
||||
|
||||
#Init
|
||||
SetRamp.put(10.0, timeout=None)
|
||||
|
||||
#set voltage to 0
|
||||
print 'Ramping down power supply to 0V'
|
||||
SetVA.put(0.0, timeout=None)
|
||||
|
||||
#wait up to 2 minutes for voltage to be ~0
|
||||
for setpoint1 in frange(0.0, 120.0, 1.0, True):
|
||||
detector2 = ActualVA.get()
|
||||
if detector2 <= 1.0:
|
||||
break
|
||||
sleep(0.5)
|
||||
|
||||
#Dimension 1
|
||||
#LinearPositioner SetVA
|
||||
print 'Ramping up power supply'
|
||||
for setpoint1 in frange(0.0, 20.0, 1.0, True):
|
||||
if setpoint1 > 50.0 or setpoint1 < 0.0:
|
||||
break
|
||||
SetVA.put(setpoint1, timeout=None) # TODO: Set appropriate timeout
|
||||
readback1 = SetVA.get()
|
||||
if abs(readback1 - setpoint1) > 0.5 : # TODO: Check accuracy
|
||||
raise Exception('Actor SetVA could not be set to the value ' + str(setpoint1))
|
||||
ret = 'SetVA could not be set to the value ' + str(setpoint1) + '(measured value: '+str(readback1)+')'
|
||||
status = False
|
||||
break
|
||||
#scan quickly the output during some seconds
|
||||
for setpoint2 in range(0, 20):
|
||||
#Detector time
|
||||
detector1 = float(java.lang.System.currentTimeMillis())
|
||||
#Detector ActualVA
|
||||
detector2 = ActualVA.get()
|
||||
detector3 = ActualIA.get()
|
||||
#scan.append ([setpoint1], [readback1], [detector1, detector2])
|
||||
#append(setpoints, positions, values)
|
||||
scan.append ([detector1], [detector1], [readback1, detector2, detector3])
|
||||
sleep( 0.1 ) # Settling time
|
||||
ret = 'Test completed'
|
||||
status = True
|
||||
|
||||
#reset output to 0V
|
||||
SetVA.put(0.0, timeout=None)
|
||||
#Closing channels
|
||||
SetVA.close()
|
||||
ActualVA.close()
|
||||
ActualIA.close()
|
||||
|
||||
|
||||
|
||||
scan.end()
|
||||
@@ -1,2 +0,0 @@
|
||||
name=Range Shifter Tests
|
||||
description=Tests on the OPTIS2 Range Shifter
|
||||
@@ -1,3 +1,8 @@
|
||||
name=Calibrate
|
||||
description=Calibrates the device
|
||||
filename=Calibrate.xml
|
||||
name=Calibrate
|
||||
description=Initialises the motor
|
||||
help = \
|
||||
This test sends a INIT command to the device, as many times as configured with the parameter RepeatTimes.
|
||||
|
||||
#optional parameters. Description is compulsory. Syntax:
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter2Name>:<parameter2Value>:<Parameter 2 description>]
|
||||
parameters=repeatTimes:2:Repeat N times;delayS:4:Delay between each initialisation [s]
|
||||
@@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0">
|
||||
<data fileName="Calibrate.fda"/>
|
||||
<scan>
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" exitValue="0" command="/bin/sleep 2"/>
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" value="1" channel="PO2TC-NCS-{DEVICE}:INIT.PROC"/>
|
||||
<dimension>
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.05" id="id000000">
|
||||
<counts>70</counts>
|
||||
</positioner>
|
||||
|
||||
<!-- Motor Drive Status -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.MSTA" id="id000001"/>
|
||||
|
||||
<!-- Position Counter: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.RVAL" id="id000002"/>
|
||||
|
||||
<!-- Position Readback: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.RRBV" id="id000099"/>
|
||||
|
||||
<!-- Position Readback: User -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.RBV" id="id000098"/>
|
||||
|
||||
<!-- Position Counter: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.VAL" id="id000003"/>
|
||||
|
||||
<!-- Motor Home Switch -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.ATHM" id="id000004"/>
|
||||
|
||||
<!-- Enocder Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:ENCODERraw" id="id000005"/>
|
||||
|
||||
<!-- Encoder Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:ENCODER" id="id000006"/>
|
||||
|
||||
<!-- Encoder Reference Position -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:ENCODER_HFF" id="id000097"/>
|
||||
|
||||
<!-- Ready -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:RDY" id="id000007"/>
|
||||
|
||||
<!-- Interlock -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:ILK" id="id000008"/>
|
||||
</dimension>
|
||||
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="id000009">
|
||||
<mapping xsi:type="IDParameterMapping" refid="id000006" variable="a"/>
|
||||
<mapping xsi:type="IDParameterMapping" refid="id000098" variable="b"/>
|
||||
<mapping xsi:type="IDParameterMapping" refid="id000000" variable="count"/>
|
||||
<script>def process(a,b,count):
|
||||
return a-b</script>
|
||||
</manipulation>
|
||||
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="idResult">
|
||||
<mapping xsi:type="IDParameterMapping" refid="id000007" variable="ready"/>
|
||||
<mapping xsi:type="IDParameterMapping" refid="id000008" variable="interlock"/>
|
||||
<mapping xsi:type="IDParameterMapping" refid="id000000" variable="count"/>
|
||||
<script>def process(ready,interlock,count):
|
||||
if count < 65:
|
||||
return (0, "Note: The RS calibration procedure did not complete.")
|
||||
if ready == 1 and interlock == 1:
|
||||
return(0, "The RS drive was successfully initialised. The RDY and ILK signals indicate the drive is ready.")
|
||||
else:
|
||||
return(1, "The RS calibration procedure failed. The RDY and ILK signals indicate the drive was NOT ready at the expected time (after 3.5s).")
|
||||
</script>
|
||||
</manipulation>
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000001" x="id000000" title="Motor Status (MSTA)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000002" x="id000000" title="Motor Step Count (RVAL)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000003" x="id000000" title="Motor Position (VAL)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000099" x="id000000" title="Motor Position Readback Raw (RRBV)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000098" x="id000000" title="Motor Position Readback (RBV)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000004" x="id000000" title="Motor Home Switch (ATHM)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000005" x="id000000" title="Encoder Count (ENCODERraw)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000006" x="id000000" title="Encoder Position (ENCODER)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000097" x="id000000" title="Encoder Ref (ENCODER_HFF)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000009" x="id000000" title="Motor/Encoder Diff"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000007" x="id000000" title="Drive Ready (RDY)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="id000008" x="id000000" title="Drive interlock (ILK)"/>
|
||||
</configuration>
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
sleep 5
|
||||
@@ -1,3 +1,7 @@
|
||||
name=Check Linearity
|
||||
description=Compares the position reported by the motor and the incremental encoder
|
||||
filename=Check Linearity.xml
|
||||
description=Go to absolute position A, then move +B steps, then -2B steps, then +2Bsteps (ie oscillate round centre position, logging after each movement); repeat N times
|
||||
|
||||
|
||||
#optional parameters. Description is compulsory. Syntax:
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter2Name>:<parameter2Value>:<Parameter 2 description>]
|
||||
parameters=repeatTimes:2:Repeat N times;midPoint:41.0:Middle point A;spanFromMidPoint:3.0:B steps around middle point A;delayS:0:Delay between each oscillation [s]
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0">
|
||||
<data fileName="Check Linearity.fda"/>
|
||||
<scan>
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ShellAction" exitValue="0" command="/bin/sleep 2"/>
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" value="50" channel="PO2TC-NCS-{DEVICE}:MOTOR.VELO"/>
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" value="350" channel="PO2TC-NCS-{DEVICE}:DEMAND"/>
|
||||
<dimension>
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.02" id="idCOUNT">
|
||||
<counts>200</counts>
|
||||
</positioner>
|
||||
|
||||
<!-- Motor Drive Status -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.MSTA" id="idMSTA"/>
|
||||
|
||||
<!-- Position Counter: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.RVAL" id="idRVAL"/>
|
||||
|
||||
<!-- Position Readback: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.RRBV" id="idRRBV"/>
|
||||
|
||||
<!-- Position Readback: USER -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.RBV" id="idRBV"/>
|
||||
|
||||
<!-- Position Counter: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.VAL" id="idVAL"/>
|
||||
|
||||
<!-- Motor Home Switch -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:MOTOR.ATHM" id="idATHM"/>
|
||||
|
||||
<!-- Enocder Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:ENCODERraw" id="idENCODERraw"/>
|
||||
|
||||
<!-- Encoder Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:ENCODER" id="idENCODER"/>
|
||||
|
||||
<!-- Ready -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:RDY" id="idRDY"/>
|
||||
|
||||
<!-- Interlock -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="PO2TC-NCS-{DEVICE}:ILK" id="idILK"/>
|
||||
</dimension>
|
||||
<postAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" value="270" channel="PO2TC-NCS-{DEVICE}:MOTOR.VELO"/>
|
||||
<postAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" value="0" channel="PO2TC-NCS-{DEVICE}:DEMAND"/>
|
||||
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="idDiff">
|
||||
<mapping xsi:type="IDParameterMapping" refid="idRBV" variable="a"/>
|
||||
<mapping xsi:type="IDParameterMapping" refid="idENCODER" variable="b"/>
|
||||
<mapping xsi:type="IDParameterMapping" refid="idCOUNT" variable="count"/>
|
||||
<script>def process(a,b,count):
|
||||
return a-b</script>
|
||||
</manipulation>
|
||||
<manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="idResult">
|
||||
<mapping xsi:type="IDParameterMapping" refid="idDiff" variable="diff"/>
|
||||
<mapping xsi:type="IDParameterMapping" refid="idCOUNT" variable="count"/>
|
||||
<script>def process(diff,count):
|
||||
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):
|
||||
return ( 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):
|
||||
return ( 4, "Note: The position difference at the end of movement was too great (more than 0.5 deg)" )
|
||||
if (count < 160):
|
||||
return ( 0, "Note: The motor drive linearity check did not yet complete.")
|
||||
else:
|
||||
return ( 0, "The motor drive linearity was within the acceptable limits.")
|
||||
</script>
|
||||
</manipulation>
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idMSTA" x="idCOUNT" title="Motor Status (MSTA)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idResult" x="idCOUNT" title="RESULT (0=OK)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idRVAL" x="idCOUNT" title="Motor Step Count (RVAL)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idVAL" x="idCOUNT" title="Motor Position (VAL)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idRRBV" x="idCOUNT" title="Motor Position Readback Raw (RRBV)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idRBV" x="idCOUNT" title="Motor Position Readback (RBV)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idATHM" x="idCOUNT" title="Motor Home Switch (ATHM)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idENCODERraw" x="idCOUNT" title="Encoder Count (ENCODERraw)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idENCODER" x="idCOUNT" title="Encoder Position (ENCODER)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idDiff" x="idCOUNT" title="Motor/Encoder Diff"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idRDY" x="idCOUNT" title="Drive Ready (RDY)"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" y="idILK" x="idCOUNT" title="Drive interlock (ILK)"/>
|
||||
</configuration>
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
sleep 5
|
||||
Reference in New Issue
Block a user