<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0">
    <data fileName="Check Status.fda"/>
    <scan>
        <dimension>
            <!-- Set up a Pseudo Positioner that samples every 50ms for 70 samples -->
           <positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" settlingTime="0.1" id="id000000">
                <counts>3000</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 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"/> 

            <!-- 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="id000003" variable="b"/>
            <script>def process(a,b):
    return a-b</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="Encoder Count (ENCODERraw)"/> 
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000006" title="Encoder Position (ENCODER)"/> 
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000009" title="Motor/Encoder Diff"/> 
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000007" title="Drive Ready (RDY)"/> 
    <visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id000000" y="id000008" title="Drive interlock (ILK)"/> 
</configuration>

