tests/python/plc.xml
branch1.1 Korean release
changeset 1280 72a826dfcfbb
parent 1145 203f4eff3313
child 1401 611fded24ce4
--- a/tests/python/plc.xml	Wed Mar 13 12:34:55 2013 +0900
+++ b/tests/python/plc.xml	Wed Jul 31 10:45:07 2013 +0900
@@ -3,12 +3,12 @@
          xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xhtml="http://www.w3.org/1999/xhtml">
-  <fileHeader companyName="beremiz"
+  <fileHeader companyName=""
               productName="Beremiz"
               productVersion="0.0"
               creationDateTime="2008-12-14T16:21:19"/>
   <contentHeader name="Beremiz Python Support Tests"
-                 modificationDateTime="2013-02-23T23:37:47">
+                 modificationDateTime="2013-05-15T18:19:52">
     <coordinateInfo>
       <pageSize x="1024" y="1024"/>
       <fbd>
@@ -102,18 +102,18 @@
               </type>
             </variable>
           </localVars>
-          <localVars>
-            <variable name="TestInput" address="%IB1.0">
+          <externalVars>
+            <variable name="TestInput">
               <type>
                 <SINT/>
               </type>
             </variable>
-            <variable name="TestOutput" address="%QB1.0">
+            <variable name="TestOutput">
               <type>
                 <SINT/>
               </type>
             </variable>
-          </localVars>
+          </externalVars>
           <localVars>
             <variable name="FromInput">
               <type>
@@ -181,6 +181,26 @@
                 <derived name="RS"/>
               </type>
             </variable>
+            <variable name="TUTU">
+              <type>
+                <INT/>
+              </type>
+            </variable>
+            <variable name="TOTO">
+              <type>
+                <INT/>
+              </type>
+            </variable>
+            <variable name="Test_Python_Var">
+              <type>
+                <INT/>
+              </type>
+            </variable>
+            <variable name="Second_Python_Var">
+              <type>
+                <INT/>
+              </type>
+            </variable>
           </externalVars>
         </interface>
         <body>
@@ -615,14 +635,14 @@
                 </variable>
               </outputVariables>
             </block>
-            <inVariable localId="27" height="30" width="75">
-              <position x="305" y="770"/>
-              <connectionPointOut>
-                <relPosition x="75" y="15"/>
+            <inVariable localId="27" height="30" width="90">
+              <position x="300" y="770"/>
+              <connectionPointOut>
+                <relPosition x="90" y="15"/>
               </connectionPointOut>
               <expression>TestInput</expression>
             </inVariable>
-            <outVariable localId="28" height="30" width="90">
+            <outVariable localId="28" height="30" width="105">
               <position x="395" y="705"/>
               <connectionPointIn>
                 <relPosition x="0" y="15"/>
@@ -639,7 +659,7 @@
                 <relPosition x="0" y="15"/>
                 <connection refLocalId="27">
                   <position x="415" y="785"/>
-                  <position x="380" y="785"/>
+                  <position x="390" y="785"/>
                 </connection>
               </connectionPointIn>
               <expression>FromInput</expression>
@@ -847,15 +867,15 @@
               </connectionPointOut>
               <expression>'True'</expression>
             </inVariable>
-            <block localId="46" width="130" height="45" typeName="BYTE_TO_STRING">
+            <block localId="46" width="130" height="45" typeName="INT_TO_STRING">
               <position x="900" y="970"/>
               <inputVariables>
                 <variable formalParameter="IN">
                   <connectionPointIn>
                     <relPosition x="0" y="30"/>
-                    <connection refLocalId="47">
+                    <connection refLocalId="58">
                       <position x="900" y="1000"/>
-                      <position x="850" y="1000"/>
+                      <position x="840" y="1000"/>
                     </connection>
                   </connectionPointIn>
                 </variable>
@@ -869,13 +889,6 @@
                 </variable>
               </outputVariables>
             </block>
-            <inVariable localId="47" height="30" width="80">
-              <position x="770" y="985"/>
-              <connectionPointOut>
-                <relPosition x="80" y="15"/>
-              </connectionPointOut>
-              <expression>BYTE#145</expression>
-            </inVariable>
             <inVariable localId="50" height="30" width="105">
               <position x="200" y="1085"/>
               <connectionPointOut>
@@ -1048,6 +1061,62 @@
               </connectionPointOut>
               <expression>Test_TOD</expression>
             </inOutVariable>
+            <inVariable localId="49" height="30" width="30">
+              <position x="765" y="1200"/>
+              <connectionPointOut>
+                <relPosition x="30" y="15"/>
+              </connectionPointOut>
+              <expression>42</expression>
+            </inVariable>
+            <outVariable localId="57" height="30" width="50">
+              <position x="845" y="1200"/>
+              <connectionPointIn>
+                <relPosition x="0" y="15"/>
+                <connection refLocalId="49">
+                  <position x="845" y="1215"/>
+                  <position x="795" y="1215"/>
+                </connection>
+              </connectionPointIn>
+              <expression>TOTO</expression>
+            </outVariable>
+            <outVariable localId="56" height="30" width="50">
+              <position x="845" y="1240"/>
+              <connectionPointIn>
+                <relPosition x="0" y="15"/>
+                <connection refLocalId="49">
+                  <position x="845" y="1255"/>
+                  <position x="820" y="1255"/>
+                  <position x="820" y="1215"/>
+                  <position x="795" y="1215"/>
+                </connection>
+              </connectionPointIn>
+              <expression>TUTU</expression>
+            </outVariable>
+            <inVariable localId="58" height="30" width="145">
+              <position x="715" y="985"/>
+              <connectionPointOut>
+                <relPosition x="145" y="15"/>
+              </connectionPointOut>
+              <expression>Second_Python_Var</expression>
+            </inVariable>
+            <outVariable localId="47" height="30" width="125">
+              <position x="400" y="975"/>
+              <connectionPointIn>
+                <relPosition x="0" y="15"/>
+                <connection refLocalId="59">
+                  <position x="400" y="990"/>
+                  <position x="330" y="990"/>
+                </connection>
+              </connectionPointIn>
+              <expression>Test_Python_Var</expression>
+            </outVariable>
+            <inVariable localId="59" height="30" width="30">
+              <position x="300" y="975"/>
+              <connectionPointOut>
+                <relPosition x="30" y="15"/>
+              </connectionPointOut>
+              <expression>23</expression>
+            </inVariable>
           </FBD>
         </body>
       </pou>
@@ -1120,6 +1189,7 @@
 {{
   char toPLC;
   char fromPLC = GetFbVar(IN);
+  extern int PLC_C_Call(char, char *);
   if(PLC_C_Call(fromPLC, &toPLC)){
     SetFbVar(OUT, toPLC);
   }
@@ -1182,6 +1252,11 @@
               <derived name="RS"/>
             </type>
           </variable>
+          <variable name="TUTU">
+            <type>
+              <INT/>
+            </type>
+          </variable>
         </globalVars>
       </configuration>
     </configurations>