tests/python/plc.xml
author laurent
Wed, 16 Dec 2009 13:37:50 +0100
changeset 524 20141c30a160
parent 458 dfc6164e4022
child 728 e0424e96e3fd
permissions -rw-r--r--
Update french translation after modifications
<?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">
  <fileHeader companyName="beremiz"
              productName="Beremiz"
              productVersion="0.0"
              creationDateTime="2008-12-14T16:21:19"/>
  <contentHeader name="Beremiz Python Support Tests"
                 modificationDateTime="2009-12-06T12:55:54">
    <coordinateInfo>
      <pageSize x="1024" y="1024"/>
      <fbd>
        <scaling x="5" y="5"/>
      </fbd>
      <ld>
        <scaling x="5" y="5"/>
      </ld>
      <sfc>
        <scaling x="5" y="5"/>
      </sfc>
    </coordinateInfo>
  </contentHeader>
  <types>
    <dataTypes/>
    <pous>
      <pou name="main_pytest" pouType="program">
        <interface>
          <localVars>
            <variable name="pytest_var1">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="pytest_var2">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="py1">
              <type>
                <derived name="python_eval"/>
              </type>
            </variable>
            <variable name="Block1">
              <type>
                <derived name="python_eval"/>
              </type>
            </variable>
            <variable name="Block2">
              <type>
                <derived name="python_eval"/>
              </type>
            </variable>
            <variable name="Block3">
              <type>
                <derived name="python_eval"/>
              </type>
            </variable>
            <variable name="pytest_var3">
              <type>
                <BOOL/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <inVariable localId="4" height="30" width="160">
              <position x="295" y="235"/>
              <connectionPointOut>
                <relPosition x="160" y="15"/>
              </connectionPointOut>
              <expression>'time.sleep(1)'</expression>
            </inVariable>
            <block localId="5" width="125" height="80" typeName="python_eval" instanceName="py1">
              <position x="650" y="185"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="35"/>
                    <connection refLocalId="7" formalParameter="OUT">
                      <position x="650" y="220"/>
                      <position x="285" y="220"/>
                      <position x="285" y="260"/>
                      <position x="250" y="260"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="CODE">
                  <connectionPointIn>
                    <relPosition x="0" y="65"/>
                    <connection refLocalId="4">
                      <position x="650" y="250"/>
                      <position x="455" y="250"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ACK">
                  <connectionPointOut>
                    <relPosition x="125" y="35"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="RESULT">
                  <connectionPointOut>
                    <relPosition x="125" y="65"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="7" width="70" height="45" typeName="NOT">
              <position x="180" y="230"/>
              <inputVariables>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="3">
                      <position x="180" y="260"/>
                      <position x="155" y="260"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="70" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inOutVariable localId="3" height="30" width="120">
              <position x="35" y="245"/>
              <connectionPointIn>
                <relPosition x="0" y="15"/>
                <connection refLocalId="7" formalParameter="OUT">
                  <position x="35" y="260"/>
                  <position x="25" y="260"/>
                  <position x="25" y="220"/>
                  <position x="270" y="220"/>
                  <position x="270" y="260"/>
                  <position x="250" y="260"/>
                </connection>
              </connectionPointIn>
              <connectionPointOut>
                <relPosition x="120" y="15"/>
              </connectionPointOut>
              <expression>pytest_var2</expression>
            </inOutVariable>
            <block localId="8" width="125" height="80" typeName="python_eval" instanceName="Block1">
              <position x="650" y="295"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="35"/>
                    <connection refLocalId="7" formalParameter="OUT">
                      <position x="650" y="330"/>
                      <position x="285" y="330"/>
                      <position x="285" y="260"/>
                      <position x="250" y="260"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="CODE">
                  <connectionPointIn>
                    <relPosition x="0" y="65"/>
                    <connection refLocalId="9">
                      <position x="650" y="360"/>
                      <position x="585" y="360"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ACK">
                  <connectionPointOut>
                    <relPosition x="125" y="35"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="RESULT">
                  <connectionPointOut>
                    <relPosition x="125" y="65"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="9" height="30" width="290">
              <position x="295" y="345"/>
              <connectionPointOut>
                <relPosition x="290" y="15"/>
              </connectionPointOut>
              <expression>'sys.stdout.write("1234\n")'</expression>
            </inVariable>
            <inVariable localId="11" height="30" width="290">
              <position x="290" y="465"/>
              <connectionPointOut>
                <relPosition x="290" y="15"/>
              </connectionPointOut>
              <expression>'sys.stdout.write("5678\n")'</expression>
            </inVariable>
            <block localId="12" width="125" height="80" typeName="python_eval" instanceName="Block2">
              <position x="650" y="417"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="33"/>
                    <connection refLocalId="7" formalParameter="OUT">
                      <position x="650" y="450"/>
                      <position x="285" y="450"/>
                      <position x="285" y="260"/>
                      <position x="250" y="260"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="CODE">
                  <connectionPointIn>
                    <relPosition x="0" y="63"/>
                    <connection refLocalId="11">
                      <position x="650" y="480"/>
                      <position x="580" y="480"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ACK">
                  <connectionPointOut>
                    <relPosition x="125" y="33"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="RESULT">
                  <connectionPointOut>
                    <relPosition x="125" y="63"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="14" height="30" width="290">
              <position x="290" y="590"/>
              <connectionPointOut>
                <relPosition x="290" y="15"/>
              </connectionPointOut>
              <expression>'myprintfunc("90AB\n")'</expression>
            </inVariable>
            <block localId="15" width="125" height="80" typeName="python_eval" instanceName="Block3">
              <position x="650" y="542"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="33"/>
                    <connection refLocalId="7" formalParameter="OUT">
                      <position x="650" y="575"/>
                      <position x="285" y="575"/>
                      <position x="285" y="260"/>
                      <position x="250" y="260"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="CODE">
                  <connectionPointIn>
                    <relPosition x="0" y="63"/>
                    <connection refLocalId="14">
                      <position x="650" y="605"/>
                      <position x="580" y="605"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ACK">
                  <connectionPointOut>
                    <relPosition x="125" y="33"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="RESULT">
                  <connectionPointOut>
                    <relPosition x="125" y="63"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <comment localId="16" height="90" width="680">
              <position x="50" y="25"/>
              <content>
<![CDATA[This example test that, despite of 2T period clock stimulating TRIG pin of pyth_eval blocks, blocks keep executing one after the other, in respect of execution order.]]>
              </content>
            </comment>
            <block localId="17" width="80" height="120" typeName="MUX">
              <position x="1065" y="495"/>
              <inputVariables>
                <variable formalParameter="K">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="18">
                      <position x="1065" y="525"/>
                      <position x="1030" y="525"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN0">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="5" formalParameter="RESULT">
                      <position x="1065" y="545"/>
                      <position x="905" y="545"/>
                      <position x="905" y="250"/>
                      <position x="775" y="250"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="70"/>
                    <connection refLocalId="8" formalParameter="RESULT">
                      <position x="1065" y="565"/>
                      <position x="890" y="565"/>
                      <position x="890" y="360"/>
                      <position x="775" y="360"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="90"/>
                    <connection refLocalId="12" formalParameter="RESULT">
                      <position x="1065" y="585"/>
                      <position x="875" y="585"/>
                      <position x="875" y="480"/>
                      <position x="775" y="480"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN3">
                  <connectionPointIn>
                    <relPosition x="0" y="110"/>
                    <connection refLocalId="15" formalParameter="RESULT">
                      <position x="1065" y="605"/>
                      <position x="775" y="605"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="80" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="18" height="30" width="20">
              <position x="1010" y="510"/>
              <connectionPointOut>
                <relPosition x="20" y="15"/>
              </connectionPointOut>
              <expression>3</expression>
            </inVariable>
            <outVariable localId="19" height="35" width="125">
              <position x="1185" y="510"/>
              <connectionPointIn>
                <relPosition x="0" y="15"/>
                <connection refLocalId="17" formalParameter="OUT">
                  <position x="1185" y="525"/>
                  <position x="1145" y="525"/>
                </connection>
              </connectionPointIn>
              <expression>pytest_var1</expression>
            </outVariable>
            <block localId="21" width="80" height="120" typeName="MUX">
              <position x="985" y="170"/>
              <inputVariables>
                <variable formalParameter="K">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="22">
                      <position x="985" y="200"/>
                      <position x="950" y="200"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN0">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="5" formalParameter="ACK">
                      <position x="985" y="220"/>
                      <position x="775" y="220"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="70"/>
                    <connection refLocalId="8" formalParameter="ACK">
                      <position x="985" y="240"/>
                      <position x="805" y="240"/>
                      <position x="805" y="330"/>
                      <position x="775" y="330"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="90"/>
                    <connection refLocalId="12" formalParameter="ACK">
                      <position x="985" y="260"/>
                      <position x="820" y="260"/>
                      <position x="820" y="450"/>
                      <position x="775" y="450"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN3">
                  <connectionPointIn>
                    <relPosition x="0" y="110"/>
                    <connection refLocalId="15" formalParameter="ACK">
                      <position x="985" y="280"/>
                      <position x="835" y="280"/>
                      <position x="835" y="575"/>
                      <position x="775" y="575"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="80" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="22" height="30" width="20">
              <position x="930" y="185"/>
              <connectionPointOut>
                <relPosition x="20" y="15"/>
              </connectionPointOut>
              <expression>3</expression>
            </inVariable>
            <outVariable localId="23" height="35" width="125">
              <position x="1150" y="185"/>
              <connectionPointIn>
                <relPosition x="0" y="15"/>
                <connection refLocalId="21" formalParameter="OUT">
                  <position x="1150" y="200"/>
                  <position x="1065" y="200"/>
                </connection>
              </connectionPointIn>
              <expression>pytest_var3</expression>
            </outVariable>
          </FBD>
        </body>
      </pou>
    </pous>
  </types>
  <instances>
    <configurations>
      <configuration name="conf_pytest">
        <resource name="res_pytest">
          <task name="pytest_task" interval="t#100ms" priority="0"/>
          <pouInstance name="pytest_instance" typeName="main_pytest"/>
        </resource>
      </configuration>
    </configurations>
  </instances>
</project>