74 lines
5.2 KiB
XML
74 lines
5.2 KiB
XML
<?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>
|