<?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_lvalves_handler">
    <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="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="330" width="10">
              <position x="60" y="30"/>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="20"/>
              </connectionPointOut>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="170"/>
              </connectionPointOut>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="310"/>
              </connectionPointOut>
            </leftPowerRail>
            <rightPowerRail localId="2" height="220" width="10">
              <position x="660" y="30"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="6">
                  <position x="660" y="50"/>
                  <position x="491" y="50"/>
                </connection>
              </connectionPointIn>
              <connectionPointIn>
                <relPosition x="0" y="110"/>
                <connection refLocalId="25" formalParameter="ENO">
                  <position x="660" y="140"/>
                  <position x="390" y="140"/>
                </connection>
              </connectionPointIn>
              <connectionPointIn>
                <relPosition x="0" y="200"/>
                <connection refLocalId="27" formalParameter="ENO">
                  <position x="660" y="230"/>
                  <position x="590" y="230"/>
                  <position x="590" y="310"/>
                  <position x="370" y="310"/>
                </connection>
              </connectionPointIn>
            </rightPowerRail>
            <contact localId="3" height="20" width="21" negated="false">
              <position x="140" y="40"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="140" y="50"/>
                  <position x="70" y="50"/>
                </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="40"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="3">
                  <position x="280" y="50"/>
                  <position x="161" y="50"/>
                </connection>
                <connection refLocalId="21">
                  <position x="280" y="50"/>
                  <position x="221" y="50"/>
                  <position x="221" y="90"/>
                  <position x="161" y="90"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="10"/>
              </connectionPointOut>
              <variable>STOP</variable>
            </contact>
            <coil localId="6" height="20" width="21" negated="false">
              <position x="470" y="40"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="4">
                  <position x="470" y="50"/>
                  <position x="301" y="50"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="10"/>
              </connectionPointOut>
              <variable>CYCLE_ON</variable>
            </coil>
            <inVariable localId="18" height="30" width="50" negated="false">
              <position x="150" y="160"/>
              <connectionPointOut>
                <relPosition x="50" y="10"/>
              </connectionPointOut>
              <expression>VALUE</expression>
            </inVariable>
            <outVariable localId="19" height="30" width="50" negated="false">
              <position x="470" y="180"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="25" formalParameter="OUT_MV1">
                  <position x="470" y="190"/>
                  <position x="460" y="190"/>
                  <position x="460" y="170"/>
                  <position x="390" y="170"/>
                </connection>
              </connectionPointIn>
              <expression>MV1</expression>
            </outVariable>
            <outVariable localId="20" height="30" width="50" negated="false">
              <position x="470" y="230"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="25" formalParameter="OUT_MV2">
                  <position x="470" y="250"/>
                  <position x="445" y="250"/>
                  <position x="445" y="190"/>
                  <position x="390" y="190"/>
                </connection>
              </connectionPointIn>
              <expression>MV2</expression>
            </outVariable>
            <contact localId="21" height="20" width="21" negated="false">
              <position x="140" y="80"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="140" y="90"/>
                  <position x="105" y="90"/>
                  <position x="105" y="50"/>
                  <position x="70" y="50"/>
                </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="150" y="120"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="150" y="130"/>
                  <position x="110" y="130"/>
                  <position x="110" y="190"/>
                  <position x="70" y="190"/>
                </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="140" y="200"/>
              <connectionPointOut>
                <relPosition x="50" y="10"/>
              </connectionPointOut>
              <expression>TLB1</expression>
            </inVariable>
            <inVariable localId="24" height="30" width="50" negated="false">
              <position x="140" y="250"/>
              <connectionPointOut>
                <relPosition x="50" y="20"/>
              </connectionPointOut>
              <expression>TLB2</expression>
            </inVariable>
            <block localId="25" typeName="valves_handler" instanceName="valves_handler0" height="120" width="130">
              <position x="260" y="110"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="22">
                      <position x="260" y="140"/>
                      <position x="215" y="140"/>
                      <position x="215" y="130"/>
                      <position x="171" y="130"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="60"/>
                    <connection refLocalId="18">
                      <position x="260" y="170"/>
                      <position x="200" y="170"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN_TLB1">
                  <connectionPointIn>
                    <relPosition x="0" y="80"/>
                    <connection refLocalId="23">
                      <position x="260" y="190"/>
                      <position x="225" y="190"/>
                      <position x="225" y="210"/>
                      <position x="190" y="210"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN_TLB2">
                  <connectionPointIn>
                    <relPosition x="0" y="110"/>
                    <connection refLocalId="24">
                      <position x="260" y="220"/>
                      <position x="230" y="220"/>
                      <position x="230" y="270"/>
                      <position x="190" y="270"/>
                    </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="60"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT_MV2">
                  <connectionPointOut>
                    <relPosition x="130" y="80"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <contact localId="5" height="20" width="21" negated="true" executionOrderId="0">
              <position x="280" y="140"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="10"/>
              </connectionPointOut>
              <variable>STOP</variable>
            </contact>
            <contact localId="26" height="20" width="21" negated="true">
              <position x="130" y="330"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="130" y="340"/>
                  <position x="70" y="340"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="10"/>
              </connectionPointOut>
              <variable>CYCLE_ON</variable>
            </contact>
            <block localId="27" typeName="stop_cycle" instanceName="stop_cycle0" height="80" width="90">
              <position x="280" y="280"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="26">
                      <position x="280" y="310"/>
                      <position x="190" y="310"/>
                      <position x="190" y="340"/>
                      <position x="151" y="340"/>
                    </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="28" height="30" width="40" negated="false">
              <position x="450" y="340"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="27" formalParameter="OUT_MV1">
                  <position x="450" y="350"/>
                  <position x="400" y="350"/>
                  <position x="400" y="330"/>
                  <position x="370" y="330"/>
                </connection>
              </connectionPointIn>
              <expression>MV1</expression>
            </outVariable>
            <outVariable localId="29" height="30" width="40" negated="false">
              <position x="450" y="390"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="27" formalParameter="OUT_MV2">
                  <position x="450" y="410"/>
                  <position x="385" y="410"/>
                  <position x="385" y="350"/>
                  <position x="370" y="350"/>
                </connection>
              </connectionPointIn>
              <expression>MV2</expression>
            </outVariable>
          </LD>
        </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[
real_value :=  IN1 - 5;


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>
      <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>
    </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>