tests/python/plc.xml
changeset 866 ee6adf7586c1
parent 862 bb59865db6e6
child 881 68ac754a5a72
equal deleted inserted replaced
865:c377a1d7767a 866:ee6adf7586c1
     6   <fileHeader companyName="beremiz"
     6   <fileHeader companyName="beremiz"
     7               productName="Beremiz"
     7               productName="Beremiz"
     8               productVersion="0.0"
     8               productVersion="0.0"
     9               creationDateTime="2008-12-14T16:21:19"/>
     9               creationDateTime="2008-12-14T16:21:19"/>
    10   <contentHeader name="Beremiz Python Support Tests"
    10   <contentHeader name="Beremiz Python Support Tests"
    11                  modificationDateTime="2012-10-19T11:54:13">
    11                  modificationDateTime="2012-10-23T00:54:38">
    12     <coordinateInfo>
    12     <coordinateInfo>
    13       <pageSize x="1024" y="1024"/>
    13       <pageSize x="1024" y="1024"/>
    14       <fbd>
    14       <fbd>
    15         <scaling x="5" y="5"/>
    15         <scaling x="5" y="5"/>
    16       </fbd>
    16       </fbd>
   112           </localVars>
   112           </localVars>
   113         </interface>
   113         </interface>
   114         <body>
   114         <body>
   115           <FBD>
   115           <FBD>
   116             <inVariable localId="4" height="30" width="160">
   116             <inVariable localId="4" height="30" width="160">
   117               <position x="295" y="235"/>
   117               <position x="295" y="230"/>
   118               <connectionPointOut>
   118               <connectionPointOut>
   119                 <relPosition x="160" y="15"/>
   119                 <relPosition x="160" y="15"/>
   120               </connectionPointOut>
   120               </connectionPointOut>
   121               <expression>'time.sleep(1)'</expression>
   121               <expression>'time.sleep(1)'</expression>
   122             </inVariable>
   122             </inVariable>
   123             <block localId="5" width="125" height="80" typeName="python_eval" instanceName="py1">
   123             <block localId="5" width="125" height="80" typeName="python_eval" instanceName="py1">
   124               <position x="650" y="185"/>
   124               <position x="650" y="180"/>
   125               <inputVariables>
   125               <inputVariables>
   126                 <variable formalParameter="TRIG">
   126                 <variable formalParameter="TRIG">
   127                   <connectionPointIn>
   127                   <connectionPointIn>
   128                     <relPosition x="0" y="35"/>
   128                     <relPosition x="0" y="35"/>
   129                     <connection refLocalId="7" formalParameter="OUT">
   129                     <connection refLocalId="7" formalParameter="OUT">
   130                       <position x="650" y="220"/>
   130                       <position x="650" y="215"/>
   131                       <position x="285" y="220"/>
   131                       <position x="285" y="215"/>
   132                       <position x="285" y="260"/>
   132                       <position x="285" y="260"/>
   133                       <position x="250" y="260"/>
   133                       <position x="250" y="260"/>
   134                     </connection>
   134                     </connection>
   135                   </connectionPointIn>
   135                   </connectionPointIn>
   136                 </variable>
   136                 </variable>
   137                 <variable formalParameter="CODE">
   137                 <variable formalParameter="CODE">
   138                   <connectionPointIn>
   138                   <connectionPointIn>
   139                     <relPosition x="0" y="65"/>
   139                     <relPosition x="0" y="65"/>
   140                     <connection refLocalId="4">
   140                     <connection refLocalId="4">
   141                       <position x="650" y="250"/>
   141                       <position x="650" y="245"/>
   142                       <position x="455" y="250"/>
   142                       <position x="455" y="245"/>
   143                     </connection>
   143                     </connection>
   144                   </connectionPointIn>
   144                   </connectionPointIn>
   145                 </variable>
   145                 </variable>
   146               </inputVariables>
   146               </inputVariables>
   147               <inOutVariables/>
   147               <inOutVariables/>
   239             <inVariable localId="9" height="30" width="290">
   239             <inVariable localId="9" height="30" width="290">
   240               <position x="295" y="345"/>
   240               <position x="295" y="345"/>
   241               <connectionPointOut>
   241               <connectionPointOut>
   242                 <relPosition x="290" y="15"/>
   242                 <relPosition x="290" y="15"/>
   243               </connectionPointOut>
   243               </connectionPointOut>
   244               <expression>'sys.stdout.write("1234\n")'</expression>
   244               <expression>'sys.stdout.write("FBID :"+str(FBID)+"\n")'</expression>
   245             </inVariable>
   245             </inVariable>
   246             <inVariable localId="11" height="30" width="290">
   246             <inVariable localId="11" height="30" width="290">
   247               <position x="290" y="465"/>
   247               <position x="295" y="465"/>
   248               <connectionPointOut>
   248               <connectionPointOut>
   249                 <relPosition x="290" y="15"/>
   249                 <relPosition x="290" y="15"/>
   250               </connectionPointOut>
   250               </connectionPointOut>
   251               <expression>'PLCBinary.Simple_C_Call(5678)'</expression>
   251               <expression>'PLCBinary.Simple_C_Call(5678)'</expression>
   252             </inVariable>
   252             </inVariable>
   267                 <variable formalParameter="CODE">
   267                 <variable formalParameter="CODE">
   268                   <connectionPointIn>
   268                   <connectionPointIn>
   269                     <relPosition x="0" y="63"/>
   269                     <relPosition x="0" y="63"/>
   270                     <connection refLocalId="11">
   270                     <connection refLocalId="11">
   271                       <position x="650" y="480"/>
   271                       <position x="650" y="480"/>
   272                       <position x="580" y="480"/>
   272                       <position x="585" y="480"/>
   273                     </connection>
   273                     </connection>
   274                   </connectionPointIn>
   274                   </connectionPointIn>
   275                 </variable>
   275                 </variable>
   276               </inputVariables>
   276               </inputVariables>
   277               <inOutVariables/>
   277               <inOutVariables/>
   355                   <connectionPointIn>
   355                   <connectionPointIn>
   356                     <relPosition x="0" y="50"/>
   356                     <relPosition x="0" y="50"/>
   357                     <connection refLocalId="5" formalParameter="RESULT">
   357                     <connection refLocalId="5" formalParameter="RESULT">
   358                       <position x="1065" y="545"/>
   358                       <position x="1065" y="545"/>
   359                       <position x="905" y="545"/>
   359                       <position x="905" y="545"/>
   360                       <position x="905" y="250"/>
   360                       <position x="905" y="245"/>
   361                       <position x="775" y="250"/>
   361                       <position x="775" y="245"/>
   362                     </connection>
   362                     </connection>
   363                   </connectionPointIn>
   363                   </connectionPointIn>
   364                 </variable>
   364                 </variable>
   365                 <variable formalParameter="IN1">
   365                 <variable formalParameter="IN1">
   366                   <connectionPointIn>
   366                   <connectionPointIn>
   420                 </connection>
   420                 </connection>
   421               </connectionPointIn>
   421               </connectionPointIn>
   422               <expression>pytest_var1</expression>
   422               <expression>pytest_var1</expression>
   423             </outVariable>
   423             </outVariable>
   424             <block localId="21" width="80" height="120" typeName="MUX">
   424             <block localId="21" width="80" height="120" typeName="MUX">
   425               <position x="985" y="170"/>
   425               <position x="985" y="165"/>
   426               <inputVariables>
   426               <inputVariables>
   427                 <variable formalParameter="K">
   427                 <variable formalParameter="K">
   428                   <connectionPointIn>
   428                   <connectionPointIn>
   429                     <relPosition x="0" y="30"/>
   429                     <relPosition x="0" y="30"/>
   430                     <connection refLocalId="22">
   430                     <connection refLocalId="22">
   431                       <position x="985" y="200"/>
   431                       <position x="985" y="195"/>
   432                       <position x="950" y="200"/>
   432                       <position x="950" y="195"/>
   433                     </connection>
   433                     </connection>
   434                   </connectionPointIn>
   434                   </connectionPointIn>
   435                 </variable>
   435                 </variable>
   436                 <variable formalParameter="IN0">
   436                 <variable formalParameter="IN0">
   437                   <connectionPointIn>
   437                   <connectionPointIn>
   438                     <relPosition x="0" y="50"/>
   438                     <relPosition x="0" y="50"/>
   439                     <connection refLocalId="5" formalParameter="ACK">
   439                     <connection refLocalId="5" formalParameter="ACK">
   440                       <position x="985" y="220"/>
   440                       <position x="985" y="215"/>
   441                       <position x="775" y="220"/>
   441                       <position x="775" y="215"/>
   442                     </connection>
   442                     </connection>
   443                   </connectionPointIn>
   443                   </connectionPointIn>
   444                 </variable>
   444                 </variable>
   445                 <variable formalParameter="IN1">
   445                 <variable formalParameter="IN1">
   446                   <connectionPointIn>
   446                   <connectionPointIn>
   447                     <relPosition x="0" y="70"/>
   447                     <relPosition x="0" y="70"/>
   448                     <connection refLocalId="8" formalParameter="ACK">
   448                     <connection refLocalId="8" formalParameter="ACK">
   449                       <position x="985" y="240"/>
   449                       <position x="985" y="235"/>
   450                       <position x="805" y="240"/>
   450                       <position x="805" y="235"/>
   451                       <position x="805" y="330"/>
   451                       <position x="805" y="330"/>
   452                       <position x="775" y="330"/>
   452                       <position x="775" y="330"/>
   453                     </connection>
   453                     </connection>
   454                   </connectionPointIn>
   454                   </connectionPointIn>
   455                 </variable>
   455                 </variable>
   456                 <variable formalParameter="IN2">
   456                 <variable formalParameter="IN2">
   457                   <connectionPointIn>
   457                   <connectionPointIn>
   458                     <relPosition x="0" y="90"/>
   458                     <relPosition x="0" y="90"/>
   459                     <connection refLocalId="12" formalParameter="ACK">
   459                     <connection refLocalId="12" formalParameter="ACK">
   460                       <position x="985" y="260"/>
   460                       <position x="985" y="255"/>
   461                       <position x="820" y="260"/>
   461                       <position x="820" y="255"/>
   462                       <position x="820" y="450"/>
   462                       <position x="820" y="450"/>
   463                       <position x="775" y="450"/>
   463                       <position x="775" y="450"/>
   464                     </connection>
   464                     </connection>
   465                   </connectionPointIn>
   465                   </connectionPointIn>
   466                 </variable>
   466                 </variable>
   467                 <variable formalParameter="IN3">
   467                 <variable formalParameter="IN3">
   468                   <connectionPointIn>
   468                   <connectionPointIn>
   469                     <relPosition x="0" y="110"/>
   469                     <relPosition x="0" y="110"/>
   470                     <connection refLocalId="15" formalParameter="ACK">
   470                     <connection refLocalId="15" formalParameter="ACK">
   471                       <position x="985" y="280"/>
   471                       <position x="985" y="275"/>
   472                       <position x="835" y="280"/>
   472                       <position x="835" y="275"/>
   473                       <position x="835" y="575"/>
   473                       <position x="835" y="575"/>
   474                       <position x="775" y="575"/>
   474                       <position x="775" y="575"/>
   475                     </connection>
   475                     </connection>
   476                   </connectionPointIn>
   476                   </connectionPointIn>
   477                 </variable>
   477                 </variable>
   484                   </connectionPointOut>
   484                   </connectionPointOut>
   485                 </variable>
   485                 </variable>
   486               </outputVariables>
   486               </outputVariables>
   487             </block>
   487             </block>
   488             <inVariable localId="22" height="30" width="20">
   488             <inVariable localId="22" height="30" width="20">
   489               <position x="930" y="185"/>
   489               <position x="930" y="180"/>
   490               <connectionPointOut>
   490               <connectionPointOut>
   491                 <relPosition x="20" y="15"/>
   491                 <relPosition x="20" y="15"/>
   492               </connectionPointOut>
   492               </connectionPointOut>
   493               <expression>3</expression>
   493               <expression>3</expression>
   494             </inVariable>
   494             </inVariable>
   495             <outVariable localId="23" height="35" width="125">
   495             <outVariable localId="23" height="35" width="125">
   496               <position x="1150" y="185"/>
   496               <position x="1150" y="180"/>
   497               <connectionPointIn>
   497               <connectionPointIn>
   498                 <relPosition x="0" y="15"/>
   498                 <relPosition x="0" y="15"/>
   499                 <connection refLocalId="21" formalParameter="OUT">
   499                 <connection refLocalId="21" formalParameter="OUT">
   500                   <position x="1150" y="200"/>
   500                   <position x="1150" y="195"/>
   501                   <position x="1065" y="200"/>
   501                   <position x="1065" y="195"/>
   502                 </connection>
   502                 </connection>
   503               </connectionPointIn>
   503               </connectionPointIn>
   504               <expression>pytest_var3</expression>
   504               <expression>pytest_var3</expression>
   505             </outVariable>
   505             </outVariable>
   506             <outVariable localId="25" height="30" width="60">
   506             <outVariable localId="25" height="30" width="60">
   582             <comment localId="30" height="90" width="405">
   582             <comment localId="30" height="90" width="405">
   583               <position x="245" y="825"/>
   583               <position x="245" y="825"/>
   584               <content>
   584               <content>
   585 <![CDATA[You will be ready to use beremiz with C and Python when you will understand why "FromInput" is equal  to 75.
   585 <![CDATA[You will be ready to use beremiz with C and Python when you will understand why "FromInput" is equal  to 75.
   586 Enjoy. ]]>
   586 Enjoy. ]]>
       
   587               </content>
       
   588             </comment>
       
   589             <comment localId="31" height="60" width="345">
       
   590               <position x="295" y="265"/>
       
   591               <content>
       
   592 <![CDATA[Sleep here is bad. It blocks other py_eval instances. Whith a wxGlade GUI, GUI freeze for a second.]]>
       
   593               </content>
       
   594             </comment>
       
   595             <comment localId="6" height="60" width="345">
       
   596               <position x="295" y="380"/>
       
   597               <content>
       
   598 <![CDATA[Prints FBID to stdout of PLC runtime. FBID is a unique reference to py_eval instance.]]>
       
   599               </content>
       
   600             </comment>
       
   601             <comment localId="10" height="60" width="345">
       
   602               <position x="295" y="500"/>
       
   603               <content>
       
   604 <![CDATA[Simple_C_Call is declared in C_File "1.x:c_code". See python ctypes manual for details on typing.]]>
       
   605               </content>
       
   606             </comment>
       
   607             <comment localId="32" height="105" width="235">
       
   608               <position x="25" y="285"/>
       
   609               <content>
       
   610 <![CDATA[Fast clock, at least faster that sleep(1). See what happens when python takes time to answer : PLC continues.]]>
   587               </content>
   611               </content>
   588             </comment>
   612             </comment>
   589           </FBD>
   613           </FBD>
   590         </body>
   614         </body>
   591       </pou>
   615       </pou>