<!--new sequencer for SMART SKIPPER-->
<!--Tested with module 2, where this sequencer reads out the whole CCD through the first two amplifiers.-->

<variables>
    <state name="V1A" val="000000000000000000000000000001"/>
    <state name="V1B" val="000000000000000000000000000010"/>
    <state name="V2C" val="000000000000000000000000000100"/>
    <state name="V3A" val="000000000000000000000000001000"/>
    <state name="V3B" val="000000000000000000000000010000"/>
    <state name="H1A" val="000000000000000000000000100000"/>
    <state name="H1B" val="000000000000000000000001000000"/>
    <state name="H2C" val="000000000000000000000010000000"/>
    <state name="H3A" val="000000000000000000000100000000"/>
    <state name="H3B" val="000000000000000000001000000000"/>
    <state name="SWA" val="000000000000000000010000000000"/>
    <state name="SWB" val="000000000000000000100000000000"/>
    <state name="RGA" val="000000000000000001000000000000"/>
    <state name="RGB" val="000000000000000010000000000000"/>
    <state name="OGA" val="000000000000000100000000000000"/>
    <state name="OGB" val="000000000000001000000000000000"/>
    <state name="DGA" val="000000000000010000000000000000"/>
    <state name="DGB" val="000000000000100000000000000000"/>
    <state name="TGA" val="000000000001000000000000000000"/>
    <state name="TGB" val="000000000010000000000000000000"/>
    <state name="ECA" val="000000001000000000000000000000"/>
    <state name="ECB" val="000000010000000000000000000000"/>
    <state name="ECC" val="000000100000000000000000000000"/>
    <state name="ECD" val="000001000000000000000000000000"/>
    <state name="HD1" val="000010000000000000000000000000"/>
    <state name="HD2" val="000100000000000000000000000000"/>

    <state name="STATE_SLO"  val="V1A |                                                                                                                         HD2"/>
    <state name="STATE_SHI"  val="V1A |                                                                   RGA |                                                 HD2"/>
    <state name="STATE_PLO"  val="V1A |                                                                                                                   HD1      "/>
    <state name="STATE_PHI"  val="V1A |                                                                   RGA |                                           HD1      "/>
    <state name="STATE_0"    val="V1A | V1B                                                                                                                        "/>

    <var name="NROW" val="50"/>
    <var name="NCOL" val="50"/>

    <var name="NSAMP" val="400"/>

    <var name="CCDNPRES" val="7"/>
    <!--
    <var name="CCDNROW" val="1248"/>
    <var name="CCDNCOL" val="724"/>-->
    <var name="CCDNROW" val="6144"/>
    <var name="CCDNCOL" val="886"/>

    <var name="delay_Integ_sim"           val="400"/>
    <var name="delay_Integ_sim2"          val="100"/>
    <var name="delay_Integ_sim3"          val="280"/>
    <var name="delay_wait_sim"            val="20"/>
    <var name="delay_wait_extra"          val="20"/>
</variables>

<dynamicVariables>
    <var name="x" vals="NSAMP"/>
</dynamicVariables>

<!--horizontal_step has large delays because sequencer seems to have problems with a short recipe in the innermost loop-->
<recipes>
    <recipe name="skipper_simhi">
        <step state="STATE_PHI"   delay="delay_Integ_sim3"/>
        <step state="STATE_PLO"   delay="delay_Integ_sim2"/>
        <step state="STATE_SHI"   delay="delay_Integ_sim2"/>
        <step state="STATE_SLO"   delay="delay_Integ_sim3"/>
        <step state="STATE_0"     delay="delay_wait_extra"/>
    </recipe>
    <recipe name="wait_sim">
        <step state="STATE_0"   delay="delay_wait_sim"/>
    </recipe>
</recipes>

<sequence>
    <recipe name="wait_sim" n="NROW">
        <recipe name="wait_sim" n="NCOL">
            <recipe name="skipper_simhi" n="NSAMP">
            </recipe>
        </recipe>
    </recipe>
</sequence>
