<?xml version="1.0" encoding="UTF-8"?>
<net name="Test" type="iopt-flow">
  <operation id="o3" x="100" y="190" constant="200" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="200"/>
    <output off_x="20" off_y="0" name="K" id="o3_K" type="range" min="200" max="200" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>200</text>
        <operand type="literal" value="200"/>
      </expression>
    </output>
  </operation>
  <signal id="s4" x="140" y="210" mode="input" type="range" min="0" max="4095" frac="0" value="0" dynamic="none" microstep="0" nano-step="0"/>
  <operation id="o6" x="190" y="230" constant="10" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="10"/>
    <output off_x="20" off_y="0" name="K" id="o6_K" type="range" min="10" max="10" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>10</text>
        <operand type="literal" value="10"/>
      </expression>
    </output>
  </operation>
  <signal id="s7" x="140" y="170" mode="input" type="boolean" min="0" max="1" microstep="0" nano-step="0"/>
  <event id="e8" x="105" y="150" mode="input" microstep="0" nano-step="0"/>
  <signal id="s9" x="520" y="190" mode="output" type="boolean" dynamic="type" microstep="0" nano-step="3"/>
  <signal id="s10" x="490" y="210" mode="output" type="boolean" dynamic="type" microstep="0" nano-step="3"/>
  <arc id="a11" type="read" source="o3_K" target="c2_Period"/>
  <arc id="a12" type="read" source="s4" target="c2_DC"/>
  <arc id="a14" type="read" source="o6_K" target="c2_DeadTime"/>
  <arc id="a16" type="read" source="s7" target="c2_Enable"/>
  <arc id="a17" type="read" source="e8" target="c2_Rst"/>
  <arc id="a18" type="read" source="c2_OutL" target="s9"/>
  <arc id="a19" type="read" source="c2_OutH" target="s10"/>
  <signal id="c2_Enable" x="75" y="195" mode="internal" type="boolean" min="0" max="1" component-id="c2" component-mode="input" microstep="0" nano-step="1"/>
  <arc id="c2_a2" type="read" source="c2_Enable" target="c2_c1_Enable" component-id="c2"/>
  <signal id="c2_Period" x="110" y="215" mode="internal" type="range" min="1" max="4096" frac="0" value="1" dynamic="none" component-id="c2" component-mode="input" microstep="0" nano-step="1"/>
  <arc id="c2_a4" type="read" source="c2_Period" target="c2_c1_Period" component-id="c2"/>
  <event id="c2_Rst" x="110" y="175" mode="internal" component-id="c2" component-mode="input" microstep="0" nano-step="1"/>
  <arc id="c2_a6" type="read" source="c2_Rst" target="c2_c1_Rst" component-id="c2"/>
  <signal id="c2_DC" x="80" y="300" mode="internal" type="range" min="0" max="4095" frac="0" value="1" dynamic="none" component-id="c2" component-mode="input" microstep="0" nano-step="1"/>
  <signal id="c2_DeadTime" x="80" y="380" mode="internal" type="range" min="0" max="255" frac="0" value="0" dynamic="none" component-id="c2" component-mode="input" microstep="0" nano-step="1"/>
  <signal id="c2_OutH" x="520" y="365" mode="internal" type="boolean" min="0" max="1" dynamic="type" frac="0" component-id="c2" component-mode="output" microstep="0" nano-step="2"/>
  <signal id="c2_OutL" x="520" y="290" mode="internal" type="boolean" min="0" max="1" dynamic="type" frac="0" component-id="c2" component-mode="output" microstep="0" nano-step="2"/>
  <operation id="c2_o11" x="405" y="290" rot="0" shape="arrow" size="24" component-id="c2">
    <name off_x="-10" off_y="5" text="o11"/>
    <input off_x="-24" off_y="-8" name="Cntr" id="c2_o11_Cntr" type="range" min="0" max="4095" dynamic="all"/>
    <input off_x="-24" off_y="8" name="DC" id="c2_o11_DC" type="range" min="0" max="4095" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="c2_o11_out" type="boolean" min="0" max="1" dynamic="none" frac="0" microstep="0" nano-step="2">
      <expression>
        <operand type="signal" idRef="Cntr"/>
        <operator type="less"/>
        <operand type="signal" idRef="DC"/>
        <text>Cntr &lt; DC</text>
      </expression>
    </output>
  </operation>
  <arc id="c2_a12" type="read" source="c2_c1_Cntr" target="c2_o11_Cntr" view="symbolic" component-id="c2"/>
  <arc id="c2_a13" type="read" source="c2_DC" target="c2_o11_DC" component-id="c2"/>
  <operation id="c2_o15" x="410" y="365" rot="0" shape="arrow" size="32" component-id="c2">
    <name off_x="-10" off_y="5" text="o15"/>
    <input off_x="-32" off_y="-16" name="Cntr" id="c2_o15_Cntr" type="range" min="0" max="4095" dynamic="all"/>
    <input off_x="-32" off_y="0" name="DC" id="c2_o15_DC" type="range" min="0" max="4095" dynamic="all" frac="0"/>
    <input off_x="-32" off_y="16" name="DeadTime" id="c2_o15_DeadTime" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <output off_x="32" off_y="0" name="out" id="c2_o15_out" type="boolean" min="0" max="1" dynamic="none" frac="0" microstep="0" nano-step="2">
      <expression>
        <operand type="signal" idRef="Cntr"/>
        <operator type="more"/>
        <operand type="signal" idRef="DC"/>
        <operator type="add"/>
        <operand type="signal" idRef="DeadTime"/>
        <text>Cntr &gt; DC + DeadTime</text>
      </expression>
    </output>
  </operation>
  <arc id="c2_a16" type="read" source="c2_o11_out" target="c2_OutL" component-id="c2"/>
  <arc id="c2_a17" type="read" source="c2_c1_Cntr" target="c2_o15_Cntr" view="symbolic" component-id="c2"/>
  <arc id="c2_a18" type="read" source="c2_DC" target="c2_o15_DC" component-id="c2"/>
  <arc id="c2_a19" type="read" source="c2_DeadTime" target="c2_o15_DeadTime" component-id="c2"/>
  <arc id="c2_a20" type="read" source="c2_o15_out" target="c2_OutH" component-id="c2"/>
  <event id="c2_Start" x="490" y="195" mode="internal" component-id="c2" component-mode="output" microstep="0" nano-step="0"/>
  <event id="c2_Center" x="520" y="175" mode="internal" component-id="c2" component-mode="output" microstep="0" nano-step="0"/>
  <arc id="c2_a23" type="read" source="c2_c1_Max" target="c2_Center" component-id="c2"/>
  <arc id="c2_a24" type="read" source="c2_c1_Min" target="c2_Start" component-id="c2"/>
  <place id="c2_c2_c1_p1" x="375" y="195" init_marking="1" component-id="c2.c2.c1" tr_fire_dep="true">
    <name off_x="-10" off_y="-10" text="PCntUp"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <place id="c2_c2_c1_p2" x="375" y="300" init_marking="0" component-id="c2.c2.c1">
    <name off_x="-10" off_y="-10" text="PCntDown"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="c2_c2_c1_t3" x="425" y="245" priority="0" component-id="c2.c2.c1" microstep="0">
    <name off_x="-10" off_y="-10" text="TMax"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <transition id="c2_c2_c1_t4" x="315" y="245" priority="0" component-id="c2.c2.c1" microstep="0">
    <name off_x="-10" off_y="-10" text="TMin"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <signal id="c2_c2_c1_Period" x="100" y="255" mode="internal" type="range" min="1" max="4096" frac="0" value="1024" dynamic="none" component-id="c2.c2.c1" component-mode="input" microstep="0" nano-step="0" tr_fire_dep="true"/>
  <signal id="c2_c2_c1_Cntr" x="735" y="155" mode="internal" type="range" min="0" max="4095" dynamic="none" frac="0" value="0" component-id="c2.c2.c1" component-mode="output" microstep="0" nano-step="1" dep_place="true" tr_fire_dep="true"/>
  <event id="c2_c2_c1_Rst" x="425" y="120" mode="internal" component-id="c2.c2.c1" component-mode="input" microstep="0" nano-step="0" tr_fire_dep="true"/>
  <signal id="c2_c2_c1_Enable" x="460" y="140" mode="internal" type="boolean" min="0" max="1" component-id="c2.c2.c1" component-mode="input" microstep="0" nano-step="0" tr_fire_dep="true"/>
  <arc id="c2_c2_c1_a11" type="normal" source="c2_c2_c1_p1" target="c2_c2_c1_t3" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a12" type="normal" source="c2_c2_c1_t3" target="c2_c2_c1_p2" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a13" type="normal" source="c2_c2_c1_p2" target="c2_c2_c1_t4" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a14" type="normal" source="c2_c2_c1_t4" target="c2_c2_c1_p1" component-id="c2.c2.c1"/>
  <operation id="c2_c2_c1_o16" x="595" y="155" rot="0" shape="arrow" size="48" component-id="c2.c2.c1">
    <name off_x="-10" off_y="5" text="o16"/>
    <input off_x="-48" off_y="-32" name="Rst" id="c2_c2_c1_o16_Rst" type="range" min="-32768" max="32767" dynamic="all" tr_fire_dep="true"/>
    <input off_x="-48" off_y="-16" name="Enable" id="c2_c2_c1_o16_Enable" type="boolean" min="0" max="1" dynamic="all" tr_fire_dep="true"/>
    <input off_x="-48" off_y="0" name="p1" id="c2_c2_c1_o16_p1" type="range" min="-32768" max="32767" dynamic="all" dep_place="true" tr_fire_dep="true"/>
    <input off_x="-48" off_y="16" name="p2" id="c2_c2_c1_o16_p2" type="range" min="-32768" max="32767" dynamic="all" dep_place="true"/>
    <input off_x="-48" off_y="32" name="Cntr_in" id="c2_c2_c1_o16_Cntr_in" type="range" min="0" max="4095" dynamic="type" frac="0" dep_place="true"/>
    <output off_x="48" off_y="0" name="out" id="c2_c2_c1_o16_out" type="range" min="0" max="4095" dynamic="none" frac="0" microstep="0" nano-step="1" dep_place="true" tr_fire_dep="true">
      <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="signal" idRef="Cntr_in" delay="1"/>
        <operator type="when"/>
        <operand type="signal" idRef="Enable"/>
        <operator type="equal"/>
        <operand type="literal" value="0"/>
        <text>Cntr_in[-1] WHEN (Enable = 0)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Cntr_in" delay="1"/>
        <operator type="add"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="signal" idRef="p1"/>
        <text>Cntr_in[-1] + 1 WHEN (p1)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Cntr_in" delay="1"/>
        <operator type="sub"/>
        <operand type="literal" value="1"/>
        <text>Cntr_in[-1] - 1 OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="c2_c2_c1_a17" type="read" source="c2_c2_c1_Rst" target="c2_c2_c1_o16_Rst" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a18" type="read" source="c2_c2_c1_Enable" target="c2_c2_c1_o16_Enable" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a19" type="read" source="c2_c2_c1_p1" target="c2_c2_c1_o16_p1" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a21" type="read" source="c2_c2_c1_p2" target="c2_c2_c1_o16_p2" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a22" type="read" source="c2_c2_c1_o16_out" target="c2_c2_c1_o16_Cntr_in" view="symbolic" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a23" type="read" source="c2_c2_c1_o16_out" target="c2_c2_c1_Cntr" component-id="c2.c2.c1"/>
  <operation id="c2_c2_c1_o26" x="205" y="245" rot="0" shape="arrow" size="24" component-id="c2.c2.c1">
    <name off_x="-10" off_y="5" text="o26"/>
    <input off_x="-24" off_y="-8" name="Cntr" id="c2_c2_c1_o26_Cntr" type="range" min="0" max="4095" dynamic="all" frac="0" dep_place="true" tr_fire_dep="true"/>
    <input off_x="-24" off_y="8" name="Period" id="c2_c2_c1_o26_Period" type="range" min="1" max="4096" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="c2_c2_c1_o26_out" type="range" min="0" max="4096" dynamic="type" frac="0" microstep="0" nano-step="2" dep_place="true" tr_fire_dep="true">
      <expression>
        <operand type="signal" idRef="Cntr"/>
        <operator type="less-or-equal"/>
        <operand type="literal" value="0"/>
        <text>Cntr &lt;= 0</text>
      </expression>
    </output>
  </operation>
  <arc id="c2_c2_c1_a27" type="read" source="c2_c2_c1_Period" target="c2_c2_c1_o26_Period" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a28" type="read" source="c2_c2_c1_Cntr" target="c2_c2_c1_o26_Cntr" view="symbolic" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a29" type="read" source="c2_c2_c1_o26_out" target="c2_c2_c1_t4" component-id="c2.c2.c1"/>
  <operation id="c2_c2_c1_o30" x="205" y="315" rot="0" shape="arrow" size="24" component-id="c2.c2.c1">
    <name off_x="-10" off_y="5" text="o26"/>
    <input off_x="-24" off_y="-8" name="Cntr_B" id="c2_c2_c1_o30_Cntr_B" type="range" min="0" max="4095" dynamic="all" frac="0" dep_place="true" tr_fire_dep="true"/>
    <input off_x="-24" off_y="8" name="Period_B" id="c2_c2_c1_o30_Period_B" type="range" min="1" max="4096" dynamic="all" frac="0" tr_fire_dep="true"/>
    <output off_x="24" off_y="0" name="out" id="c2_c2_c1_o30_out" type="range" min="0" max="4096" dynamic="type" frac="0" microstep="0" nano-step="2" dep_place="true" tr_fire_dep="true">
      <expression>
        <operand type="signal" idRef="Cntr_B"/>
        <operator type="more-or-equal"/>
        <operand type="signal" idRef="Period_B"/>
        <text>Cntr_B &gt;= Period_B</text>
      </expression>
    </output>
  </operation>
  <arc id="c2_c2_c1_a31" type="read" source="c2_c2_c1_Period" target="c2_c2_c1_o30_Period_B" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a32" type="read" source="c2_c2_c1_Cntr" target="c2_c2_c1_o30_Cntr_B" view="symbolic" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a33" type="read" source="c2_c2_c1_o30_out" target="c2_c2_c1_t3" component-id="c2.c2.c1"/>
  <event id="c2_c2_c1_Max" x="735" y="235" mode="internal" component-id="c2.c2.c1" component-mode="output" microstep="1" nano-step="0"/>
  <event id="c2_c2_c1_Min" x="735" y="300" mode="internal" component-id="c2.c2.c1" component-mode="output" microstep="1" nano-step="0"/>
  <arc id="c2_c2_c1_a3" type="read" source="c2_c2_c1_t3" target="c2_c2_c1_Max" view="symbolic" component-id="c2.c2.c1"/>
  <arc id="c2_c2_c1_a4" type="read" source="c2_c2_c1_t4" target="c2_c2_c1_Min" view="symbolic" component-id="c2.c2.c1"/>
</net>
