Startup
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
name=Calibrate
|
||||
description=Calibrates the device
|
||||
filename=Calibrate.xml
|
||||
name=Calibrate
|
||||
description=Calibrates the device
|
||||
filename=Calibrate.xml
|
||||
help = \
|
||||
This test sends a command to the low level firmware which controls the collimators \n\
|
||||
requesting that it calibrates itself. \n\n\
|
||||
<strong>Calibration</strong> involves moving to the R1 and R2 reference positions and measuring the \n\
|
||||
number of steps required to do so. At the end of the sequence the default collimator \n\
|
||||
will be selected. \n\n\
|
||||
During the course of the expected calibration period (45-70 seconds) the test \n\
|
||||
procedure will plot the values of all critical system variables. \n\n\
|
||||
For further information please consult Valery Ovinnikov.
|
||||
|
||||
<img src="./mount.png"/>
|
||||
@@ -1,90 +1,69 @@
|
||||
#Script imported from: Calibrate.xml
|
||||
|
||||
ret = 'Test failed'
|
||||
ret = 'Calibration failed'
|
||||
status = False
|
||||
|
||||
#Pre-actions
|
||||
try:
|
||||
caput('PO2DV-NCS-'+DEVICE+':INIT.PROC', '1')
|
||||
#Pre-actions: 1 = calibrate
|
||||
caput(DEVICE+':COM:2', 1)
|
||||
#Creating channels: dimension 1
|
||||
#PseudoPositioner id000000
|
||||
#ScalarDetector id000001
|
||||
id000001 = Channel(DEVICE+':STA:1', type = 'd')
|
||||
#ScalarDetector id000003
|
||||
id000003 = Channel(DEVICE+':IST:2', type = 'd')
|
||||
#ScalarDetector id000004
|
||||
id000004 = Channel(DEVICE+':DIAM:2', type = 'd')
|
||||
#ScalarDetector id000005
|
||||
id000005 = Channel(DEVICE+':IST1:1', type = 'd')
|
||||
#ScalarDetector id000006
|
||||
id000006 = Channel(DEVICE+':IST1:2', type = 'd')
|
||||
#ScalarDetector id000007
|
||||
id000007 = Channel(DEVICE+':IST2:1', type = 'd')
|
||||
#ScalarDetector id000008
|
||||
id000008 = Channel(DEVICE+':IST2:2', type = 'd')
|
||||
#ScalarDetector id000009
|
||||
id000009 = Channel(DEVICE+':IST3:1', type = 'd')
|
||||
#ScalarDetector id000010
|
||||
id000010 = Channel(DEVICE+':IST3:2', type = 'd')
|
||||
except:
|
||||
print "Unexpected error:", sys.exc_info()[0]
|
||||
ret = 'Unable to create channel'
|
||||
success = False
|
||||
raise
|
||||
sys.exit()
|
||||
print "Unexpected error:", sys.exc_info()[0]
|
||||
ret = 'Unable to create channel - ' + traceback.format_exc()
|
||||
success = False
|
||||
raise Exception('Unable to create channel - ' + traceback.format_exc())
|
||||
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 = ManualScan(['id000000'], ['id000001', 'id000003', 'id000004', 'id000005', 'id000006', 'id000007', 'id000008', 'id000009', 'id000010'] , [0.0], [900.0], [900])
|
||||
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):
|
||||
for setpoint1 in range(0, 900):
|
||||
readback1 = setpoint1
|
||||
sleep( 0.05 ) # Settling time
|
||||
sleep( 0.1 ) # Settling time
|
||||
#Detector id000001
|
||||
detector1 = id000001.get()
|
||||
#Detector id000002
|
||||
detector2 = id000002.get()
|
||||
#Detector id000003
|
||||
detector3 = id000003.get()
|
||||
detector2 = id000003.get()
|
||||
#Detector id000004
|
||||
detector4 = id000004.get()
|
||||
detector3 = id000004.get()
|
||||
#Detector id000005
|
||||
detector5 = id000005.get()
|
||||
detector4 = id000005.get()
|
||||
#Detector id000006
|
||||
detector6 = id000006.get()
|
||||
detector5 = id000006.get()
|
||||
#Detector id000007
|
||||
detector7 = id000007.get()
|
||||
detector6 = id000007.get()
|
||||
#Detector id000008
|
||||
detector8 = id000008.get()
|
||||
detector7 = id000008.get()
|
||||
#Detector id000009
|
||||
detector9 = id000009.get()
|
||||
detector8 = 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])
|
||||
detector9 = id000010.get()
|
||||
scan.append ([setpoint1], [readback1], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, detector9])
|
||||
|
||||
#Closing channels
|
||||
id000001.close()
|
||||
id000002.close()
|
||||
id000003.close()
|
||||
id000004.close()
|
||||
id000005.close()
|
||||
@@ -95,3 +74,6 @@ id000009.close()
|
||||
id000010.close()
|
||||
|
||||
scan.end()
|
||||
|
||||
ret = 'Calibration done'
|
||||
status = True
|
||||
|
||||
@@ -1,73 +1,61 @@
|
||||
<?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>
|
||||
<?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>
|
||||
|
||||
<!-- Send Calibrate Command -->
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="{DEVICE}:COM:2" value="CALLIBR"/>
|
||||
|
||||
<dimension>
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.1" id="id000000">
|
||||
<counts>900</counts>
|
||||
</positioner>
|
||||
|
||||
<!-- Motor Drive Status -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:STA:1" id="id000001"/>
|
||||
|
||||
<!-- Logical Status -->
|
||||
<!-- <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:STA:2" id="id00001B"/> -->
|
||||
|
||||
<!-- Interlock Status -->
|
||||
<!-- <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IIST:2" id="id000002"/> -->
|
||||
|
||||
<!-- Logical Position -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST:2" id="id000003"/>
|
||||
|
||||
<!-- Collimator Diameter -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:DIAM:2" id="id000004"/>
|
||||
|
||||
<!-- Position Counter: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST1:1" id="id000005"/>
|
||||
|
||||
<!-- Position Counter: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST1:2" id="id000006"/>
|
||||
|
||||
<!-- Potentiometer: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST2:1" id="id000007"/>
|
||||
|
||||
<!-- Potentiometer: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST2:2" id="id000008"/>
|
||||
|
||||
<!-- BTVS Digitiser: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST3:1" id="id000009"/>
|
||||
|
||||
<!-- BTVS Digitiser: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST3:2" id="id000010"/>
|
||||
|
||||
|
||||
</dimension>
|
||||
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000001" title="Drive Status: {DEVICE}:STA:1"/>
|
||||
<!-- <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000002" title="ILK Status: {DEVICE}:IIST:2"/> -->
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000003" title="Logical Pos: {DEVICE}:IST:2"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000004" title="Diameter: {DEVICE}:DIAM:2 (mm)"/>
|
||||
<!-- <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000005" title="Cpc: {DEVICE}:IST1:1 (mm)"/> -->
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000006" title="Cpc: {DEVICE}:IST1:2 (mm)"/>
|
||||
<!-- <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000007" title="Pot: {DEVICE}:IST2:1 (mm)"/> -->
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000008" title="Pot: {DEVICE}:IST2:2 (mm)"/>
|
||||
<!-- <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000009" title="Btvs: {DEVICE}:IST3:1 (ADC raw)"/> -->
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000010" title="Btvs: {DEVICE}:IST3:2 (mm)"/>
|
||||
</configuration>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
sleep 5
|
||||
@@ -1,12 +0,0 @@
|
||||
name=Calibrate3
|
||||
description=Calibrates the device
|
||||
filename=Calibrate.xml
|
||||
help = \
|
||||
This test sends a command to the low level firmware which controls the collimators \n\
|
||||
requesting that it calibrates itself. \n\n\
|
||||
Calibration involves moving to the R1 and R2 reference positions and measuring the \n\
|
||||
number of steps required to do so. At the end of the sequence the default collimator \n\
|
||||
will be selected. \n\n\
|
||||
During the course of the expected calibration period (45-70 seconds) the test \n\
|
||||
procedure will plot the values of all critical system variables. \n\n\
|
||||
For further information please consult Valery Ovinnikov.
|
||||
@@ -1,61 +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>
|
||||
|
||||
<!-- Send Calibrate Command -->
|
||||
<preAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ChannelAction" channel="{DEVICE}:COM:2" value="CALLIBR"/>
|
||||
|
||||
<dimension>
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.1" id="id000000">
|
||||
<counts>900</counts>
|
||||
</positioner>
|
||||
|
||||
<!-- Motor Drive Status -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:STA:1" id="id000001"/>
|
||||
|
||||
<!-- Logical Status -->
|
||||
<!-- <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:STA:2" id="id00001B"/> -->
|
||||
|
||||
<!-- Interlock Status -->
|
||||
<!-- <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IIST:2" id="id000002"/> -->
|
||||
|
||||
<!-- Logical Position -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST:2" id="id000003"/>
|
||||
|
||||
<!-- Collimator Diameter -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:DIAM:2" id="id000004"/>
|
||||
|
||||
<!-- Position Counter: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST1:1" id="id000005"/>
|
||||
|
||||
<!-- Position Counter: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST1:2" id="id000006"/>
|
||||
|
||||
<!-- Potentiometer: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST2:1" id="id000007"/>
|
||||
|
||||
<!-- Potentiometer: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST2:2" id="id000008"/>
|
||||
|
||||
<!-- BTVS Digitiser: Raw -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST3:1" id="id000009"/>
|
||||
|
||||
<!-- BTVS Digitiser: Processed -->
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST3:2" id="id000010"/>
|
||||
|
||||
|
||||
</dimension>
|
||||
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000001" title="Drive Status: {DEVICE}:STA:1"/>
|
||||
<!-- <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000002" title="ILK Status: {DEVICE}:IIST:2"/> -->
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000003" title="Logical Pos: {DEVICE}:IST:2"/>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000004" title="Diameter: {DEVICE}:DIAM:2 (mm)"/>
|
||||
<!-- <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000005" title="Cpc: {DEVICE}:IST1:1 (mm)"/> -->
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000006" title="Cpc: {DEVICE}:IST1:2 (mm)"/>
|
||||
<!-- <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000007" title="Pot: {DEVICE}:IST2:1 (mm)"/> -->
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000008" title="Pot: {DEVICE}:IST2:2 (mm)"/>
|
||||
<!-- <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000009" title="Btvs: {DEVICE}:IST3:1 (ADC raw)"/> -->
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000010" title="Btvs: {DEVICE}:IST3:2 (mm)"/>
|
||||
</configuration>
|
||||
@@ -1,67 +0,0 @@
|
||||
#Script imported from: Calibrate.xml
|
||||
|
||||
#Pre-actions
|
||||
caput('{DEVICE}:COM:2', 'CALLIBR')
|
||||
|
||||
#TODO: Set the diplay names of positioners and detectors
|
||||
scan = ManualScan(['id000000'], ['id000001', 'id000003', 'id000004', 'id000005', 'id000006', 'id000007', 'id000008', 'id000009', 'id000010'] , [0.0], [900.0], [900])
|
||||
scan.start()
|
||||
|
||||
#Creating channels: dimension 1
|
||||
#PseudoPositioner id000000
|
||||
#ScalarDetector id000001
|
||||
id000001 = Channel('{DEVICE}:STA:1', type = 'd')
|
||||
#ScalarDetector id000003
|
||||
id000003 = Channel('{DEVICE}:IST:2', type = 'd')
|
||||
#ScalarDetector id000004
|
||||
id000004 = Channel('{DEVICE}:DIAM:2', type = 'd')
|
||||
#ScalarDetector id000005
|
||||
id000005 = Channel('{DEVICE}:IST1:1', type = 'd')
|
||||
#ScalarDetector id000006
|
||||
id000006 = Channel('{DEVICE}:IST1:2', type = 'd')
|
||||
#ScalarDetector id000007
|
||||
id000007 = Channel('{DEVICE}:IST2:1', type = 'd')
|
||||
#ScalarDetector id000008
|
||||
id000008 = Channel('{DEVICE}:IST2:2', type = 'd')
|
||||
#ScalarDetector id000009
|
||||
id000009 = Channel('{DEVICE}:IST3:1', type = 'd')
|
||||
#ScalarDetector id000010
|
||||
id000010 = Channel('{DEVICE}:IST3:2', type = 'd')
|
||||
|
||||
#Dimension 1
|
||||
#PseudoPositioner id000000
|
||||
for setpoint1 in range(0, 900):
|
||||
readback1 = setpoint1
|
||||
sleep( 0.1 ) # Settling time
|
||||
#Detector id000001
|
||||
detector1 = id000001.get()
|
||||
#Detector id000003
|
||||
detector2 = id000003.get()
|
||||
#Detector id000004
|
||||
detector3 = id000004.get()
|
||||
#Detector id000005
|
||||
detector4 = id000005.get()
|
||||
#Detector id000006
|
||||
detector5 = id000006.get()
|
||||
#Detector id000007
|
||||
detector6 = id000007.get()
|
||||
#Detector id000008
|
||||
detector7 = id000008.get()
|
||||
#Detector id000009
|
||||
detector8 = id000009.get()
|
||||
#Detector id000010
|
||||
detector9 = id000010.get()
|
||||
scan.append ([setpoint1], [readback1], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, detector9])
|
||||
|
||||
#Closing channels
|
||||
id000001.close()
|
||||
id000003.close()
|
||||
id000004.close()
|
||||
id000005.close()
|
||||
id000006.close()
|
||||
id000007.close()
|
||||
id000008.close()
|
||||
id000009.close()
|
||||
id000010.close()
|
||||
|
||||
scan.end()
|
||||
@@ -1,7 +1,7 @@
|
||||
name=Motor Test 1
|
||||
description=moves to CCW switch; then for M times moves to CW switch then CCW switch; between each M pauses for delay; log at CCW and CW
|
||||
filename=Motor Test 3.xml
|
||||
description=Moves to CCW switch; then for N times moves to CW switch then CCW switch; between each N pauses for delay; log at CCW and CW
|
||||
|
||||
|
||||
#optional parameters. Description is compulsory. Syntax:
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter1Name>:<parameter1Value>:<Parameter 1 description>]
|
||||
parameters=repeatTimes:2:Repeat M times;delayS:5:Pause delay [s]
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter2Name>:<parameter2Value>:<Parameter 2 description>]
|
||||
parameters=repeatTimes:1:Repeat N times;delayS:5:Pause delay [s]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#Script Motor Test 1
|
||||
#moves to CCW switch; then for M times moves N times to CW switch then CCW switch; between each M pauses for delay; log at CCW and CW
|
||||
#Moves to CCW switch; then for M times moves N times to CW switch then CCW switch; between each M pauses for delay; log at CCW and CW
|
||||
|
||||
import traceback
|
||||
|
||||
@@ -84,7 +84,7 @@ start = startDefault #idInkr.get()+direction
|
||||
setpoint2 = end
|
||||
count = 0
|
||||
print 'Starting test sequence'
|
||||
for setpoint1 in range(0, loopTimes):
|
||||
for setpoint1 in range(0, loopTimes*2):
|
||||
sleep( delaySeconds ) # Settling time
|
||||
#RegionPositioner idInkr
|
||||
idInkr.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name=Motor Test 2
|
||||
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
|
||||
filename=Motor Test 3.xml
|
||||
|
||||
|
||||
#optional parameters. Description is compulsory. Syntax:
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter1Name>:<parameter1Value>:<Parameter 1 description>]
|
||||
parameters=repeatTimes:2:Repeat N times;midPoint:41.0:Middle point A;spanFromMidPoint:11.0:Span around middle point B
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter2Name>:<parameter2Value>:<Parameter 2 description>]
|
||||
parameters=repeatTimes:1:Repeat N times;midPoint:41.0:Middle point A;spanFromMidPoint:11.0:B steps around middle point A
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name=Motor Test 3
|
||||
description=Moves from CCW to CW as a series of discrete translations (C times) logs after each translation. When end switch is encountered change direction. Repeat N times
|
||||
filename=Motor Test 3.xml
|
||||
description=Moves from CCW to CW as a series of discrete translations (C times) logs after each translation. When end switch is encountered change direction. Repeat N times
|
||||
|
||||
|
||||
#optional parameters. Description is compulsory. Syntax:
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter1Name>:<parameter1Value>:<Parameter 1 description>]
|
||||
parameters=repeatTimes:2:Repeat M times;translation:2:Translation with
|
||||
#parameters=<parameter1Name>:<parameter1Value>:<Parameter 1 description>[;<parameter2Name>:<parameter2Value>:<Parameter 2 description>]
|
||||
parameters=repeatTimes:1:Repeat N times;translation:2:Translation C steps
|
||||
|
||||
@@ -87,7 +87,7 @@ start = idInkr.get()+direction
|
||||
countSteps = 0
|
||||
print 'Starting testing sequence'
|
||||
count = 0
|
||||
for setpoint1 in range(0, loopTimes):
|
||||
for setpoint1 in range(0, loopTimes*2):
|
||||
count = count + 1
|
||||
sleep( 2 ) # Settling time
|
||||
#RegionPositioner idInkr
|
||||
|
||||
@@ -6,7 +6,7 @@ ret = 'Test failed'
|
||||
status = False
|
||||
DEVICE = 'PO2DV-NCS-VHQ1'
|
||||
|
||||
scan = ManualScan(['time'], ['SetVA', 'ActualVA', 'ActualIA'] , [0.0], [10.0], [10])
|
||||
scan = ManualScan(['time'], ['SetVA', 'ActualVA', 'ActualIA'] , [0.0], [20.0], [10])
|
||||
scan.start()
|
||||
|
||||
#Creating channels: dimension 1
|
||||
@@ -41,13 +41,15 @@ for setpoint1 in frange(0.0, 120.0, 1.0, True):
|
||||
#Dimension 1
|
||||
#LinearPositioner SetVA
|
||||
print 'Ramping up power supply'
|
||||
for setpoint1 in frange(0.0, 10.0, 10.0, True):
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user