<?xml version="1.0" encoding="UTF-8"?>
<net name="Kit" type="iopt-flow">
  <event id="Rst" x="125" y="480" mode="input"/>
  <signal id="Enable" x="50" y="180" mode="input" type="boolean" min="0" max="1"/>
  <signal id="Led1" x="855" y="50" mode="output" type="boolean" min="0" max="1" dynamic="type" frac="0"/>
  <signal id="Led2" x="855" y="110" mode="output" type="boolean" min="0" max="1" dynamic="type" frac="0"/>
  <signal id="Led3" x="855" y="165" mode="output" type="boolean" min="0" max="1" dynamic="type" frac="0"/>
  <signal id="Led5" x="855" y="270" mode="output" type="boolean" min="0" max="1" dynamic="type" frac="0"/>
  <signal id="Led4" x="855" y="215" mode="output" type="boolean" min="0" max="1" dynamic="type" frac="0" value="0" io_pin="0">
    <comment text="" off_x="0" off_y="20"/>
  </signal>
  <signal id="Led6" x="855" y="320" mode="output" type="boolean" min="0" max="1" dynamic="type" frac="0" value="0" io_pin="0"/>
  <signal id="Led7" x="855" y="375" mode="output" type="boolean" min="0" max="1" dynamic="type" frac="0"/>
  <signal id="Led8" x="855" y="430" mode="output" type="boolean" min="0" max="1" dynamic="none" frac="0" value="0" io_pin="0"/>
  <place id="p014" x="190" y="105" init_marking="1">
    <name off_x="-10" off_y="-10" text="P_Idle"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <place id="p015" x="435" y="105" init_marking="0">
    <name off_x="-10" off_y="-10" text="P_Up"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <place id="p016" x="430" y="265" init_marking="0">
    <name off_x="-10" off_y="-10" text="P_Down"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t017" x="300" y="105" priority="0">
    <name off_x="-10" off_y="-10" text="T_Start"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <transition id="t018" x="190" y="265" priority="0">
    <name off_x="-10" off_y="-10" text="T_End"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <transition id="t019" x="355" y="180" priority="0">
    <name off_x="-10" off_y="-10" text="T_Min"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <transition id="t020" x="505" y="180" priority="0">
    <name off_x="-10" off_y="-10" text="T_Max"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a022" type="normal" source="p014" target="t017"/>
  <arc id="a023" type="normal" source="t017" target="p015"/>
  <arc id="a024" type="normal" source="p015" target="t020"/>
  <arc id="a025" type="normal" source="t020" target="p016"/>
  <arc id="a026" type="normal" source="p016" target="t019"/>
  <arc id="a027" type="normal" source="t019" target="p015"/>
  <arc id="a028" type="normal" source="p016" target="t018"/>
  <arc id="a029" type="normal" source="t018" target="p014"/>
  <arc id="a030" type="read" source="Enable" target="t017" view="symbolic"/>
  <operation id="o031" x="135" y="265" rot="0" shape="arrow" size="16">
    <name off_x="-11" off_y="-16" text="Disabled"/>
    <input off_x="-16" off_y="0" name="Enable" id="o031.Enable" type="boolean" min="0" max="1" dynamic="all"/>
    <output off_x="16" off_y="0" name="out" id="o031.out" type="range" min="-32768" max="32767" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="Enable" neg="true"/>
        <text>NOT(Enable)</text>
      </expression>
    </output>
  </operation>
  <arc id="a032" type="read" source="Enable" target="o031.Enable" view="symbolic"/>
  <arc id="a033" type="read" source="o031.out" target="t018"/>
  <signal id="Cntr" x="810" y="585" mode="internal" type="range" min="1" max="8" dynamic="none" frac="0" value="1" on_error="0"/>
  <operation id="o035" x="725" y="585" rot="0" shape="arrow" size="40">
    <name off_x="-35" off_y="-40" text="o035"/>
    <input off_x="-40" off_y="-24" name="CntUp" id="o035.CntUp" type="range" min="-32768" max="32767" frac="0"/>
    <input off_x="-40" off_y="-8" name="CntDn" id="o035.CntDn" type="range" min="0" max="255" dynamic="type" frac="0"/>
    <input off_x="-40" off_y="24" name="Cntr" id="o035.Cntr" type="range" min="1" max="8" dynamic="all" frac="0"/>
    <input name="Tick" id="o035.Tick" type="event" min="0" max="1" frac="0" off_x="-40" off_y="10"/>
    <output off_x="40" off_y="0" name="out" id="o035.out" type="range" min="-32768" max="32767" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="Cntr" delay="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Tick"/>
          <operator type="equal"/>
          <operand type="literal" value="0"/>
        </operand>
        <text>Cntr[-1] WHEN (Tick = 0)</text>
      </expression>
      <expression>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Cntr" delay="1"/>
          <operator type="more-or-equal"/>
          <operand type="literal" value="8"/>
          <operator type="and"/>
          <operand type="signal" idRef="CntUp"/>
        </operand>
        <text>1 WHEN (Cntr[-1] &gt;= 8 AND CntUp)</text>
      </expression>
      <expression>
        <operand type="literal" value="8"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Cntr" delay="1"/>
          <operator type="less-or-equal"/>
          <operand type="literal" value="1"/>
          <operator type="and"/>
          <operand type="signal" idRef="CntDn"/>
        </operand>
        <text>8 WHEN (Cntr[-1] &lt;= 1 AND CntDn)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Cntr" delay="1"/>
        <operator type="add"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="CntUp"/>
        </operand>
        <text>Cntr[-1] + 1 WHEN (CntUp)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Cntr" delay="1"/>
        <operator type="sub"/>
        <operand type="literal" value="1"/>
        <text>Cntr[-1] - 1 OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a036" type="read" source="Cntr" target="o035.Cntr" view="symbolic"/>
  <arc id="a037" type="read" source="o035.out" target="Cntr"/>
  <arc id="a039" type="read" source="p015" target="o035.CntUp" view="symbolic"/>
  <arc id="a040" type="read" source="p016" target="o035.CntDn" view="symbolic"/>
  <operation id="o042" x="245" y="595" rot="0" shape="arrow" size="40">
    <name off_x="-35" off_y="-40" text="o042"/>
    <input off_x="-40" off_y="-24" name="Rst" id="o042.Rst" type="event" dynamic="all"/>
    <input off_x="-40" off_y="-8" name="IncSpd" id="o042.IncSpd" type="event" dynamic="all"/>
    <input off_x="-40" off_y="8" name="DecSpd" id="o042.DecSpd" type="event" dynamic="all"/>
    <input off_x="-40" off_y="24" name="Speed" id="o042.Speed" type="range" min="1" max="10" dynamic="all" frac="0"/>
    <output off_x="40" off_y="0" name="out" id="o042.out" type="range" min="1" max="10" dynamic="type" frac="0">
      <expression>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Rst"/>
        </operand>
        <text>1 WHEN (Rst)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Speed" delay="1"/>
        <operator type="add"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="IncSpd"/>
        </operand>
        <text>Speed[-1] + 1 WHEN (IncSpd)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Speed" delay="1"/>
        <operator type="sub"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="DecSpd"/>
        </operand>
        <text>Speed[-1] - 1 WHEN (DecSpd)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Speed" delay="1"/>
        <text>Speed[-1]</text>
      </expression>
    </output>
  </operation>
  <arc id="a043" type="read" source="Rst" target="o042.Rst"/>
  <signal id="Speed" x="340" y="595" mode="output" type="range" min="1" max="10" dynamic="none" frac="0" value="1" on_error="0" io_pin="0"/>
  <arc id="a047" type="read" source="Speed" target="o042.Speed" view="symbolic"/>
  <arc id="a048" type="read" source="o042.out" target="Speed"/>
  <signal id="Timer" x="525" y="595" mode="internal" type="range" min="0" max="2000" frac="0" value="0" dynamic="none"/>
  <operation id="o051" x="445" y="595" rot="0" shape="arrow" size="32">
    <name off_x="-27" off_y="-32" text="o051"/>
    <input off_x="-32" off_y="-16" name="Rst" id="o051.Rst" type="event" dynamic="all"/>
    <input off_x="-32" off_y="0" name="Speed" id="o051.Speed" type="range" min="1" max="10" dynamic="all" frac="0"/>
    <input off_x="-32" off_y="16" name="Timer" id="o051.Timer" type="range" min="0" max="2000" dynamic="all" frac="0"/>
    <output off_x="32" off_y="0" name="out" id="o051.out" type="range" min="0" max="2000" dynamic="type" frac="0">
      <expression>
        <operand type="literal" value="0"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Rst"/>
        </operand>
        <text>0 WHEN (Rst)</text>
      </expression>
      <expression>
        <operand type="literal" value="0"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Timer" delay="1"/>
          <operator type="more-or-equal"/>
          <operand type="literal" value="2000"/>
        </operand>
        <text>0 WHEN (Timer[-1] &gt;= 2000)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Timer" delay="1"/>
        <operator type="add"/>
        <operand type="signal" idRef="Speed"/>
        <text>Timer[-1] + Speed OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a052" type="read" source="Rst" target="o051.Rst"/>
  <arc id="a053" type="read" source="Speed" target="o051.Speed"/>
  <arc id="a054" type="read" source="o051.out" target="Timer"/>
  <arc id="a055" type="read" source="Timer" target="o051.Timer" view="symbolic"/>
  <operation id="o056" x="595" y="595" rot="0" shape="arrow" size="16">
    <name off_x="-11" off_y="-16" text="Tick"/>
    <input off_x="-16" off_y="0" name="Timer" id="o056.Timer" type="range" min="0" max="2000" dynamic="all" frac="0"/>
    <output off_x="16" off_y="0" name="out" id="o056.out" type="event" min="0" max="1" dynamic="none" frac="0">
      <expression>
        <operand type="signal" idRef="Timer"/>
        <operator type="less"/>
        <operand type="signal" idRef="Timer" delay="1"/>
        <text>Timer &lt; Timer[-1]</text>
      </expression>
    </output>
  </operation>
  <arc id="a057" type="read" source="Timer" target="o056.Timer"/>
  <arc id="a058" type="read" source="o056.out" target="o035.Tick"/>
  <operation id="o059" x="665" y="250" rot="0" shape="rect" size="114">
    <name off_x="-91" off_y="-114" text="Demux"/>
    <input off_x="-114" off_y="-35" name="Enable" id="o059.Enable" type="boolean" min="0" max="1" dynamic="all"/>
    <input off_x="-114" off_y="35" name="Cntr" id="o059.Cntr" type="range" min="1" max="8" dynamic="all" frac="0"/>
    <output off_x="115" off_y="-75" name="O1" id="o059.O1" type="boolean" min="0" max="1" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="Enable"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr"/>
        <operator type="equal"/>
        <operand type="literal" value="1"/>
        <text>Enable AND Cntr = 1</text>
      </expression>
    </output>
    <output name="O2" id="o059.O2" type="boolean" min="0" max="1" frac="0" off_x="115" off_y="-55">
      <expression>
        <operand type="signal" idRef="Enable"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr"/>
        <operator type="equal"/>
        <operand type="literal" value="2"/>
        <text>Enable AND Cntr = 2</text>
      </expression>
    </output>
    <output name="O3" id="o059.O3" type="boolean" min="0" max="1" frac="0" off_x="115" off_y="-35">
      <expression>
        <operand type="signal" idRef="Enable"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr"/>
        <operator type="equal"/>
        <operand type="literal" value="3"/>
        <text>Enable AND Cntr = 3</text>
      </expression>
    </output>
    <output name="O4" id="o059.O4" type="boolean" min="0" max="1" frac="0" off_x="115" off_y="-15">
      <expression>
        <operand type="signal" idRef="Enable"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr"/>
        <operator type="equal"/>
        <operand type="literal" value="4"/>
        <text>Enable AND Cntr = 4</text>
      </expression>
    </output>
    <output name="O5" id="o059.O5" type="boolean" min="0" max="1" frac="0" off_x="115" off_y="5">
      <expression>
        <operand type="signal" idRef="Enable"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr"/>
        <operator type="equal"/>
        <operand type="literal" value="5"/>
        <text>Enable AND Cntr = 5</text>
      </expression>
    </output>
    <output name="O6" id="o059.O6" type="boolean" min="0" max="1" frac="0" off_x="115" off_y="25">
      <expression>
        <operand type="signal" idRef="Enable"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr"/>
        <operator type="equal"/>
        <operand type="literal" value="6"/>
        <text>Enable AND Cntr = 6</text>
      </expression>
    </output>
    <output name="O7" id="o059.O7" type="boolean" min="0" max="1" frac="0" off_x="115" off_y="45">
      <expression>
        <operand type="signal" idRef="Enable"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr"/>
        <operator type="equal"/>
        <operand type="literal" value="7"/>
        <text>Enable AND Cntr = 7</text>
      </expression>
    </output>
    <output name="O8" id="o059.O8" type="boolean" min="0" max="1" frac="0" off_x="115" off_y="65">
      <expression>
        <operand type="signal" idRef="Enable"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr"/>
        <operator type="equal"/>
        <operand type="literal" value="8"/>
        <text>Enable AND Cntr = 8</text>
      </expression>
    </output>
  </operation>
  <arc id="a060" type="read" source="Enable" target="o059.Enable" view="symbolic"/>
  <arc id="a061" type="read" source="Cntr" target="o059.Cntr" view="symbolic"/>
  <arc id="a062" type="read" source="o059.O1" target="Led1"/>
  <arc id="a063" type="read" source="o059.O2" target="Led2"/>
  <arc id="a064" type="read" source="o059.O3" target="Led3"/>
  <arc id="a065" type="read" source="o059.O4" target="Led4"/>
  <arc id="a066" type="read" source="o059.O5" target="Led5"/>
  <arc id="a067" type="read" source="o059.O6" target="Led6"/>
  <arc id="a068" type="read" source="o059.O7" target="Led7"/>
  <arc id="a069" type="read" source="o059.O8" target="Led8"/>
  <operation id="o001" x="435" y="180" rot="0" shape="arrow" size="24">
    <name off_x="-19" off_y="-24" text="Max"/>
    <input off_x="-24" off_y="-8" name="Tick" id="o001.Tick" type="event" min="0" max="1" dynamic="type" frac="0"/>
    <input off_x="-24" off_y="8" name="Cntr" id="o001.Cntr" type="range" min="1" max="8" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="o001.out" type="boolean" min="0" max="1" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="Tick"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr" delay="1"/>
        <operator type="equal"/>
        <operand type="literal" value="8"/>
        <text>Tick AND Cntr[-1] = 8</text>
      </expression>
    </output>
  </operation>
  <arc id="a002" type="read" source="Cntr" target="o001.Cntr" view="symbolic"/>
  <arc id="a003" type="read" source="o056.out" target="o001.Tick" view="symbolic"/>
  <arc id="a004" type="read" source="o001.out" target="t020"/>
  <operation id="o005" x="280" y="180" rot="0" shape="arrow" size="24">
    <name off_x="-19" off_y="-24" text="Min"/>
    <input off_x="-24" off_y="-8" name="Tick" id="o005.Tick" type="event" min="0" max="1" dynamic="type" frac="0"/>
    <input off_x="-24" off_y="8" name="Cntr" id="o005.Cntr" type="range" min="1" max="8" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="o005.out" type="boolean" min="0" max="1" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="Tick"/>
        <operator type="and"/>
        <operand type="signal" idRef="Cntr" delay="1"/>
        <operator type="equal"/>
        <operand type="literal" value="1"/>
        <text>Tick AND Cntr[-1] = 1</text>
      </expression>
    </output>
  </operation>
  <arc id="a006" type="read" source="o005.out" target="t019"/>
  <arc id="a007" type="read" source="Cntr" target="o005.Cntr" view="symbolic"/>
  <arc id="a008" type="read" source="o056.out" target="o005.Tick" view="symbolic"/>
  <event id="DecSpd" x="70" y="605" mode="input"/>
  <event id="IncSpd" x="115" y="585" mode="input"/>
  <arc id="a012" type="read" source="IncSpd" target="o042.IncSpd"/>
  <arc id="a013" type="read" source="DecSpd" target="o042.DecSpd"/>
  <transition id="t001" x="300" y="45" priority="0">
    <name off_x="-10" off_y="-10" text="TEnd2"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a005" type="read" source="o031.out" target="t001" view="symbolic"/>
  <arc id="a009" type="normal" source="p015" target="t001"/>
  <arc id="a010" type="normal" source="t001" target="p014"/>
</net>
