<?xml version='1.0' encoding='utf-8'?>
<!-- fileHeader and contentHeader synthesised 2026-09-01. The program arrived
     from the PLC-LD-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-LD-dataset" productVersion="1.0" creationDateTime="2024-01-01T00:00:00" />
  <contentHeader name="lstart_cycle">
    <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="start_cycle0">
              <type>
                <derived name="start_cycle"/>
              </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="300" width="10">
              <position x="30" y="30"/>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="20"/>
              </connectionPointOut>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="150"/>
              </connectionPointOut>
              <connectionPointOut formalParameter="">
                <relPosition x="10" y="280"/>
              </connectionPointOut>
            </leftPowerRail>
            <rightPowerRail localId="2" height="240" width="10">
              <position x="720" y="40"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="6">
                  <position x="720" y="60"/>
                  <position x="605" y="60"/>
                  <position x="605" y="50"/>
                  <position x="491" y="50"/>
                </connection>
              </connectionPointIn>
              <connectionPointIn>
                <relPosition x="0" y="120"/>
                <connection refLocalId="27" formalParameter="ENO">
                  <position x="720" y="160"/>
                  <position x="605" y="160"/>
                  <position x="605" y="130"/>
                  <position x="490" y="130"/>
                </connection>
              </connectionPointIn>
              <connectionPointIn>
                <relPosition x="0" y="220"/>
                <connection refLocalId="29" formalParameter="ENO">
                  <position x="720" y="260"/>
                  <position x="547" y="260"/>
                  <position x="547" y="310"/>
                  <position x="470" 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="40" 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="80"/>
                  <position x="161" y="80"/>
                </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="210" y="190"/>
              <connectionPointOut>
                <relPosition x="50" y="20"/>
              </connectionPointOut>
              <expression>VALUE</expression>
            </inVariable>
            <outVariable localId="19" height="30" width="50" negated="false">
              <position x="540" y="140"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="27" formalParameter="OUT_MV1">
                  <position x="540" y="160"/>
                  <position x="510" y="160"/>
                  <position x="510" y="150"/>
                  <position x="490" y="150"/>
                </connection>
              </connectionPointIn>
              <expression>MV1</expression>
            </outVariable>
            <outVariable localId="20" height="30" width="50" negated="false">
              <position x="560" y="210"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="27" formalParameter="OUT_MV2">
                  <position x="560" y="220"/>
                  <position x="520" y="220"/>
                  <position x="520" y="170"/>
                  <position x="490" y="170"/>
                </connection>
              </connectionPointIn>
              <expression>MV2</expression>
            </outVariable>
            <contact localId="21" height="20" width="21" negated="false">
              <position x="140" y="70"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="140" y="80"/>
                  <position x="90" y="80"/>
                  <position x="90" y="50"/>
                  <position x="40" y="50"/>
                </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="210" y="230"/>
              <connectionPointOut>
                <relPosition x="50" y="20"/>
              </connectionPointOut>
              <expression>TLB1</expression>
            </inVariable>
            <inVariable localId="24" height="30" width="50" negated="false">
              <position x="210" y="270"/>
              <connectionPointOut>
                <relPosition x="50" y="20"/>
              </connectionPointOut>
              <expression>TLB2</expression>
            </inVariable>
            <inVariable localId="25" height="30" width="80" negated="false">
              <position x="70" y="220"/>
              <connectionPointOut>
                <relPosition x="80" y="20"/>
              </connectionPointOut>
              <expression>CYCLE_ON</expression>
            </inVariable>
            <block localId="26" typeName="start_cycle" instanceName="start_cycle0" height="60" width="130">
              <position x="100" y="110"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="1">
                      <position x="100" y="140"/>
                      <position x="60" y="140"/>
                      <position x="60" y="180"/>
                      <position x="40" y="180"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="25">
                      <position x="100" y="160"/>
                      <position x="70" y="160"/>
                      <position x="70" y="185"/>
                      <position x="160" y="185"/>
                      <position x="160" y="240"/>
                      <position x="150" y="240"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ENO">
                  <connectionPointOut>
                    <relPosition x="130" y="30"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="130" y="50"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="27" typeName="valves_handler" instanceName="valves_handler0" height="100" width="130">
              <position x="360" y="100"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="26" formalParameter="OUT">
                      <position x="360" y="130"/>
                      <position x="260" y="130"/>
                      <position x="260" y="160"/>
                      <position x="230" y="160"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="18">
                      <position x="360" y="150"/>
                      <position x="270" y="150"/>
                      <position x="270" y="200"/>
                      <position x="260" y="200"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN_TLB1">
                  <connectionPointIn>
                    <relPosition x="0" y="70"/>
                    <connection refLocalId="23">
                      <position x="360" y="170"/>
                      <position x="290" y="170"/>
                      <position x="290" y="250"/>
                      <position x="260" y="250"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN_TLB2">
                  <connectionPointIn>
                    <relPosition x="0" y="90"/>
                    <connection refLocalId="24">
                      <position x="360" y="190"/>
                      <position x="310" y="190"/>
                      <position x="310" y="290"/>
                      <position x="260" y="290"/>
                    </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="28" height="20" width="21" negated="true">
              <position x="90" y="310"/>
              <connectionPointIn>
                <relPosition x="0" y="10"/>
                <connection refLocalId="1">
                  <position x="90" y="320"/>
                  <position x="70" y="320"/>
                  <position x="70" y="310"/>
                  <position x="40" y="310"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="21" y="10"/>
              </connectionPointOut>
              <variable>CYCLE_ON</variable>
            </contact>
            <block localId="29" typeName="stop_cycle" instanceName="stop_cycle0" height="80" width="90">
              <position x="380" y="280"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="28">
                      <position x="380" y="310"/>
                      <position x="245" y="310"/>
                      <position x="245" y="320"/>
                      <position x="110" y="320"/>
                    </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="30" height="30" width="40" negated="false">
              <position x="570" y="300"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="29" formalParameter="OUT_MV1">
                  <position x="570" y="320"/>
                  <position x="520" y="320"/>
                  <position x="520" y="330"/>
                  <position x="470" y="330"/>
                </connection>
              </connectionPointIn>
              <expression>MV1</expression>
            </outVariable>
            <outVariable localId="31" height="30" width="40" negated="false">
              <position x="570" y="350"/>
              <connectionPointIn>
                <relPosition x="0" y="20"/>
                <connection refLocalId="29" formalParameter="OUT_MV2">
                  <position x="570" y="370"/>
                  <position x="520" y="370"/>
                  <position x="520" y="350"/>
                  <position x="470" y="350"/>
                </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[
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="start_cycle" pouType="functionBlock">
        <interface>
          <inputVars>
            <variable name="IN1">
              <type>
                <BOOL/>
              </type>
            </variable>
          </inputVars>
          <outputVars>
            <variable name="OUT">
              <type>
                <BOOL/>
              </type>
            </variable>
          </outputVars>
        </interface>
        <body>
          <ST>
            <xhtml:p><![CDATA[OUT := IN1;
]]></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>
