<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" failOnSensorError="true">
    <data fileName="Motor Test 3.fda"/>
    <scan>
        <dimension>
            <positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.1" id="idX">
                <counts>3000</counts>
            </positioner>

            <positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RegionPositioner" name="{DEVICE}:INKR:2" settlingTime="5.0" id="idInkr">
                <region>
                    <start>0.0</start>
                    <end>10.0</end>
                    <stepSize>1.0</stepSize>
                </region>
                <region>
                    <start>10.0</start>
                    <end>0.0</end>
                    <stepSize>-1.0</stepSize>
                </region>
            </positioner>
	    
            <!-- Motor Drive Status -->
            <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:STA:1" id="idMotorStatus"/>
             
            <!-- Logical Position -->
            <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST:2" id="idLogicalPosition"/>

            <!-- Collimator Diameter -->
            <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:DIAM:2" id="idDiameter"/>
              	    
            <!-- Position Counter: Processed -->
            <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST1:2" id="idMotorPosition"/>
            
            <!-- Potentiometer: Raw -->
            <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:POSA:1" id="idPotiRaw"/>
            
            <!-- Potentiometer: Processed -->
            <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:POSA:2" id="idPotiProc"/>
            
            <!-- BTVS Digitiser: Raw -->
            <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST3:1" id="idBtvsRaw"/>

            <!-- BTVS Digitiser: Processed -->
            <detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="{DEVICE}:IST3:2" id="idBtvsProc"/>
            
        </dimension>
        <manipulation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptManipulation" id="idDiff01">
            <mapping xsi:type="IDParameterMapping" refid="idMotorPosition" variable="a"/>
            <mapping xsi:type="IDParameterMapping" refid="idPotiProc" variable="b"/>
            <mapping xsi:type="IDParameterMapping" refid="idX" 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="idDiff02">
            <mapping xsi:type="IDParameterMapping" refid="idMotorPosition" variable="a"/>
            <mapping xsi:type="IDParameterMapping" refid="idBtvsProc" variable="b"/>
            <mapping xsi:type="IDParameterMapping" refid="idX" variable="count"/>
            <script>def process(a,b,count):
    return a-b</script>
        </manipulation>
	
    </scan>
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idMotorStatus"     title="idMotorStatus"/>
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idLogicalPosition" title="idLogicalPosition"/> 
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idDiameter"        title="idDiameter"/> 
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idMotorPosition"   title="idMotorPosition"/>
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idPotiRaw"         title="idPotiRaw"/>
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idPotiProc"        title="idPotiProc"/>
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idBtvsRaw"         title="idBtvsRaw"/>
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idBtvsProc"        title="idBtvsProc"/>
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idDiff01"          title="idDiff01"/>
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="idX" y="idDiff02"          title="idDiff02"/>
</configuration>
