<?xml version='1.0' encoding='utf-8'?>
<!-- fileHeader and contentHeader synthesised 2026-08-27. The program arrived
     from the PLC_Defuser dataset with neither, and without the PLCopen
     namespace, so no conforming importer would recognise it as PLCopen XML.
     Only these headers and the namespace were added; the POUs, the ladder
     bodies and the configuration are untouched. -->
<project xmlns="http://www.plcopen.org/xml/tc6_0200" xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <fileHeader companyName="Unknown" productName="PLC_Defuser dataset" productVersion="1.0" creationDateTime="2019-01-01T00:00:00" />
  <contentHeader name="legitimate_lsub_function">
    <coordinateInfo>
      <fbd><scaling x="1" y="1" /></fbd>
      <ld><scaling x="1" y="1" /></ld>
      <sfc><scaling x="1" y="1" /></sfc>
    </coordinateInfo>
  </contentHeader>
  <types>
    <dataTypes/>
    <pous>
      <pou name="program0" pouType="program">
        <interface>
          <inputVars>
            <variable name="TLB2">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="TLB1">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="START">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="STOP">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="VALUE">
              <type>
                <INT/>
              </type>
            </variable>
          </inputVars>
          <outputVars>
            <variable name="MV1">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="MV2">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="CYCLE_ON">
              <type>
                <BOOL/>
              </type>
            </variable>
          </outputVars>
          <localVars>
            <variable name="FILTERED_VALUE">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="valves_handler0">
              <type>
                <derived name="valves_handler"/>
              </type>
            </variable>
            <variable name="stop_cycle0">
              <type>
                <derived name="stop_cycle"/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <LD>
            <leftPowerRail localId="1" height="480" width="10">
              <position x="20" y="10"/>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="20"/>
              </connectionPointOut>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="170"/>
              </connectionPointOut>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="310"/>
              </connectionPointOut>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="460"/>
              </connectionPointOut>
            </leftPowerRail>
            <rightPowerRail localId="2" height="460" width="10">
              <position x="730" y="10"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="6">
                  <position x="730" y="30"/>
                  <position x="491" y="30"/>
                </connection>
              </connectionPointIn>
              <connectionPointIn>
                <relPosition x="0" y="170"/>
                <connection refLocalId="25" formalParameter="ENO">
                  <position x="730" y="180"/>
                  <position x="550" y="180"/>
                  <position x="550" y="140"/>
                  <position x="370" y="140"/>
                </connection>
              </connectionPointIn>
              <connectionPointIn>
                <relPosition x="0" y="290"/>
                <connection refLocalId="30" formalParameter="ENO">
                  <position x="730" y="300"/>
                  <position x="590" y="300"/>
                  <position x="590" y="290"/>
                  <position x="450" y="290"/>
                </connection>
              </connectionPointIn>
              <connectionPointIn>
                <relPosition x="0" y="440"/>
                <connection refLocalId="32" formalParameter="ENO">
                  <position x="730" y="450"/>
                  <position x="575" y="450"/>
                  <position x="575" y="460"/>
                  <position x="420" y="460"/>
                </connection>
              </connectionPointIn>
            </rightPowerRail>
            <contact localId="3" height="20" width="21" negated="false">
              <position x="140" y="20"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="140" y="30"/>
                  <position x="30" y="30"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="10"/>
              </connectionPointOut>
              <variable>START</variable>
            </contact>
            <contact localId="4" height="20" width="21" negated="true">
              <position x="280" y="18"/>
              <connectionPointIn>
                <relPosition x="0" y="12"/>
                <connection refLocalId="3">
                  <position x="280" y="30"/>
                  <position x="220" y="30"/>
                  <position x="220" y="32"/>
                  <position x="161" y="32"/>
                </connection>
                <connection refLocalId="21">
                  <position x="280" y="30"/>
                  <position x="221" y="30"/>
                  <position x="221" y="102"/>
                  <position x="171" y="102"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="12"/>
              </connectionPointOut>
              <variable>STOP</variable>
            </contact>
            <coil localId="6" height="20" width="21" negated="false">
              <position x="470" y="18"/>
              <connectionPointIn>
                <relPosition x="0" y="12"/>
                <connection refLocalId="4">
                  <position x="470" y="30"/>
                  <position x="301" y="30"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="12"/>
              </connectionPointOut>
              <variable>CYCLE_ON</variable>
            </coil>
            <inVariable localId="18" height="30" width="130" negated="false">
              <position x="90" y="320"/>
              <connectionPointOut>
                <relPosition x="130" y="10"/>
              </connectionPointOut>
              <expression>FILTERED_VALUE</expression>
            </inVariable>
            <outVariable localId="19" height="30" width="50" negated="false">
              <position x="570" y="330"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="30" formalParameter="OUT_MV1">
                  <position x="570" y="340"/>
                  <position x="510" y="340"/>
                  <position x="510" y="310"/>
                  <position x="450" y="310"/>
                </connection>
              </connectionPointIn>
              <expression>MV1</expression>
            </outVariable>
            <outVariable localId="20" height="30" width="50" negated="false">
              <position x="490" y="360"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="30" formalParameter="OUT_MV2">
                  <position x="490" y="380"/>
                  <position x="470" y="380"/>
                  <position x="470" y="330"/>
                  <position x="450" y="330"/>
                </connection>
              </connectionPointIn>
              <expression>MV2</expression>
            </outVariable>
            <contact localId="21" height="20" width="21" negated="false">
              <position x="150" y="90"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="150" y="100"/>
                  <position x="90" y="100"/>
                  <position x="90" y="30"/>
                  <position x="30" y="30"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="10"/>
              </connectionPointOut>
              <variable>CYCLE_ON</variable>
            </contact>
            <contact localId="22" height="20" width="21" negated="false">
              <position x="140" y="280"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="140" y="290"/>
                  <position x="85" y="290"/>
                  <position x="85" y="320"/>
                  <position x="30" y="320"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="10"/>
              </connectionPointOut>
              <variable>CYCLE_ON</variable>
            </contact>
            <inVariable localId="23" height="30" width="50" negated="false">
              <position x="170" y="360"/>
              <connectionPointOut>
                <relPosition x="50" y="20"/>
              </connectionPointOut>
              <expression>TLB1</expression>
            </inVariable>
            <inVariable localId="24" height="30" width="50" negated="false">
              <position x="200" y="400"/>
              <connectionPointOut>
                <relPosition x="50" y="20"/>
              </connectionPointOut>
              <expression>TLB2</expression>
            </inVariable>
            <block localId="25" typeName="SUB" height="80" width="70">
              <position x="300" y="110"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="1">
                      <position x="300" y="140"/>
                      <position x="165" y="140"/>
                      <position x="165" y="180"/>
                      <position x="30" y="180"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="28">
                      <position x="300" y="160"/>
                      <position x="196" y="160"/>
                      <position x="196" y="180"/>
                      <position x="170" y="180"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="70"/>
                    <connection refLocalId="26">
                      <position x="300" y="180"/>
                      <position x="220" y="180"/>
                      <position x="220" y="240"/>
                      <position x="190" y="240"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ENO">
                  <connectionPointOut>
                    <relPosition x="70" y="30"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="70" y="50"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="26" height="30" width="30" negated="false">
              <position x="160" y="220"/>
              <connectionPointOut>
                <relPosition x="30" y="20"/>
              </connectionPointOut>
              <expression>10</expression>
            </inVariable>
            <inVariable localId="28" height="30" width="50" negated="false">
              <position x="120" y="170"/>
              <connectionPointOut>
                <relPosition x="50" y="20"/>
              </connectionPointOut>
              <expression>VALUE</expression>
            </inVariable>
            <outVariable localId="29" height="30" width="130" negated="false">
              <position x="390" y="190"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="25" formalParameter="OUT">
                  <position x="390" y="200"/>
                  <position x="380" y="200"/>
                  <position x="380" y="160"/>
                  <position x="370" y="160"/>
                </connection>
              </connectionPointIn>
              <expression>FILTERED_VALUE</expression>
            </outVariable>
            <block localId="30" typeName="valves_handler" instanceName="valves_handler0" height="100" width="130">
              <position x="320" y="260"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="22">
                      <position x="320" y="290"/>
                      <position x="161" y="290"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="18">
                      <position x="320" y="310"/>
                      <position x="240" y="310"/>
                      <position x="240" y="340"/>
                      <position x="220" y="340"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN_TLB1">
                  <connectionPointIn>
                    <relPosition x="0" y="70"/>
                    <connection refLocalId="23">
                      <position x="320" y="330"/>
                      <position x="275" y="330"/>
                      <position x="275" y="380"/>
                      <position x="220" y="380"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN_TLB2">
                  <connectionPointIn>
                    <relPosition x="0" y="90"/>
                    <connection refLocalId="24">
                      <position x="320" y="350"/>
                      <position x="285" y="350"/>
                      <position x="285" y="420"/>
                      <position x="250" y="420"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ENO">
                  <connectionPointOut>
                    <relPosition x="130" y="30"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT_MV1">
                  <connectionPointOut>
                    <relPosition x="130" y="50"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT_MV2">
                  <connectionPointOut>
                    <relPosition x="130" y="70"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <contact localId="31" height="20" width="21" negated="true">
              <position x="140" y="470"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="140" y="480"/>
                  <position x="85" y="480"/>
                  <position x="85" y="470"/>
                  <position x="30" y="470"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="10"/>
              </connectionPointOut>
              <variable>CYCLE_ON</variable>
            </contact>
            <block localId="32" typeName="stop_cycle" instanceName="stop_cycle0" height="80" width="90">
              <position x="330" y="430"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="31">
                      <position x="330" y="460"/>
                      <position x="245" y="460"/>
                      <position x="245" y="480"/>
                      <position x="160" y="480"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ENO">
                  <connectionPointOut>
                    <relPosition x="90" y="30"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT_MV1">
                  <connectionPointOut>
                    <relPosition x="90" y="50"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT_MV2">
                  <connectionPointOut>
                    <relPosition x="90" y="70"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <outVariable localId="33" height="30" width="40" negated="false">
              <position x="530" y="470"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="32" formalParameter="OUT_MV1">
                  <position x="530" y="490"/>
                  <position x="475" y="490"/>
                  <position x="475" y="480"/>
                  <position x="420" y="480"/>
                </connection>
              </connectionPointIn>
              <expression>MV1</expression>
            </outVariable>
            <outVariable localId="34" height="30" width="40" negated="false">
              <position x="530" y="510"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="32" formalParameter="OUT_MV2">
                  <position x="530" y="530"/>
                  <position x="475" y="530"/>
                  <position x="475" y="500"/>
                  <position x="420" y="500"/>
                </connection>
              </connectionPointIn>
              <expression>MV2</expression>
            </outVariable>
          </LD>
        </body>
      </pou>
            <pou name="stop_cycle" pouType="functionBlock">
        <interface>
          <outputVars>
            <variable name="OUT_MV1">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="OUT_MV2">
              <type>
                <BOOL/>
              </type>
            </variable>
          </outputVars>
        </interface>
        <body>
          <ST>
            <xhtml:p><![CDATA[OUT_MV1 := FALSE;
OUT_MV2 := FALSE;
]]></xhtml:p>
          </ST>
        </body>
      </pou>
      <pou name="valves_handler" pouType="functionBlock">
        <interface>
          <inputVars>
            <variable name="IN1">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="IN_TLB1">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="IN_TLB2">
              <type>
                <INT/>
              </type>
            </variable>
          </inputVars>
          <outputVars>
            <variable name="OUT_MV1">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="OUT_MV2">
              <type>
                <BOOL/>
              </type>
            </variable>
          </outputVars>
          <localVars>
            <variable name="real_value">
              <type>
                <INT/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <ST>
            <xhtml:p><![CDATA[

if real_value <= IN_TLB2 then
  OUT_MV2 := FALSE;
  OUT_MV1 := TRUE;
end_if;

if real_value >= IN_TLB1 THEN
  OUT_MV2 := TRUE;
  OUT_MV1 := FALSE;
end_if;


]]></xhtml:p>
          </ST>
        </body>
      </pou>
    </pous>
  </types>
  <instances>
    <configurations>
      <configuration name="Config0">
        <resource name="Res0">
          <task name="task0" priority="0" interval="T#20ms">
            <pouInstance name="instance0" typeName="program0"/>
          </task>
        </resource>
      </configuration>
    </configurations>
  </instances>
</project>
