tests/svghmi/plc.xml
author Edouard Tisserant
Wed, 30 Oct 2019 15:17:05 +0100
branchsvghmi
changeset 2811 4a81cec5f786
parent 2806 7d0e81cdedb0
child 2814 2cabc4773885
permissions -rw-r--r--
SVGHMI - prepare page with cached data when switching. This prevents values that do not change and that was already subscribed in previous page from keeping undefined.
<?xml version='1.0' encoding='utf-8'?>
<project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201">
  <fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2019-08-06T14:23:42"/>
  <contentHeader name="Unnamed" modificationDateTime="2019-10-27T21:48:33">
    <coordinateInfo>
      <fbd>
        <scaling x="5" y="5"/>
      </fbd>
      <ld>
        <scaling x="0" y="0"/>
      </ld>
      <sfc>
        <scaling x="0" y="0"/>
      </sfc>
    </coordinateInfo>
  </contentHeader>
  <types>
    <dataTypes/>
    <pous>
      <pou name="MainStuff" pouType="program">
        <interface>
          <localVars>
            <variable name="TargetPressure">
              <type>
                <derived name="HMI_INT"/>
              </type>
            </variable>
            <variable name="Pump0">
              <type>
                <derived name="PumpControl"/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <block localId="4" typeName="PumpControl" instanceName="Pump0" executionOrderId="0" height="40" width="127">
              <position x="595" y="50"/>
              <inputVariables>
                <variable formalParameter="TargetPressure">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="5">
                      <position x="595" y="80"/>
                      <position x="570" y="80"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables/>
            </block>
            <inVariable localId="5" executionOrderId="0" height="30" width="125" negated="false">
              <position x="445" y="65"/>
              <connectionPointOut>
                <relPosition x="125" y="15"/>
              </connectionPointOut>
              <expression>TargetPressure</expression>
            </inVariable>
          </FBD>
        </body>
      </pou>
      <pou name="PumpControl" pouType="functionBlock">
        <interface>
          <localVars>
            <variable name="Pump">
              <type>
                <derived name="HMI_LABEL"/>
              </type>
            </variable>
            <variable name="Pressure">
              <type>
                <derived name="HMI_INT"/>
              </type>
            </variable>
          </localVars>
          <inputVars>
            <variable name="TargetPressure">
              <type>
                <INT/>
              </type>
            </variable>
          </inputVars>
          <localVars>
            <variable name="Sloth">
              <type>
                <derived name="HMI_INT"/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <inVariable localId="5" executionOrderId="0" height="30" width="125" negated="false">
              <position x="150" y="100"/>
              <connectionPointOut>
                <relPosition x="125" y="15"/>
              </connectionPointOut>
              <expression>TargetPressure</expression>
            </inVariable>
            <inOutVariable localId="4" executionOrderId="0" height="30" width="60" negatedOut="false" negatedIn="false">
              <position x="510" y="80"/>
              <connectionPointIn>
                <relPosition x="0" y="15"/>
                <connection refLocalId="6" formalParameter="OUT">
                  <position x="510" y="95"/>
                  <position x="470" y="95"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="60" y="15"/>
              </connectionPointOut>
              <expression>Sloth</expression>
            </inOutVariable>
            <block localId="6" typeName="ADD" executionOrderId="0" height="60" width="65">
              <position x="405" y="65"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="4">
                      <position x="405" y="95"/>
                      <position x="385" y="95"/>
                      <position x="385" y="50"/>
                      <position x="580" y="50"/>
                      <position x="580" y="95"/>
                      <position x="570" y="95"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="7" formalParameter="OUT">
                      <position x="405" y="115"/>
                      <position x="360" y="115"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="65" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="1" executionOrderId="0" height="30" width="75" negated="false">
              <position x="150" y="135"/>
              <connectionPointOut>
                <relPosition x="75" y="15"/>
              </connectionPointOut>
              <expression>Pressure</expression>
            </inVariable>
            <block localId="7" typeName="SUB" executionOrderId="0" height="60" width="65">
              <position x="295" y="85"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="5">
                      <position x="295" y="115"/>
                      <position x="275" y="115"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="1">
                      <position x="295" y="135"/>
                      <position x="285" y="135"/>
                      <position x="285" y="150"/>
                      <position x="225" y="150"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="65" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="2" executionOrderId="0" height="30" width="60" negated="false">
              <position x="240" y="190"/>
              <connectionPointOut>
                <relPosition x="60" y="15"/>
              </connectionPointOut>
              <expression>Sloth</expression>
            </inVariable>
            <outVariable localId="3" executionOrderId="0" height="30" width="75" negated="false">
              <position x="435" y="205"/>
              <connectionPointIn>
                <relPosition x="0" y="15"/>
                <connection refLocalId="8" formalParameter="OUT">
                  <position x="435" y="220"/>
                  <position x="410" y="220"/>
                </connection>
              </connectionPointIn>
              <expression>Pressure</expression>
            </outVariable>
            <block localId="8" typeName="DIV" executionOrderId="0" height="60" width="65">
              <position x="345" y="190"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="2">
                      <position x="345" y="220"/>
                      <position x="335" y="220"/>
                      <position x="335" y="205"/>
                      <position x="300" y="205"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="9">
                      <position x="345" y="240"/>
                      <position x="305" y="240"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="65" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="9" executionOrderId="0" height="30" width="60" negated="false">
              <position x="245" y="225"/>
              <connectionPointOut>
                <relPosition x="60" y="15"/>
              </connectionPointOut>
              <expression>100</expression>
            </inVariable>
          </FBD>
        </body>
      </pou>
    </pous>
  </types>
  <instances>
    <configurations>
      <configuration name="config">
        <resource name="resource1">
          <task name="task0" priority="0" interval="T#20ms">
            <pouInstance name="instance0" typeName="MainStuff"/>
          </task>
        </resource>
      </configuration>
    </configurations>
  </instances>
</project>