tests/linux/autom_ihm_rmll/plc.xml
author lbessard
Fri, 22 Aug 2008 13:34:58 +0200
changeset 213 d8dc1e51c3bf
parent 203 cb9901076a21
permissions -rw-r--r--
Change in layout from AuiMDIParentFrame to AuiNotebook
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://www.plcopen.org/xml/tc6.xsd"
         xmlns:xhtml="http://www.w3.org/1999/xhtml"
         xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd http://www.plcopen.org/xml/tc6.xsd">
  <fileHeader companyName="lolitech"
              productName="autom_ihm_rmll"
              productVersion="1"
              creationDateTime="2008-06-28 15:43:31"/>
  <contentHeader name="autom_ihm_rmll"
                 modificationDateTime="2008-08-20 00:50:31">
    <coordinateInfo>
      <pageSize x="700" y="1000"/>
      <fbd>
        <scaling x="8" y="8"/>
      </fbd>
      <ld>
        <scaling x="8" y="8"/>
      </ld>
      <sfc>
        <scaling x="8" y="8"/>
      </sfc>
    </coordinateInfo>
  </contentHeader>
  <types>
    <dataTypes/>
    <pous>
      <pou name="main" pouType="program">
        <interface>
          <localVars>
            <variable name="ctrl_gauge1">
              <type>
                <derived name="control_gauge"/>
              </type>
            </variable>
            <variable name="fill">
              <type>
                <derived name="Button"/>
              </type>
            </variable>
            <variable name="empty">
              <type>
                <derived name="Button"/>
              </type>
            </variable>
            <variable name="gauge">
              <type>
                <derived name="Transform"/>
              </type>
            </variable>
          </localVars>
          <localVars>
            <variable name="level" address="%IW1.0.3.8196.0">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="pump_out" address="%QX1.0.3.8192.0">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="sink_out" address="%QX1.0.3.8193.0">
              <type>
                <BOOL/>
              </type>
            </variable>
          </localVars>
          <externalVars>
            <variable name="full_in">
              <type>
                <BOOL/>
              </type>
            </variable>
          </externalVars>
          <localVars>
            <variable name="empty_in" address="%IX1.0.3.8195.0">
              <type>
                <BOOL/>
              </type>
            </variable>
          </localVars>
          <localVars>
            <variable name="controleur">
              <type>
                <derived name="automate"/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <block localId="1" width="144" height="104" typeName="control_gauge" instanceName="ctrl_gauge1">
              <position x="480" y="256"/>
              <inputVariables>
                <variable formalParameter="Xin">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="5" formalParameter="X">
                      <position x="480" y="288"/>
                      <position x="176" y="288"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="Yin">
                  <connectionPointIn>
                    <relPosition x="0" y="64"/>
                    <connection refLocalId="5" formalParameter="Y">
                      <position x="480" y="320"/>
                      <position x="176" y="320"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="Consigne">
                  <connectionPointIn>
                    <relPosition x="0" y="88"/>
                    <connection refLocalId="17" formalParameter="OUT">
                      <position x="480" y="344"/>
                      <position x="452" y="344"/>
                      <position x="452" y="376"/>
                      <position x="424" y="376"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="Xout">
                  <connectionPointOut>
                    <relPosition x="144" y="32"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="Yout">
                  <connectionPointOut>
                    <relPosition x="144" y="64"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="3" width="128" height="88" typeName="Button" instanceName="fill">
              <position x="56" y="696"/>
              <inputVariables>
                <variable formalParameter="Show">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="Enable">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="Toggle">
                  <connectionPointIn>
                    <relPosition x="0" y="72"/>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="State">
                  <connectionPointOut>
                    <relPosition x="128" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="4" width="128" height="88" typeName="Button" instanceName="empty">
              <position x="200" y="608"/>
              <inputVariables>
                <variable formalParameter="Show">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="Enable">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="Toggle">
                  <connectionPointIn>
                    <relPosition x="0" y="72"/>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="State">
                  <connectionPointOut>
                    <relPosition x="128" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="5" width="120" height="264" typeName="Transform" instanceName="gauge">
              <position x="56" y="248"/>
              <inputVariables>
                <variable formalParameter="Show">
                  <connectionPointIn>
                    <relPosition x="0" y="40"/>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="Enable">
                  <connectionPointIn>
                    <relPosition x="0" y="72"/>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="SetX">
                  <connectionPointIn>
                    <relPosition x="0" y="104"/>
                    <connection refLocalId="1" formalParameter="Xout">
                      <position x="56" y="352"/>
                      <position x="32" y="352"/>
                      <position x="32" y="200"/>
                      <position x="634" y="200"/>
                      <position x="634" y="288"/>
                      <position x="624" y="288"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="SetY">
                  <connectionPointIn>
                    <relPosition x="0" y="136"/>
                    <connection refLocalId="1" formalParameter="Yout">
                      <position x="56" y="384"/>
                      <position x="32" y="384"/>
                      <position x="32" y="536"/>
                      <position x="634" y="536"/>
                      <position x="634" y="320"/>
                      <position x="624" y="320"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="SetXScale">
                  <connectionPointIn>
                    <relPosition x="0" y="176"/>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="SetYScale">
                  <connectionPointIn>
                    <relPosition x="0" y="208"/>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="SetAngle">
                  <connectionPointIn>
                    <relPosition x="0" y="240"/>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="X">
                  <connectionPointOut>
                    <relPosition x="120" y="40"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="Y">
                  <connectionPointOut>
                    <relPosition x="120" y="72"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="6" height="32" width="64">
              <position x="232" y="416"/>
              <connectionPointOut>
                <relPosition x="64" y="16"/>
              </connectionPointOut>
              <expression>level</expression>
            </inVariable>
            <inVariable localId="7" height="32" width="88">
              <position x="120" y="800"/>
              <connectionPointOut>
                <relPosition x="88" y="16"/>
              </connectionPointOut>
              <expression>full_in</expression>
            </inVariable>
            <inVariable localId="8" height="32" width="96">
              <position x="112" y="888"/>
              <connectionPointOut>
                <relPosition x="96" y="16"/>
              </connectionPointOut>
              <expression>empty_in</expression>
            </inVariable>
            <outVariable localId="9" height="32" width="96">
              <position x="544" y="624"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="12" formalParameter="pump">
                  <position x="544" y="640"/>
                  <position x="496" y="640"/>
                </connection>
              </connectionPointIn>
              <expression>pump_out</expression>
            </outVariable>
            <outVariable localId="10" height="32" width="96">
              <position x="544" y="712"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="12" formalParameter="sink">
                  <position x="544" y="728"/>
                  <position x="496" y="728"/>
                </connection>
              </connectionPointIn>
              <expression>sink_out</expression>
            </outVariable>
            <block localId="12" width="136" height="368" typeName="automate" instanceName="controleur">
              <position x="360" y="576"/>
              <inputVariables>
                <variable formalParameter="do_empty">
                  <connectionPointIn>
                    <relPosition x="0" y="64"/>
                    <connection refLocalId="4" formalParameter="State">
                      <position x="360" y="640"/>
                      <position x="328" y="640"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="do_fill">
                  <connectionPointIn>
                    <relPosition x="0" y="152"/>
                    <connection refLocalId="3" formalParameter="State">
                      <position x="360" y="728"/>
                      <position x="184" y="728"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="full">
                  <connectionPointIn>
                    <relPosition x="0" y="240"/>
                    <connection refLocalId="7">
                      <position x="360" y="816"/>
                      <position x="208" y="816"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="empty">
                  <connectionPointIn>
                    <relPosition x="0" y="328"/>
                    <connection refLocalId="8">
                      <position x="360" y="904"/>
                      <position x="208" y="904"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="pump">
                  <connectionPointOut>
                    <relPosition x="136" y="64"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="sink">
                  <connectionPointOut>
                    <relPosition x="136" y="152"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="13" height="32" width="80">
              <position x="224" y="360"/>
              <connectionPointOut>
                <relPosition x="80" y="16"/>
              </connectionPointOut>
              <expression>INT#100</expression>
            </inVariable>
            <block localId="17" width="80" height="64" typeName="SUB">
              <position x="344" y="344"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="13">
                      <position x="344" y="376"/>
                      <position x="304" y="376"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="6">
                      <position x="344" y="400"/>
                      <position x="320" y="400"/>
                      <position x="320" y="432"/>
                      <position x="296" y="432"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="80" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
          </FBD>
        </body>
      </pou>
      <pou name="control_gauge" pouType="functionBlock">
        <interface>
          <inputVars>
            <variable name="Xin">
              <type>
                <REAL/>
              </type>
            </variable>
            <variable name="Yin">
              <type>
                <REAL/>
              </type>
            </variable>
          </inputVars>
          <outputVars>
            <variable name="Xout">
              <type>
                <REAL/>
              </type>
            </variable>
            <variable name="Yout">
              <type>
                <REAL/>
              </type>
            </variable>
          </outputVars>
          <inputVars>
            <variable name="Consigne">
              <type>
                <INT/>
              </type>
            </variable>
          </inputVars>
          <localVars>
            <variable name="Initialized">
              <type>
                <BOOL/>
              </type>
              <initialValue>
                <simpleValue value="false"/>
              </initialValue>
            </variable>
            <variable name="Xtmp">
              <type>
                <REAL/>
              </type>
            </variable>
            <variable name="Ytmp">
              <type>
                <REAL/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <ST>
<![CDATA[IF NOT INITIALIZED THEN
  XTMP := XIN;
  YTMP := YIN;
  INITIALIZED := TRUE;
END_IF;
XOUT := XTMP * INT_TO_REAL(CONSIGNE) / 100.0;
YOUT := YTMP * INT_TO_REAL(CONSIGNE) / 100.0;]]>
          </ST>
        </body>
      </pou>
      <pou name="automate" pouType="functionBlock">
        <interface>
          <outputVars>
            <variable name="pump">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="sink">
              <type>
                <BOOL/>
              </type>
            </variable>
          </outputVars>
          <inputVars>
            <variable name="do_empty">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="do_fill">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="full">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="empty">
              <type>
                <BOOL/>
              </type>
            </variable>
          </inputVars>
        </interface>
        <body>
          <SFC>
            <step localId="1" height="40" width="64" name="Start" initialStep="true">
              <position x="256" y="176"/>
              <connectionPointOut formalParameter="">
                <relPosition x="32" y="40"/>
              </connectionPointOut>
              <connectionPointOutAction formalParameter="">
                <relPosition x="64" y="24"/>
              </connectionPointOutAction>
            </step>
            <step localId="2" height="32" width="80" name="vidange">
              <position x="624" y="344"/>
              <connectionPointIn>
                <relPosition x="40" y="0"/>
                <connection refLocalId="5">
                  <position x="664" y="344"/>
                  <position x="664" y="304"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut formalParameter="">
                <relPosition x="40" y="32"/>
              </connectionPointOut>
              <connectionPointOutAction formalParameter="">
                <relPosition x="80" y="16"/>
              </connectionPointOutAction>
            </step>
            <selectionDivergence localId="3" height="1" width="528">
              <position x="136" y="256"/>
              <connectionPointIn>
                <relPosition x="152" y="0"/>
                <connection refLocalId="1">
                  <position x="288" y="256"/>
                  <position x="288" y="216"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut formalParameter="">
                <relPosition x="0" y="1"/>
              </connectionPointOut>
              <connectionPointOut formalParameter="">
                <relPosition x="528" y="1"/>
              </connectionPointOut>
            </selectionDivergence>
            <inVariable localId="4" height="32" width="96">
              <position x="368" y="272"/>
              <connectionPointOut>
                <relPosition x="96" y="16"/>
              </connectionPointOut>
              <expression>do_empty</expression>
            </inVariable>
            <transition localId="5" height="16" width="32">
              <position x="648" y="288"/>
              <connectionPointIn>
                <relPosition x="16" y="0"/>
                <connection refLocalId="3">
                  <position x="664" y="288"/>
                  <position x="664" y="257"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="16" y="16"/>
              </connectionPointOut>
              <condition>
                <connection refLocalId="19" formalParameter="OUT">
                  <position x="648" y="296"/>
                  <position x="616" y="296"/>
                </connection>
              </condition>
            </transition>
            <transition localId="7" height="16" width="32">
              <position x="120" y="304"/>
              <connectionPointIn>
                <relPosition x="16" y="0"/>
                <connection refLocalId="3">
                  <position x="136" y="304"/>
                  <position x="136" y="257"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="16" y="16"/>
              </connectionPointOut>
              <condition>
                <inline name="">
                  <ST>
<![CDATA[do_fill AND NOT full]]>
                  </ST>
                </inline>
              </condition>
            </transition>
            <step localId="8" height="32" width="128" name="remplissage">
              <position x="72" y="360"/>
              <connectionPointIn>
                <relPosition x="64" y="0"/>
                <connection refLocalId="7">
                  <position x="136" y="360"/>
                  <position x="136" y="320"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut formalParameter="">
                <relPosition x="64" y="32"/>
              </connectionPointOut>
              <connectionPointOutAction formalParameter="">
                <relPosition x="128" y="16"/>
              </connectionPointOutAction>
            </step>
            <transition localId="9" height="16" width="32">
              <position x="648" y="416"/>
              <connectionPointIn>
                <relPosition x="16" y="0"/>
                <connection refLocalId="2">
                  <position x="664" y="416"/>
                  <position x="664" y="376"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="16" y="16"/>
              </connectionPointOut>
              <condition>
                <connection refLocalId="16">
                  <position x="648" y="424"/>
                  <position x="600" y="424"/>
                </connection>
              </condition>
            </transition>
            <transition localId="10" height="16" width="32">
              <position x="120" y="424"/>
              <connectionPointIn>
                <relPosition x="16" y="0"/>
                <connection refLocalId="8">
                  <position x="136" y="424"/>
                  <position x="136" y="392"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="16" y="16"/>
              </connectionPointOut>
              <condition>
                <inline name="">
                  <ST>
<![CDATA[full]]>
                  </ST>
                </inline>
              </condition>
            </transition>
            <actionBlock localId="13" height="32" width="112">
              <position x="232" y="360"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="8">
                  <position x="232" y="376"/>
                  <position x="200" y="376"/>
                </connection>
              </connectionPointIn>
              <action>
                <inline>
                  <ST>
<![CDATA[pump:=1;]]>
                  </ST>
                </inline>
              </action>
            </actionBlock>
            <actionBlock localId="14" height="32" width="112">
              <position x="736" y="344"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="2">
                  <position x="736" y="360"/>
                  <position x="704" y="360"/>
                </connection>
              </connectionPointIn>
              <action>
                <inline>
                  <ST>
<![CDATA[sink:=1;]]>
                  </ST>
                </inline>
              </action>
            </actionBlock>
            <inVariable localId="16" height="32" width="64">
              <position x="536" y="408"/>
              <connectionPointOut>
                <relPosition x="64" y="16"/>
              </connectionPointOut>
              <expression>empty</expression>
            </inVariable>
            <selectionConvergence localId="17" height="1" width="528">
              <position x="136" y="512"/>
              <connectionPointIn>
                <relPosition x="0" y="0"/>
                <connection refLocalId="10">
                  <position x="136" y="512"/>
                  <position x="136" y="440"/>
                </connection>
              </connectionPointIn>
              <connectionPointIn>
                <relPosition x="528" y="0"/>
                <connection refLocalId="9">
                  <position x="664" y="512"/>
                  <position x="664" y="432"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="264" y="1"/>
              </connectionPointOut>
            </selectionConvergence>
            <actionBlock localId="18" height="32" width="200">
              <position x="368" y="184"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="1">
                  <position x="368" y="200"/>
                  <position x="320" y="200"/>
                </connection>
              </connectionPointIn>
              <action>
                <inline>
                  <ST>
<![CDATA[pump:=0; sink:=0;]]>
                  </ST>
                </inline>
              </action>
            </actionBlock>
            <block localId="19" width="80" height="64" typeName="AND">
              <position x="536" y="264"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="4">
                      <position x="536" y="296"/>
                      <position x="500" y="296"/>
                      <position x="500" y="288"/>
                      <position x="464" y="288"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2" negated="true">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="21">
                      <position x="536" y="320"/>
                      <position x="500" y="320"/>
                      <position x="500" y="336"/>
                      <position x="464" y="336"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="80" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="21" height="32" width="96">
              <position x="368" y="320"/>
              <connectionPointOut>
                <relPosition x="96" y="16"/>
              </connectionPointOut>
              <expression>empty</expression>
            </inVariable>
            <jumpStep localId="22" height="16" width="16" targetName="Start">
              <position x="392" y="552"/>
              <connectionPointIn>
                <relPosition x="8" y="0"/>
                <connection refLocalId="17">
                  <position x="400" y="552"/>
                  <position x="400" y="513"/>
                </connection>
              </connectionPointIn>
            </jumpStep>
          </SFC>
        </body>
      </pou>
    </pous>
  </types>
  <instances>
    <configurations>
      <configuration name="conf">
        <resource name="ress">
          <task name="matache" interval="00:00:00.100000" priority="0">
            <pouInstance name="moninst" type="main"/>
          </task>
          <globalVars>
            <variable name="full_in" address="%IX1.0.3.8194.0">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="tyto">
              <type>
                <INT/>
              </type>
              <initialValue>
                <simpleValue value="2"/>
              </initialValue>
            </variable>
          </globalVars>
        </resource>
        <globalVars>
          <variable name="popy">
            <type>
              <INT/>
            </type>
          </variable>
          <variable name="fulfuck" address="%IX1.0.3.8194.0">
            <type>
              <BOOL/>
            </type>
          </variable>
        </globalVars>
      </configuration>
    </configurations>
  </instances>
</project>