Edouard@1399: <?xml version='1.0' encoding='utf-8'?>
Edouard@1399: <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201">
Edouard@1399:   <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:53:26"/>
Edouard@1399:   <contentHeader name="Beremiz non-standard POUs library" modificationDateTime="2014-03-17T08:07:24">
laurent@366:     <coordinateInfo>
laurent@366:       <fbd>
laurent@366:         <scaling x="0" y="0"/>
laurent@366:       </fbd>
laurent@366:       <ld>
laurent@366:         <scaling x="0" y="0"/>
laurent@366:       </ld>
laurent@366:       <sfc>
laurent@366:         <scaling x="0" y="0"/>
laurent@366:       </sfc>
laurent@366:     </coordinateInfo>
laurent@366:   </contentHeader>
laurent@366:   <types>
laurent@366:     <dataTypes/>
laurent@366:     <pous>
laurent@366:       <pou name="python_eval" pouType="functionBlock">
laurent@366:         <interface>
laurent@366:           <inputVars>
laurent@366:             <variable name="TRIG">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="CODE">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:           </inputVars>
laurent@366:           <outputVars>
laurent@366:             <variable name="ACK">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="RESULT">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:           </outputVars>
laurent@366:           <localVars>
laurent@366:             <variable name="STATE">
laurent@366:               <type>
laurent@366:                 <DWORD/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="BUFFER">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="PREBUFFER">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="TRIGM1">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="TRIGGED">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:           </localVars>
laurent@366:         </interface>
laurent@366:         <body>
laurent@366:           <ST>
Edouard@1399:             <xhtml:p><![CDATA[{extern void __PythonEvalFB(int, PYTHON_EVAL*);__PythonEvalFB(0, data__);}]]></xhtml:p>
laurent@366:           </ST>
laurent@366:         </body>
laurent@366:       </pou>
laurent@366:       <pou name="python_poll" pouType="functionBlock">
laurent@366:         <interface>
laurent@366:           <inputVars>
laurent@366:             <variable name="TRIG">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="CODE">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:           </inputVars>
laurent@366:           <outputVars>
laurent@366:             <variable name="ACK">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="RESULT">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:           </outputVars>
laurent@366:           <localVars>
laurent@366:             <variable name="STATE">
laurent@366:               <type>
laurent@366:                 <DWORD/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="BUFFER">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="PREBUFFER">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="TRIGM1">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="TRIGGED">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:           </localVars>
laurent@366:         </interface>
laurent@366:         <body>
laurent@366:           <ST>
Edouard@1399:             <xhtml:p><![CDATA[{extern void __PythonEvalFB(int, PYTHON_EVAL*);__PythonEvalFB(1,(PYTHON_EVAL*)(void*)data__);}]]></xhtml:p>
laurent@366:           </ST>
laurent@366:         </body>
laurent@366:       </pou>
Edouard@1399:       <pou name="python_gear" pouType="functionBlock">
laurent@366:         <interface>
laurent@366:           <inputVars>
laurent@366:             <variable name="N">
laurent@366:               <type>
Edouard@1399:                 <UINT/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="TRIG">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="CODE">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:           </inputVars>
laurent@366:           <outputVars>
laurent@366:             <variable name="ACK">
laurent@366:               <type>
laurent@366:                 <BOOL/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="RESULT">
laurent@366:               <type>
laurent@366:                 <string/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:           </outputVars>
laurent@366:           <localVars>
laurent@366:             <variable name="py_eval">
laurent@366:               <type>
laurent@366:                 <derived name="python_eval"/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:             <variable name="COUNTER">
laurent@366:               <type>
Edouard@1399:                 <UINT/>
laurent@366:               </type>
laurent@366:             </variable>
laurent@366:           </localVars>
laurent@366:         </interface>
laurent@366:         <body>
laurent@366:           <FBD>
laurent@366:             <block localId="1" width="125" height="110" typeName="python_eval" instanceName="py_eval">
laurent@366:               <position x="525" y="580"/>
laurent@366:               <inputVariables>
laurent@366:                 <variable formalParameter="TRIG">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="40"/>
laurent@366:                     <connection refLocalId="7" formalParameter="OUT">
laurent@366:                       <position x="525" y="620"/>
laurent@366:                       <position x="495" y="620"/>
laurent@366:                       <position x="495" y="575"/>
laurent@366:                       <position x="465" y="575"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:                 <variable formalParameter="CODE">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="85"/>
laurent@366:                     <connection refLocalId="4">
laurent@366:                       <position x="525" y="665"/>
laurent@366:                       <position x="370" y="665"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:               </inputVariables>
laurent@366:               <inOutVariables/>
laurent@366:               <outputVariables>
laurent@366:                 <variable formalParameter="ACK">
laurent@366:                   <connectionPointOut>
laurent@366:                     <relPosition x="125" y="40"/>
laurent@366:                   </connectionPointOut>
laurent@366:                 </variable>
laurent@366:                 <variable formalParameter="RESULT">
laurent@366:                   <connectionPointOut>
laurent@366:                     <relPosition x="125" y="85"/>
laurent@366:                   </connectionPointOut>
laurent@366:                 </variable>
laurent@366:               </outputVariables>
laurent@366:             </block>
laurent@366:             <inVariable localId="2" height="35" width="25">
laurent@366:               <position x="435" y="270"/>
laurent@366:               <connectionPointOut>
laurent@366:                 <relPosition x="25" y="15"/>
laurent@366:               </connectionPointOut>
laurent@366:               <expression>N</expression>
laurent@366:             </inVariable>
laurent@366:             <inVariable localId="3" height="35" width="55">
laurent@366:               <position x="275" y="585"/>
laurent@366:               <connectionPointOut>
laurent@366:                 <relPosition x="55" y="15"/>
laurent@366:               </connectionPointOut>
laurent@366:               <expression>TRIG</expression>
laurent@366:             </inVariable>
laurent@366:             <inVariable localId="4" height="35" width="55">
laurent@366:               <position x="315" y="650"/>
laurent@366:               <connectionPointOut>
laurent@366:                 <relPosition x="55" y="15"/>
laurent@366:               </connectionPointOut>
laurent@366:               <expression>CODE</expression>
laurent@366:             </inVariable>
laurent@366:             <outVariable localId="5" height="35" width="45">
laurent@366:               <position x="740" y="605"/>
laurent@366:               <connectionPointIn>
laurent@366:                 <relPosition x="0" y="15"/>
laurent@366:                 <connection refLocalId="1" formalParameter="ACK">
laurent@366:                   <position x="740" y="620"/>
laurent@366:                   <position x="650" y="620"/>
laurent@366:                 </connection>
laurent@366:               </connectionPointIn>
laurent@366:               <expression>ACK</expression>
laurent@366:             </outVariable>
laurent@366:             <outVariable localId="6" height="35" width="75">
laurent@366:               <position x="740" y="650"/>
laurent@366:               <connectionPointIn>
laurent@366:                 <relPosition x="0" y="15"/>
laurent@366:                 <connection refLocalId="1" formalParameter="RESULT">
laurent@366:                   <position x="740" y="665"/>
laurent@366:                   <position x="650" y="665"/>
laurent@366:                 </connection>
laurent@366:               </connectionPointIn>
laurent@366:               <expression>RESULT</expression>
laurent@366:             </outVariable>
laurent@366:             <block localId="7" width="80" height="65" typeName="AND">
laurent@366:               <position x="385" y="545"/>
laurent@366:               <inputVariables>
laurent@366:                 <variable formalParameter="IN1">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="30"/>
laurent@366:                     <connection refLocalId="13" formalParameter="OUT">
laurent@366:                       <position x="385" y="575"/>
laurent@366:                       <position x="335" y="575"/>
laurent@366:                       <position x="335" y="455"/>
laurent@366:                       <position x="625" y="455"/>
laurent@366:                       <position x="625" y="285"/>
laurent@366:                       <position x="615" y="285"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:                 <variable formalParameter="IN2">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="55"/>
laurent@366:                     <connection refLocalId="3">
laurent@366:                       <position x="385" y="600"/>
laurent@366:                       <position x="330" y="600"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:               </inputVariables>
laurent@366:               <inOutVariables/>
laurent@366:               <outputVariables>
laurent@366:                 <variable formalParameter="OUT">
laurent@366:                   <connectionPointOut>
laurent@366:                     <relPosition x="80" y="30"/>
laurent@366:                   </connectionPointOut>
laurent@366:                 </variable>
laurent@366:               </outputVariables>
laurent@366:             </block>
laurent@366:             <inVariable localId="9" height="35" width="85">
laurent@366:               <position x="240" y="330"/>
laurent@366:               <connectionPointOut>
laurent@366:                 <relPosition x="85" y="15"/>
laurent@366:               </connectionPointOut>
laurent@366:               <expression>COUNTER</expression>
laurent@366:             </inVariable>
laurent@366:             <block localId="10" width="80" height="65" typeName="ADD">
laurent@366:               <position x="380" y="330"/>
laurent@366:               <inputVariables>
laurent@366:                 <variable formalParameter="IN1">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="30"/>
laurent@366:                     <connection refLocalId="9">
laurent@366:                       <position x="380" y="360"/>
laurent@366:                       <position x="352" y="360"/>
laurent@366:                       <position x="352" y="345"/>
laurent@366:                       <position x="325" y="345"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:                 <variable formalParameter="IN2">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="55"/>
laurent@366:                     <connection refLocalId="11">
laurent@366:                       <position x="380" y="385"/>
laurent@366:                       <position x="325" y="385"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:               </inputVariables>
laurent@366:               <inOutVariables/>
laurent@366:               <outputVariables>
laurent@366:                 <variable formalParameter="OUT">
laurent@366:                   <connectionPointOut>
laurent@366:                     <relPosition x="80" y="30"/>
laurent@366:                   </connectionPointOut>
laurent@366:                 </variable>
laurent@366:               </outputVariables>
laurent@366:             </block>
Edouard@1399:             <inVariable localId="11" height="35" width="85" executionOrderId="0" negated="false">
laurent@366:               <position x="240" y="370"/>
laurent@366:               <connectionPointOut>
Edouard@1399:                 <relPosition x="85" y="17"/>
Edouard@1399:               </connectionPointOut>
Edouard@1399:               <expression>1</expression>
laurent@366:             </inVariable>
laurent@366:             <block localId="13" width="80" height="65" typeName="EQ">
laurent@366:               <position x="535" y="255"/>
laurent@366:               <inputVariables>
laurent@366:                 <variable formalParameter="IN1">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="30"/>
laurent@366:                     <connection refLocalId="2">
laurent@366:                       <position x="535" y="285"/>
laurent@366:                       <position x="460" y="285"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:                 <variable formalParameter="IN2">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="55"/>
laurent@366:                     <connection refLocalId="10" formalParameter="OUT">
laurent@366:                       <position x="535" y="310"/>
laurent@366:                       <position x="497" y="310"/>
laurent@366:                       <position x="497" y="360"/>
laurent@366:                       <position x="460" y="360"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:               </inputVariables>
laurent@366:               <inOutVariables/>
laurent@366:               <outputVariables>
laurent@366:                 <variable formalParameter="OUT">
laurent@366:                   <connectionPointOut>
laurent@366:                     <relPosition x="80" y="30"/>
laurent@366:                   </connectionPointOut>
laurent@366:                 </variable>
laurent@366:               </outputVariables>
laurent@366:             </block>
laurent@366:             <block localId="15" width="80" height="135" typeName="SEL">
laurent@366:               <position x="785" y="245"/>
laurent@366:               <inputVariables>
laurent@366:                 <variable formalParameter="G">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="40"/>
laurent@366:                     <connection refLocalId="13" formalParameter="OUT">
laurent@366:                       <position x="785" y="285"/>
laurent@366:                       <position x="615" y="285"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:                 <variable formalParameter="IN0">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="75"/>
laurent@366:                     <connection refLocalId="10" formalParameter="OUT">
laurent@366:                       <position x="785" y="320"/>
laurent@366:                       <position x="650" y="320"/>
laurent@366:                       <position x="650" y="360"/>
laurent@366:                       <position x="460" y="360"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:                 <variable formalParameter="IN1">
laurent@366:                   <connectionPointIn>
laurent@366:                     <relPosition x="0" y="115"/>
laurent@366:                     <connection refLocalId="16">
laurent@366:                       <position x="785" y="360"/>
laurent@366:                       <position x="760" y="360"/>
laurent@366:                     </connection>
laurent@366:                   </connectionPointIn>
laurent@366:                 </variable>
laurent@366:               </inputVariables>
laurent@366:               <inOutVariables/>
laurent@366:               <outputVariables>
laurent@366:                 <variable formalParameter="OUT">
laurent@366:                   <connectionPointOut>
laurent@366:                     <relPosition x="80" y="40"/>
laurent@366:                   </connectionPointOut>
laurent@366:                 </variable>
laurent@366:               </outputVariables>
laurent@366:             </block>
Edouard@1399:             <inVariable localId="16" height="35" width="85" executionOrderId="0" negated="false">
laurent@366:               <position x="675" y="345"/>
laurent@366:               <connectionPointOut>
Edouard@1399:                 <relPosition x="85" y="17"/>
Edouard@1399:               </connectionPointOut>
Edouard@1399:               <expression>0</expression>
laurent@366:             </inVariable>
laurent@366:             <outVariable localId="17" height="35" width="85">
laurent@366:               <position x="905" y="270"/>
laurent@366:               <connectionPointIn>
laurent@366:                 <relPosition x="0" y="15"/>
laurent@366:                 <connection refLocalId="15" formalParameter="OUT">
laurent@366:                   <position x="905" y="285"/>
laurent@366:                   <position x="865" y="285"/>
laurent@366:                 </connection>
laurent@366:               </connectionPointIn>
laurent@366:               <expression>COUNTER</expression>
laurent@366:             </outVariable>
laurent@366:           </FBD>
laurent@366:         </body>
laurent@366:       </pou>
laurent@366:     </pous>
laurent@366:   </types>
laurent@366:   <instances>
laurent@366:     <configurations/>
laurent@366:   </instances>
laurent@366: </project>