py_ext/pous.xml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sun, 08 Dec 2024 15:26:26 +0100
changeset 4065 d876242447da
parent 4062 1994928ce3d2
permissions -rw-r--r--
IDE: fix exception when changing or resizing comments in FBD
<?xml version='1.0' encoding='utf-8'?>
<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">
  <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:53:26"/>
  <contentHeader name="Beremiz non-standard POUs library" modificationDateTime="2024-12-06T12:12:39">
    <coordinateInfo>
      <fbd>
        <scaling x="8" y="8"/>
      </fbd>
      <ld>
        <scaling x="0" y="0"/>
      </ld>
      <sfc>
        <scaling x="0" y="0"/>
      </sfc>
    </coordinateInfo>
  </contentHeader>
  <types>
    <dataTypes/>
    <pous>
      <pou name="_csv_update" pouType="functionBlock">
        <interface>
          <externalVars>
            <variable name="pyext_csv_update">
              <type>
                <INT/>
              </type>
            </variable>
          </externalVars>
          <localVars>
            <variable name="pyext_csv_update_tmp">
              <type>
                <INT/>
              </type>
            </variable>
          </localVars>
          <outputVars>
            <variable name="TRIG">
              <type>
                <BOOL/>
              </type>
            </variable>
          </outputVars>
          <localVars>
            <variable name="R_TRIG0">
              <type>
                <derived name="R_TRIG"/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <outVariable localId="2" executionOrderId="0" height="32" width="176" negated="false">
              <position x="856" y="200"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="12" formalParameter="OUT">
                  <position x="856" y="216"/>
                  <position x="816" y="216"/>
                </connection>
              </connectionPointIn>
              <expression>pyext_csv_update_tmp</expression>
            </outVariable>
            <block localId="12" typeName="MOVE" executionOrderId="0" height="64" width="56">
              <position x="760" y="160"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="19" formalParameter="Q">
                      <position x="760" y="192"/>
                      <position x="664" y="192"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="17">
                      <position x="760" y="216"/>
                      <position x="568" y="216"/>
                      <position x="568" y="240"/>
                      <position x="408" y="240"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ENO">
                  <connectionPointOut>
                    <relPosition x="56" y="32"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="56" y="56"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="1" executionOrderId="0" width="176" height="32" negated="false">
              <position x="232" y="176"/>
              <connectionPointOut>
                <relPosition x="176" y="16"/>
              </connectionPointOut>
              <expression>pyext_csv_update_tmp</expression>
            </inVariable>
            <outVariable localId="15" executionOrderId="0" width="48" height="32" negated="false">
              <position x="760" y="112"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="19" formalParameter="Q">
                  <position x="760" y="128"/>
                  <position x="702" y="128"/>
                  <position x="702" y="192"/>
                  <position x="664" y="192"/>
                </connection>
              </connectionPointIn>
              <expression>TRIG</expression>
            </outVariable>
            <block localId="18" typeName="NE" executionOrderId="0" width="64" height="64">
              <position x="456" y="160"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="1">
                      <position x="456" y="192"/>
                      <position x="408" y="192"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="17">
                      <position x="456" y="216"/>
                      <position x="432" y="216"/>
                      <position x="432" y="240"/>
                      <position x="408" y="240"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="17" executionOrderId="0" width="176" height="32" negated="false">
              <position x="232" y="224"/>
              <connectionPointOut>
                <relPosition x="176" y="16"/>
              </connectionPointOut>
              <expression>pyext_csv_update</expression>
            </inVariable>
            <block localId="19" typeName="R_TRIG" instanceName="R_TRIG0" executionOrderId="0" width="64" height="48">
              <position x="600" y="160"/>
              <inputVariables>
                <variable formalParameter="CLK">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="18" formalParameter="OUT">
                      <position x="600" y="192"/>
                      <position x="520" y="192"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="Q">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
          </FBD>
        </body>
      </pou>
      <pou name="csv_refresh" pouType="functionBlock">
        <interface>
          <externalVars>
            <variable name="pyext_csv_update">
              <type>
                <INT/>
              </type>
            </variable>
          </externalVars>
          <inputVars>
            <variable name="TRIG">
              <type>
                <BOOL/>
              </type>
            </variable>
          </inputVars>
        </interface>
        <body>
          <FBD>
            <outVariable localId="2" executionOrderId="0" height="32" width="146" negated="false">
              <position x="808" y="312"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="12" formalParameter="OUT">
                  <position x="808" y="328"/>
                  <position x="760" y="328"/>
                </connection>
              </connectionPointIn>
              <expression>pyext_csv_update</expression>
            </outVariable>
            <block localId="12" typeName="MOVE" executionOrderId="0" height="64" width="56">
              <position x="704" y="272"/>
              <inputVariables>
                <variable formalParameter="EN">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="13" formalParameter="ENO">
                      <position x="704" y="304"/>
                      <position x="664" y="304"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="13" formalParameter="OUT">
                      <position x="704" y="328"/>
                      <position x="664" y="328"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ENO">
                  <connectionPointOut>
                    <relPosition x="56" y="32"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="56" y="56"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="13" typeName="ADD" executionOrderId="0" width="64" height="96">
              <position x="600" y="272"/>
              <inputVariables>
                <variable formalParameter="EN" edge="rising">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="15">
                      <position x="600" y="304"/>
                      <position x="336" y="304"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="1">
                      <position x="600" y="328"/>
                      <position x="490" y="328"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="80"/>
                    <connection refLocalId="14">
                      <position x="600" y="352"/>
                      <position x="528" y="352"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ENO">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="56"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="1" executionOrderId="0" width="146" height="32" negated="false">
              <position x="344" y="312"/>
              <connectionPointOut>
                <relPosition x="146" y="16"/>
              </connectionPointOut>
              <expression>pyext_csv_update</expression>
            </inVariable>
            <inVariable localId="14" executionOrderId="0" width="24" height="32" negated="false">
              <position x="504" y="336"/>
              <connectionPointOut>
                <relPosition x="24" y="16"/>
              </connectionPointOut>
              <expression>1</expression>
            </inVariable>
            <inVariable localId="15" executionOrderId="0" width="48" height="32" negated="false">
              <position x="288" y="288"/>
              <connectionPointOut>
                <relPosition x="48" y="16"/>
              </connectionPointOut>
              <expression>TRIG</expression>
            </inVariable>
          </FBD>
        </body>
        <documentation>
          <xhtml:p><![CDATA[Triggers CSV read FB to refresh output, without reloading CSV files]]></xhtml:p>
        </documentation>
      </pou>
      <pou name="csv_read_by_string" pouType="functionBlock">
        <interface>
          <outputVars>
            <variable name="ACK">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="RESULT">
              <type>
                <string/>
              </type>
            </variable>
          </outputVars>
          <inputVars>
            <variable name="FILE_NAME">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="ROW">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="COLUMN">
              <type>
                <string/>
              </type>
            </variable>
          </inputVars>
          <localVars>
            <variable name="OLDCODE">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="py_eval">
              <type>
                <derived name="python_eval"/>
              </type>
            </variable>
            <variable name="R_TRIG1">
              <type>
                <derived name="R_TRIG"/>
              </type>
            </variable>
            <variable name="SR0">
              <type>
                <derived name="SR"/>
              </type>
            </variable>
            <variable name="_csv_update0">
              <type>
                <derived name="_csv_update"/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <block localId="7" typeName="CONCAT" executionOrderId="0" height="192" width="64">
              <position x="360" y="112"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="8">
                      <position x="360" y="144"/>
                      <position x="320" y="144"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="9">
                      <position x="360" y="168"/>
                      <position x="152" y="168"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN3">
                  <connectionPointIn>
                    <relPosition x="0" y="80"/>
                    <connection refLocalId="10">
                      <position x="360" y="192"/>
                      <position x="320" y="192"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN4">
                  <connectionPointIn>
                    <relPosition x="0" y="104"/>
                    <connection refLocalId="11">
                      <position x="360" y="216"/>
                      <position x="152" y="216"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN5">
                  <connectionPointIn>
                    <relPosition x="0" y="128"/>
                    <connection refLocalId="12">
                      <position x="360" y="240"/>
                      <position x="320" y="240"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN6">
                  <connectionPointIn>
                    <relPosition x="0" y="152"/>
                    <connection refLocalId="13">
                      <position x="360" y="264"/>
                      <position x="152" y="264"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN7">
                  <connectionPointIn>
                    <relPosition x="0" y="176"/>
                    <connection refLocalId="14">
                      <position x="360" y="288"/>
                      <position x="320" y="288"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="8" executionOrderId="0" height="24" width="160" negated="false">
              <position x="160" y="128"/>
              <connectionPointOut>
                <relPosition x="160" y="16"/>
              </connectionPointOut>
              <expression>'CSVRdStr("'</expression>
            </inVariable>
            <inVariable localId="9" executionOrderId="0" height="32" width="112" negated="false">
              <position x="40" y="152"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>FILE_NAME</expression>
            </inVariable>
            <inVariable localId="10" executionOrderId="0" height="24" width="112" negated="false">
              <position x="208" y="184"/>
              <connectionPointOut>
                <relPosition x="112" y="8"/>
              </connectionPointOut>
              <expression>'","'</expression>
            </inVariable>
            <inVariable localId="11" executionOrderId="0" height="32" width="112" negated="false">
              <position x="40" y="200"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>ROW</expression>
            </inVariable>
            <inVariable localId="12" executionOrderId="0" height="24" width="112" negated="false">
              <position x="208" y="224"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>'","'</expression>
            </inVariable>
            <inVariable localId="13" executionOrderId="0" height="32" width="112" negated="false">
              <position x="40" y="248"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>COLUMN</expression>
            </inVariable>
            <inVariable localId="14" executionOrderId="0" height="24" width="112" negated="false">
              <position x="208" y="272"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>'")'</expression>
            </inVariable>
            <block localId="16" typeName="NE" executionOrderId="0" height="64" width="64">
              <position x="208" y="408"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="22">
                      <position x="208" y="440"/>
                      <position x="168" y="440"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="21">
                      <position x="208" y="464"/>
                      <position x="168" y="464"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="18" typeName="SEL" executionOrderId="0" height="96" width="64">
              <position x="680" y="376"/>
              <inputVariables>
                <variable formalParameter="G">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="25">
                      <position x="680" y="408"/>
                      <position x="624" y="408"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN0">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="20">
                      <position x="680" y="432"/>
                      <position x="632" y="432"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="80"/>
                    <connection refLocalId="4">
                      <position x="680" y="456"/>
                      <position x="632" y="456"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <connector name="Code" localId="19" height="24" width="128">
              <position x="480" y="136"/>
              <connectionPointIn>
                <relPosition x="0" y="8"/>
                <connection refLocalId="7" formalParameter="OUT">
                  <position x="480" y="144"/>
                  <position x="424" y="144"/>
                </connection>
              </connectionPointIn>
            </connector>
            <outVariable localId="17" executionOrderId="0" height="32" width="66" negated="false">
              <position x="784" y="392"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="18" formalParameter="OUT">
                  <position x="784" y="408"/>
                  <position x="744" y="408"/>
                </connection>
              </connectionPointIn>
              <expression>OLDCODE</expression>
            </outVariable>
            <inVariable localId="20" executionOrderId="0" height="32" width="72" negated="false">
              <position x="560" y="416"/>
              <connectionPointOut>
                <relPosition x="72" y="16"/>
              </connectionPointOut>
              <expression>OLDCODE</expression>
            </inVariable>
            <inVariable localId="21" executionOrderId="0" height="32" width="72" negated="false">
              <position x="96" y="448"/>
              <connectionPointOut>
                <relPosition x="72" y="16"/>
              </connectionPointOut>
              <expression>OLDCODE</expression>
            </inVariable>
            <continuation name="Code" localId="4" height="24" width="128">
              <position x="504" y="448"/>
              <connectionPointOut>
                <relPosition x="128" y="8"/>
              </connectionPointOut>
            </continuation>
            <continuation name="Code" localId="22" height="24" width="128">
              <position x="40" y="424"/>
              <connectionPointOut>
                <relPosition x="128" y="16"/>
              </connectionPointOut>
            </continuation>
            <connector name="CodeChange" localId="23" height="24" width="120">
              <position x="328" y="432"/>
              <connectionPointIn>
                <relPosition x="0" y="8"/>
                <connection refLocalId="16" formalParameter="OUT">
                  <position x="328" y="440"/>
                  <position x="272" y="440"/>
                </connection>
              </connectionPointIn>
            </connector>
            <continuation name="CodeChange" localId="25" height="24" width="120">
              <position x="504" y="392"/>
              <connectionPointOut>
                <relPosition x="120" y="16"/>
              </connectionPointOut>
            </continuation>
            <comment localId="26" height="40" width="232">
              <position x="48" y="40"/>
              <content>
                <xhtml:p><![CDATA[Generate python code line]]></xhtml:p>
              </content>
            </comment>
            <comment localId="27" height="48" width="312">
              <position x="40" y="328"/>
              <content>
                <xhtml:p><![CDATA[Detect changes in generated code line]]></xhtml:p>
              </content>
            </comment>
            <comment localId="28" height="48" width="520">
              <position x="48" y="512"/>
              <content>
                <xhtml:p><![CDATA[Execute python code on change or globally when CSV is updated]]></xhtml:p>
              </content>
            </comment>
            <block localId="1" width="104" height="80" typeName="python_eval" instanceName="py_eval" executionOrderId="0">
              <position x="552" y="600"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="15" formalParameter="OUT">
                      <position x="552" y="632"/>
                      <position x="360" y="632"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="CODE">
                  <connectionPointIn>
                    <relPosition x="0" y="64"/>
                    <connection refLocalId="2">
                      <position x="552" y="664"/>
                      <position x="540" y="664"/>
                      <position x="540" y="656"/>
                      <position x="528" y="656"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ACK">
                  <connectionPointOut>
                    <relPosition x="104" y="32"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="RESULT">
                  <connectionPointOut>
                    <relPosition x="104" y="64"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <outVariable localId="5" height="24" width="40" executionOrderId="0" negated="false">
              <position x="1216" y="632"/>
              <connectionPointIn>
                <relPosition x="0" y="8"/>
                <connection refLocalId="38" formalParameter="Q1">
                  <position x="1216" y="640"/>
                  <position x="1168" y="640"/>
                </connection>
              </connectionPointIn>
              <expression>ACK</expression>
            </outVariable>
            <outVariable localId="6" height="24" width="64" executionOrderId="0" negated="false">
              <position x="688" y="704"/>
              <connectionPointIn>
                <relPosition x="0" y="8"/>
                <connection refLocalId="1" formalParameter="RESULT">
                  <position x="688" y="712"/>
                  <position x="672" y="712"/>
                  <position x="672" y="664"/>
                  <position x="656" y="664"/>
                </connection>
              </connectionPointIn>
              <expression>RESULT</expression>
            </outVariable>
            <continuation name="Code" localId="2" height="24" width="128">
              <position x="400" y="648"/>
              <connectionPointOut>
                <relPosition x="128" y="16"/>
              </connectionPointOut>
            </continuation>
            <continuation name="CodeChange" localId="24" height="32" width="120">
              <position x="24" y="640"/>
              <connectionPointOut>
                <relPosition x="120" y="16"/>
              </connectionPointOut>
            </continuation>
            <block localId="15" typeName="OR" executionOrderId="0" height="64" width="64">
              <position x="296" y="600"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="40" formalParameter="TRIG">
                      <position x="296" y="632"/>
                      <position x="264" y="632"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="24">
                      <position x="296" y="656"/>
                      <position x="144" y="656"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="33" typeName="LEFT" executionOrderId="0" height="64" width="56">
              <position x="736" y="632"/>
              <inputVariables>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="1" formalParameter="RESULT">
                      <position x="736" y="664"/>
                      <position x="656" y="664"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="L">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="35">
                      <position x="736" y="688"/>
                      <position x="712" y="688"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="56" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="34" typeName="NE" executionOrderId="0" height="64" width="64">
              <position x="880" y="632"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="33" formalParameter="OUT">
                      <position x="880" y="664"/>
                      <position x="792" y="664"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="36">
                      <position x="880" y="688"/>
                      <position x="856" y="688"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="35" executionOrderId="0" height="24" width="24" negated="false">
              <position x="688" y="672"/>
              <connectionPointOut>
                <relPosition x="24" y="16"/>
              </connectionPointOut>
              <expression>1</expression>
            </inVariable>
            <inVariable localId="36" executionOrderId="0" height="24" width="40" negated="false">
              <position x="816" y="672"/>
              <connectionPointOut>
                <relPosition x="40" y="16"/>
              </connectionPointOut>
              <expression>'#'</expression>
            </inVariable>
            <block localId="37" typeName="R_TRIG" instanceName="R_TRIG1" executionOrderId="0" height="48" width="64">
              <position x="880" y="576"/>
              <inputVariables>
                <variable formalParameter="CLK">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="1" formalParameter="ACK">
                      <position x="880" y="608"/>
                      <position x="688" y="608"/>
                      <position x="688" y="632"/>
                      <position x="656" y="632"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="Q">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="38" typeName="SR" instanceName="SR0" executionOrderId="0" height="64" width="48">
              <position x="1120" y="608"/>
              <inputVariables>
                <variable formalParameter="S1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="39" formalParameter="OUT">
                      <position x="1120" y="640"/>
                      <position x="1056" y="640"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="R" edge="rising">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="15" formalParameter="OUT">
                      <position x="1120" y="664"/>
                      <position x="1088" y="664"/>
                      <position x="1088" y="736"/>
                      <position x="376" y="736"/>
                      <position x="376" y="632"/>
                      <position x="360" y="632"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="Q1">
                  <connectionPointOut>
                    <relPosition x="48" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="39" typeName="AND" executionOrderId="0" height="64" width="64">
              <position x="992" y="608"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="37" formalParameter="Q">
                      <position x="992" y="640"/>
                      <position x="976" y="640"/>
                      <position x="976" y="608"/>
                      <position x="944" y="608"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="34" formalParameter="OUT">
                      <position x="992" y="664"/>
                      <position x="944" y="664"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="40" typeName="_csv_update" instanceName="_csv_update0" executionOrderId="0" width="104" height="48">
              <position x="160" y="600"/>
              <inputVariables/>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointOut>
                    <relPosition x="104" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
          </FBD>
        </body>
      </pou>
      <pou name="csv_reload" pouType="functionBlock">
        <interface>
          <outputVars>
            <variable name="ACK">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="RESULT">
              <type>
                <string/>
              </type>
            </variable>
          </outputVars>
          <localVars>
            <variable name="py_eval">
              <type>
                <derived name="python_eval"/>
              </type>
            </variable>
          </localVars>
          <inputVars>
            <variable name="TRIG">
              <type>
                <BOOL/>
              </type>
            </variable>
          </inputVars>
          <localVars>
            <variable name="csv_refresh0">
              <type>
                <derived name="csv_refresh"/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <block localId="1" width="104" height="80" typeName="python_eval" instanceName="py_eval" executionOrderId="0">
              <position x="336" y="96"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="3">
                      <position x="336" y="128"/>
                      <position x="326" y="128"/>
                      <position x="326" y="128"/>
                      <position x="304" y="128"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="CODE">
                  <connectionPointIn>
                    <relPosition x="0" y="64"/>
                    <connection refLocalId="8">
                      <position x="336" y="160"/>
                      <position x="224" y="160"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ACK">
                  <connectionPointOut>
                    <relPosition x="104" y="32"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="RESULT">
                  <connectionPointOut>
                    <relPosition x="104" y="64"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="3" height="32" width="56" executionOrderId="0" negated="false">
              <position x="248" y="112"/>
              <connectionPointOut>
                <relPosition x="56" y="16"/>
              </connectionPointOut>
              <expression>TRIG</expression>
            </inVariable>
            <outVariable localId="5" height="32" width="40" executionOrderId="0" negated="false">
              <position x="568" y="112"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="1" formalParameter="ACK">
                  <position x="568" y="128"/>
                  <position x="440" y="128"/>
                </connection>
              </connectionPointIn>
              <expression>ACK</expression>
            </outVariable>
            <outVariable localId="6" height="32" width="64" executionOrderId="0" negated="false">
              <position x="488" y="144"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="1" formalParameter="RESULT">
                  <position x="488" y="160"/>
                  <position x="440" y="160"/>
                </connection>
              </connectionPointIn>
              <expression>RESULT</expression>
            </outVariable>
            <inVariable localId="8" executionOrderId="0" height="32" width="176" negated="false">
              <position x="48" y="144"/>
              <connectionPointOut>
                <relPosition x="176" y="16"/>
              </connectionPointOut>
              <expression>'pyext_csv_reload()'</expression>
            </inVariable>
            <block localId="15" typeName="csv_refresh" instanceName="csv_refresh0" executionOrderId="0" width="104" height="64">
              <position x="568" y="32"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="40"/>
                    <connection refLocalId="1" formalParameter="ACK">
                      <position x="568" y="72"/>
                      <position x="472" y="72"/>
                      <position x="472" y="128"/>
                      <position x="440" y="128"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables/>
            </block>
          </FBD>
        </body>
        <documentation>
          <xhtml:p><![CDATA[Purge CSV files cache and refresh CSV read FBs outputs, consequently reloading CSV files]]></xhtml:p>
        </documentation>
      </pou>
      <pou name="csv_read_by_int" pouType="functionBlock">
        <interface>
          <outputVars>
            <variable name="ACK">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="RESULT">
              <type>
                <string/>
              </type>
            </variable>
          </outputVars>
          <inputVars>
            <variable name="FILE_NAME">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="ROW">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="COLUMN">
              <type>
                <INT/>
              </type>
            </variable>
          </inputVars>
          <localVars>
            <variable name="OLDCODE">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="py_eval0">
              <type>
                <derived name="python_eval"/>
              </type>
            </variable>
            <variable name="R_TRIG2">
              <type>
                <derived name="R_TRIG"/>
              </type>
            </variable>
            <variable name="SR0">
              <type>
                <derived name="SR"/>
              </type>
            </variable>
            <variable name="_csv_update0">
              <type>
                <derived name="_csv_update"/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <block localId="7" typeName="CONCAT" executionOrderId="0" height="192" width="64">
              <position x="520" y="112"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="8">
                      <position x="520" y="144"/>
                      <position x="480" y="144"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="9">
                      <position x="520" y="168"/>
                      <position x="312" y="168"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN3">
                  <connectionPointIn>
                    <relPosition x="0" y="80"/>
                    <connection refLocalId="10">
                      <position x="520" y="192"/>
                      <position x="480" y="192"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN4">
                  <connectionPointIn>
                    <relPosition x="0" y="104"/>
                    <connection refLocalId="31" formalParameter="OUT">
                      <position x="520" y="216"/>
                      <position x="320" y="216"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN5">
                  <connectionPointIn>
                    <relPosition x="0" y="128"/>
                    <connection refLocalId="12">
                      <position x="520" y="240"/>
                      <position x="480" y="240"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN6">
                  <connectionPointIn>
                    <relPosition x="0" y="152"/>
                    <connection refLocalId="2" formalParameter="OUT">
                      <position x="520" y="264"/>
                      <position x="320" y="264"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN7">
                  <connectionPointIn>
                    <relPosition x="0" y="176"/>
                    <connection refLocalId="14">
                      <position x="520" y="288"/>
                      <position x="480" y="288"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="8" executionOrderId="0" height="24" width="160" negated="false">
              <position x="320" y="128"/>
              <connectionPointOut>
                <relPosition x="160" y="16"/>
              </connectionPointOut>
              <expression>'CSVRdInt("'</expression>
            </inVariable>
            <inVariable localId="9" executionOrderId="0" height="32" width="112" negated="false">
              <position x="200" y="152"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>FILE_NAME</expression>
            </inVariable>
            <inVariable localId="10" executionOrderId="0" height="24" width="112" negated="false">
              <position x="368" y="184"/>
              <connectionPointOut>
                <relPosition x="112" y="8"/>
              </connectionPointOut>
              <expression>'",'</expression>
            </inVariable>
            <inVariable localId="11" executionOrderId="0" height="32" width="112" negated="false">
              <position x="40" y="200"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>ROW</expression>
            </inVariable>
            <inVariable localId="12" executionOrderId="0" height="24" width="112" negated="false">
              <position x="368" y="224"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>','</expression>
            </inVariable>
            <inVariable localId="13" executionOrderId="0" height="32" width="112" negated="false">
              <position x="40" y="248"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>COLUMN</expression>
            </inVariable>
            <inVariable localId="14" executionOrderId="0" height="24" width="112" negated="false">
              <position x="368" y="272"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>')'</expression>
            </inVariable>
            <continuation name="Code" localId="4" height="24" width="128">
              <position x="504" y="496"/>
              <connectionPointOut>
                <relPosition x="128" y="16"/>
              </connectionPointOut>
            </continuation>
            <block localId="16" typeName="NE" executionOrderId="0" height="64" width="64">
              <position x="208" y="456"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="22">
                      <position x="208" y="488"/>
                      <position x="188" y="488"/>
                      <position x="188" y="480"/>
                      <position x="168" y="480"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="21">
                      <position x="208" y="512"/>
                      <position x="168" y="512"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <outVariable localId="17" executionOrderId="0" height="32" width="66" negated="false">
              <position x="784" y="440"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="18" formalParameter="OUT">
                  <position x="784" y="456"/>
                  <position x="744" y="456"/>
                </connection>
              </connectionPointIn>
              <expression>OLDCODE</expression>
            </outVariable>
            <block localId="18" typeName="SEL" executionOrderId="0" height="96" width="64">
              <position x="680" y="424"/>
              <inputVariables>
                <variable formalParameter="G">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="25">
                      <position x="680" y="456"/>
                      <position x="652" y="456"/>
                      <position x="652" y="448"/>
                      <position x="624" y="448"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN0">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="20">
                      <position x="680" y="480"/>
                      <position x="632" y="480"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="80"/>
                    <connection refLocalId="4">
                      <position x="680" y="504"/>
                      <position x="656" y="504"/>
                      <position x="656" y="512"/>
                      <position x="632" y="512"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="20" executionOrderId="0" height="32" width="72" negated="false">
              <position x="560" y="464"/>
              <connectionPointOut>
                <relPosition x="72" y="16"/>
              </connectionPointOut>
              <expression>OLDCODE</expression>
            </inVariable>
            <inVariable localId="21" executionOrderId="0" height="32" width="72" negated="false">
              <position x="96" y="496"/>
              <connectionPointOut>
                <relPosition x="72" y="16"/>
              </connectionPointOut>
              <expression>OLDCODE</expression>
            </inVariable>
            <continuation name="Code" localId="22" height="24" width="128">
              <position x="40" y="472"/>
              <connectionPointOut>
                <relPosition x="128" y="8"/>
              </connectionPointOut>
            </continuation>
            <connector name="CodeChange" localId="23" height="24" width="120">
              <position x="328" y="480"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="16" formalParameter="OUT">
                  <position x="328" y="496"/>
                  <position x="300" y="496"/>
                  <position x="300" y="488"/>
                  <position x="272" y="488"/>
                </connection>
              </connectionPointIn>
            </connector>
            <continuation name="CodeChange" localId="25" height="24" width="120">
              <position x="504" y="440"/>
              <connectionPointOut>
                <relPosition x="120" y="8"/>
              </connectionPointOut>
            </continuation>
            <comment localId="27" height="48" width="312">
              <position x="40" y="376"/>
              <content>
                <xhtml:p><![CDATA[Detect changes in generated code line]]></xhtml:p>
              </content>
            </comment>
            <comment localId="28" height="48" width="520">
              <position x="48" y="560"/>
              <content>
                <xhtml:p><![CDATA[Execute python code on change or globally when CSV is updated]]></xhtml:p>
              </content>
            </comment>
            <comment localId="29" height="40" width="232">
              <position x="64" y="32"/>
              <content>
                <xhtml:p><![CDATA[Generate python code line]]></xhtml:p>
              </content>
            </comment>
            <connector name="Code" localId="30" height="24" width="128">
              <position x="632" y="128"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="7" formalParameter="OUT">
                  <position x="632" y="144"/>
                  <position x="584" y="144"/>
                </connection>
              </connectionPointIn>
            </connector>
            <block localId="31" typeName="INT_TO_STRING" executionOrderId="0" height="48" width="120">
              <position x="200" y="184"/>
              <inputVariables>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="11">
                      <position x="200" y="216"/>
                      <position x="152" y="216"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="120" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="2" typeName="INT_TO_STRING" executionOrderId="0" height="48" width="120">
              <position x="200" y="232"/>
              <inputVariables>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="13">
                      <position x="200" y="264"/>
                      <position x="152" y="264"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="120" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="40" width="104" height="80" typeName="python_eval" instanceName="py_eval0" executionOrderId="0">
              <position x="552" y="640"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="15" formalParameter="OUT">
                      <position x="552" y="672"/>
                      <position x="360" y="672"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="CODE">
                  <connectionPointIn>
                    <relPosition x="0" y="64"/>
                    <connection refLocalId="41">
                      <position x="552" y="704"/>
                      <position x="528" y="704"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ACK">
                  <connectionPointOut>
                    <relPosition x="104" y="32"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="RESULT">
                  <connectionPointOut>
                    <relPosition x="104" y="64"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <continuation name="Code" localId="41" height="24" width="128">
              <position x="400" y="688"/>
              <connectionPointOut>
                <relPosition x="128" y="16"/>
              </connectionPointOut>
            </continuation>
            <outVariable localId="43" height="24" width="40" executionOrderId="0" negated="false">
              <position x="1216" y="664"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="38" formalParameter="Q1">
                  <position x="1216" y="680"/>
                  <position x="1168" y="680"/>
                </connection>
              </connectionPointIn>
              <expression>ACK</expression>
            </outVariable>
            <outVariable localId="44" height="24" width="64" executionOrderId="0" negated="false">
              <position x="688" y="744"/>
              <connectionPointIn>
                <relPosition x="0" y="8"/>
                <connection refLocalId="40" formalParameter="RESULT">
                  <position x="688" y="752"/>
                  <position x="672" y="752"/>
                  <position x="672" y="704"/>
                  <position x="656" y="704"/>
                </connection>
              </connectionPointIn>
              <expression>RESULT</expression>
            </outVariable>
            <block localId="15" typeName="OR" executionOrderId="0" height="64" width="64">
              <position x="296" y="640"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="1" formalParameter="TRIG">
                      <position x="296" y="672"/>
                      <position x="264" y="672"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="45">
                      <position x="296" y="696"/>
                      <position x="144" y="696"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <continuation name="CodeChange" localId="45" height="32" width="120">
              <position x="24" y="680"/>
              <connectionPointOut>
                <relPosition x="120" y="16"/>
              </connectionPointOut>
            </continuation>
            <block localId="33" typeName="LEFT" executionOrderId="0" height="64" width="56">
              <position x="736" y="672"/>
              <inputVariables>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="40" formalParameter="RESULT">
                      <position x="736" y="704"/>
                      <position x="656" y="704"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="L">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="35">
                      <position x="736" y="728"/>
                      <position x="724" y="728"/>
                      <position x="724" y="720"/>
                      <position x="712" y="720"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="56" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="34" typeName="NE" executionOrderId="0" height="64" width="64">
              <position x="880" y="672"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="33" formalParameter="OUT">
                      <position x="880" y="704"/>
                      <position x="792" y="704"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="36">
                      <position x="880" y="728"/>
                      <position x="868" y="728"/>
                      <position x="868" y="720"/>
                      <position x="856" y="720"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="35" executionOrderId="0" height="24" width="24" negated="false">
              <position x="688" y="712"/>
              <connectionPointOut>
                <relPosition x="24" y="8"/>
              </connectionPointOut>
              <expression>1</expression>
            </inVariable>
            <inVariable localId="36" executionOrderId="0" height="24" width="40" negated="false">
              <position x="816" y="712"/>
              <connectionPointOut>
                <relPosition x="40" y="8"/>
              </connectionPointOut>
              <expression>'#'</expression>
            </inVariable>
            <block localId="37" typeName="R_TRIG" instanceName="R_TRIG2" executionOrderId="0" height="48" width="64">
              <position x="880" y="616"/>
              <inputVariables>
                <variable formalParameter="CLK">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="40" formalParameter="ACK">
                      <position x="880" y="648"/>
                      <position x="688" y="648"/>
                      <position x="688" y="672"/>
                      <position x="656" y="672"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="Q">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="38" typeName="SR" instanceName="SR0" executionOrderId="0" height="64" width="48">
              <position x="1120" y="648"/>
              <inputVariables>
                <variable formalParameter="S1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="39" formalParameter="OUT">
                      <position x="1120" y="680"/>
                      <position x="1056" y="680"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="R" edge="rising">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="15" formalParameter="OUT">
                      <position x="1120" y="704"/>
                      <position x="1088" y="704"/>
                      <position x="1088" y="776"/>
                      <position x="376" y="776"/>
                      <position x="376" y="672"/>
                      <position x="360" y="672"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="Q1">
                  <connectionPointOut>
                    <relPosition x="48" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="39" typeName="AND" executionOrderId="0" height="64" width="64">
              <position x="992" y="648"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="37" formalParameter="Q">
                      <position x="992" y="680"/>
                      <position x="976" y="680"/>
                      <position x="976" y="648"/>
                      <position x="944" y="648"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="34" formalParameter="OUT">
                      <position x="992" y="704"/>
                      <position x="944" y="704"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="1" typeName="_csv_update" instanceName="_csv_update0" executionOrderId="0" width="104" height="48">
              <position x="160" y="640"/>
              <inputVariables/>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointOut>
                    <relPosition x="104" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
          </FBD>
        </body>
      </pou>
      <pou name="csv_write_by_int" pouType="functionBlock">
        <interface>
          <outputVars>
            <variable name="ACK">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="RESULT">
              <type>
                <string/>
              </type>
            </variable>
          </outputVars>
          <inputVars>
            <variable name="FILE_NAME">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="ROW">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="COLUMN">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="CONTENT">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="SAVE">
              <type>
                <BOOL/>
              </type>
            </variable>
          </inputVars>
          <localVars>
            <variable name="py_eval0">
              <type>
                <derived name="python_eval"/>
              </type>
            </variable>
            <variable name="R_TRIG1">
              <type>
                <derived name="R_TRIG"/>
              </type>
            </variable>
            <variable name="R_TRIG2">
              <type>
                <derived name="R_TRIG"/>
              </type>
            </variable>
            <variable name="SR0">
              <type>
                <derived name="SR"/>
              </type>
            </variable>
            <variable name="csv_refresh0">
              <type>
                <derived name="csv_refresh"/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <block localId="7" typeName="CONCAT" executionOrderId="0" height="240" width="72">
              <position x="680" y="88"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="8">
                      <position x="680" y="120"/>
                      <position x="512" y="120"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="9">
                      <position x="680" y="144"/>
                      <position x="152" y="144"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN3">
                  <connectionPointIn>
                    <relPosition x="0" y="80"/>
                    <connection refLocalId="10">
                      <position x="680" y="168"/>
                      <position x="616" y="168"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN4">
                  <connectionPointIn>
                    <relPosition x="0" y="104"/>
                    <connection refLocalId="31" formalParameter="OUT">
                      <position x="680" y="192"/>
                      <position x="320" y="192"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN5">
                  <connectionPointIn>
                    <relPosition x="0" y="128"/>
                    <connection refLocalId="12">
                      <position x="680" y="216"/>
                      <position x="616" y="216"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN6">
                  <connectionPointIn>
                    <relPosition x="0" y="152"/>
                    <connection refLocalId="2" formalParameter="OUT">
                      <position x="680" y="240"/>
                      <position x="320" y="240"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN7">
                  <connectionPointIn>
                    <relPosition x="0" y="176"/>
                    <connection refLocalId="51">
                      <position x="680" y="264"/>
                      <position x="616" y="264"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN8">
                  <connectionPointIn>
                    <relPosition x="0" y="200"/>
                    <connection refLocalId="52">
                      <position x="680" y="288"/>
                      <position x="448" y="288"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN9">
                  <connectionPointIn>
                    <relPosition x="0" y="224"/>
                    <connection refLocalId="14">
                      <position x="680" y="312"/>
                      <position x="616" y="312"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="72" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="8" executionOrderId="0" height="24" width="160" negated="false">
              <position x="352" y="112"/>
              <connectionPointOut>
                <relPosition x="160" y="8"/>
              </connectionPointOut>
              <expression>'CSVWrInt("'</expression>
            </inVariable>
            <inVariable localId="9" executionOrderId="0" height="32" width="112" negated="false">
              <position x="40" y="128"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>FILE_NAME</expression>
            </inVariable>
            <inVariable localId="10" executionOrderId="0" height="24" width="112" negated="false">
              <position x="504" y="152"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>'",'</expression>
            </inVariable>
            <inVariable localId="11" executionOrderId="0" height="32" width="112" negated="false">
              <position x="40" y="176"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>ROW</expression>
            </inVariable>
            <inVariable localId="12" executionOrderId="0" height="24" width="112" negated="false">
              <position x="504" y="208"/>
              <connectionPointOut>
                <relPosition x="112" y="8"/>
              </connectionPointOut>
              <expression>','</expression>
            </inVariable>
            <inVariable localId="13" executionOrderId="0" height="32" width="112" negated="false">
              <position x="40" y="224"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>COLUMN</expression>
            </inVariable>
            <inVariable localId="51" executionOrderId="0" height="24" width="112" negated="false">
              <position x="504" y="256"/>
              <connectionPointOut>
                <relPosition x="112" y="8"/>
              </connectionPointOut>
              <expression>',"'</expression>
            </inVariable>
            <inVariable localId="52" executionOrderId="0" height="32" width="112" negated="false">
              <position x="336" y="272"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>CONTENT</expression>
            </inVariable>
            <inVariable localId="14" executionOrderId="0" height="24" width="112" negated="false">
              <position x="504" y="304"/>
              <connectionPointOut>
                <relPosition x="112" y="16"/>
              </connectionPointOut>
              <expression>'")'</expression>
            </inVariable>
            <comment localId="28" height="48" width="520">
              <position x="48" y="400"/>
              <content>
                <xhtml:p><![CDATA[Execute python code on change or globally when CSV is updated]]></xhtml:p>
              </content>
            </comment>
            <comment localId="29" height="40" width="232">
              <position x="64" y="32"/>
              <content>
                <xhtml:p><![CDATA[Generate python code line]]></xhtml:p>
              </content>
            </comment>
            <connector name="Code" localId="30" height="24" width="128">
              <position x="856" y="112"/>
              <connectionPointIn>
                <relPosition x="0" y="8"/>
                <connection refLocalId="7" formalParameter="OUT">
                  <position x="856" y="120"/>
                  <position x="752" y="120"/>
                </connection>
              </connectionPointIn>
            </connector>
            <block localId="31" typeName="INT_TO_STRING" executionOrderId="0" height="48" width="120">
              <position x="200" y="160"/>
              <inputVariables>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="11">
                      <position x="200" y="192"/>
                      <position x="152" y="192"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="120" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="2" typeName="INT_TO_STRING" executionOrderId="0" height="48" width="120">
              <position x="200" y="208"/>
              <inputVariables>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="13">
                      <position x="200" y="240"/>
                      <position x="152" y="240"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="120" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="40" width="104" height="80" typeName="python_eval" instanceName="py_eval0" executionOrderId="0">
              <position x="552" y="480"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="46" formalParameter="Q">
                      <position x="552" y="512"/>
                      <position x="360" y="512"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="CODE">
                  <connectionPointIn>
                    <relPosition x="0" y="64"/>
                    <connection refLocalId="41">
                      <position x="552" y="544"/>
                      <position x="520" y="544"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ACK">
                  <connectionPointOut>
                    <relPosition x="104" y="32"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="RESULT">
                  <connectionPointOut>
                    <relPosition x="104" y="64"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <continuation name="Code" localId="41" height="24" width="128">
              <position x="392" y="528"/>
              <connectionPointOut>
                <relPosition x="128" y="16"/>
              </connectionPointOut>
            </continuation>
            <inVariable localId="42" height="24" width="64" executionOrderId="0" negated="false">
              <position x="208" y="496"/>
              <connectionPointOut>
                <relPosition x="64" y="16"/>
              </connectionPointOut>
              <expression>SAVE</expression>
            </inVariable>
            <outVariable localId="43" height="32" width="40" executionOrderId="0" negated="false">
              <position x="1232" y="504"/>
              <connectionPointIn>
                <relPosition x="0" y="16"/>
                <connection refLocalId="38" formalParameter="Q1">
                  <position x="1232" y="520"/>
                  <position x="1168" y="520"/>
                </connection>
              </connectionPointIn>
              <expression>ACK</expression>
            </outVariable>
            <outVariable localId="44" height="24" width="64" executionOrderId="0" negated="false">
              <position x="688" y="584"/>
              <connectionPointIn>
                <relPosition x="0" y="8"/>
                <connection refLocalId="40" formalParameter="RESULT">
                  <position x="688" y="592"/>
                  <position x="672" y="592"/>
                  <position x="672" y="544"/>
                  <position x="656" y="544"/>
                </connection>
              </connectionPointIn>
              <expression>RESULT</expression>
            </outVariable>
            <block localId="46" typeName="R_TRIG" instanceName="R_TRIG1" executionOrderId="0" height="48" width="64">
              <position x="296" y="480"/>
              <inputVariables>
                <variable formalParameter="CLK">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="42">
                      <position x="296" y="512"/>
                      <position x="272" y="512"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="Q">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="33" typeName="LEFT" executionOrderId="0" height="64" width="56">
              <position x="736" y="512"/>
              <inputVariables>
                <variable formalParameter="IN">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="40" formalParameter="RESULT">
                      <position x="736" y="544"/>
                      <position x="656" y="544"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="L">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="35">
                      <position x="736" y="568"/>
                      <position x="724" y="568"/>
                      <position x="724" y="560"/>
                      <position x="712" y="560"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="56" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="34" typeName="NE" executionOrderId="0" height="64" width="64">
              <position x="880" y="512"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="33" formalParameter="OUT">
                      <position x="880" y="544"/>
                      <position x="792" y="544"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="36">
                      <position x="880" y="568"/>
                      <position x="848" y="568"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="35" executionOrderId="0" height="24" width="24" negated="false">
              <position x="688" y="552"/>
              <connectionPointOut>
                <relPosition x="24" y="8"/>
              </connectionPointOut>
              <expression>1</expression>
            </inVariable>
            <inVariable localId="36" executionOrderId="0" height="24" width="40" negated="false">
              <position x="808" y="560"/>
              <connectionPointOut>
                <relPosition x="40" y="8"/>
              </connectionPointOut>
              <expression>'#'</expression>
            </inVariable>
            <block localId="37" typeName="R_TRIG" instanceName="R_TRIG2" executionOrderId="0" height="48" width="64">
              <position x="880" y="456"/>
              <inputVariables>
                <variable formalParameter="CLK">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="40" formalParameter="ACK">
                      <position x="880" y="488"/>
                      <position x="688" y="488"/>
                      <position x="688" y="512"/>
                      <position x="656" y="512"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="Q">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="38" typeName="SR" instanceName="SR0" executionOrderId="0" height="64" width="48">
              <position x="1120" y="488"/>
              <inputVariables>
                <variable formalParameter="S1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="39" formalParameter="OUT">
                      <position x="1120" y="520"/>
                      <position x="1056" y="520"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="R" edge="rising">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="46" formalParameter="Q">
                      <position x="1120" y="544"/>
                      <position x="1088" y="544"/>
                      <position x="1088" y="616"/>
                      <position x="376" y="616"/>
                      <position x="376" y="512"/>
                      <position x="360" y="512"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="Q1">
                  <connectionPointOut>
                    <relPosition x="48" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="39" typeName="AND" executionOrderId="0" height="64" width="64">
              <position x="992" y="488"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="37" formalParameter="Q">
                      <position x="992" y="520"/>
                      <position x="976" y="520"/>
                      <position x="976" y="488"/>
                      <position x="944" y="488"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="56"/>
                    <connection refLocalId="34" formalParameter="OUT">
                      <position x="992" y="544"/>
                      <position x="944" y="544"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="64" y="32"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="53" typeName="csv_refresh" instanceName="csv_refresh0" executionOrderId="0" width="104" height="48">
              <position x="1232" y="440"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="32"/>
                    <connection refLocalId="38" formalParameter="Q1">
                      <position x="1232" y="472"/>
                      <position x="1206" y="472"/>
                      <position x="1206" y="520"/>
                      <position x="1168" y="520"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables/>
            </block>
          </FBD>
        </body>
      </pou>
      <pou name="python_eval" pouType="functionBlock">
        <interface>
          <inputVars>
            <variable name="TRIG">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="CODE">
              <type>
                <string/>
              </type>
            </variable>
          </inputVars>
          <outputVars>
            <variable name="ACK">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="RESULT">
              <type>
                <string/>
              </type>
            </variable>
          </outputVars>
          <localVars>
            <variable name="STATE">
              <type>
                <DWORD/>
              </type>
            </variable>
            <variable name="BUFFER">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="PREBUFFER">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="TRIGM1">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="TRIGGED">
              <type>
                <BOOL/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <ST>
            <xhtml:p><![CDATA[{extern void __PythonEvalFB(int, PYTHON_EVAL*);__PythonEvalFB(0, data__);}]]></xhtml:p>
          </ST>
        </body>
      </pou>
      <pou name="python_poll" pouType="functionBlock">
        <interface>
          <inputVars>
            <variable name="TRIG">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="CODE">
              <type>
                <string/>
              </type>
            </variable>
          </inputVars>
          <outputVars>
            <variable name="ACK">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="RESULT">
              <type>
                <string/>
              </type>
            </variable>
          </outputVars>
          <localVars>
            <variable name="STATE">
              <type>
                <DWORD/>
              </type>
            </variable>
            <variable name="BUFFER">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="PREBUFFER">
              <type>
                <string/>
              </type>
            </variable>
            <variable name="TRIGM1">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="TRIGGED">
              <type>
                <BOOL/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <ST>
            <xhtml:p><![CDATA[{extern void __PythonEvalFB(int, PYTHON_EVAL*);__PythonEvalFB(1,(PYTHON_EVAL*)(void*)data__);}]]></xhtml:p>
          </ST>
        </body>
      </pou>
      <pou name="python_gear" pouType="functionBlock">
        <interface>
          <inputVars>
            <variable name="N">
              <type>
                <UINT/>
              </type>
            </variable>
            <variable name="TRIG">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="CODE">
              <type>
                <string/>
              </type>
            </variable>
          </inputVars>
          <outputVars>
            <variable name="ACK">
              <type>
                <BOOL/>
              </type>
            </variable>
            <variable name="RESULT">
              <type>
                <string/>
              </type>
            </variable>
          </outputVars>
          <localVars>
            <variable name="py_eval">
              <type>
                <derived name="python_eval"/>
              </type>
            </variable>
            <variable name="COUNTER">
              <type>
                <UINT/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <block localId="1" width="125" height="110" typeName="python_eval" instanceName="py_eval">
              <position x="525" y="580"/>
              <inputVariables>
                <variable formalParameter="TRIG">
                  <connectionPointIn>
                    <relPosition x="0" y="40"/>
                    <connection refLocalId="7" formalParameter="OUT">
                      <position x="525" y="620"/>
                      <position x="495" y="620"/>
                      <position x="495" y="575"/>
                      <position x="465" y="575"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="CODE">
                  <connectionPointIn>
                    <relPosition x="0" y="85"/>
                    <connection refLocalId="4">
                      <position x="525" y="665"/>
                      <position x="370" y="665"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="ACK">
                  <connectionPointOut>
                    <relPosition x="125" y="40"/>
                  </connectionPointOut>
                </variable>
                <variable formalParameter="RESULT">
                  <connectionPointOut>
                    <relPosition x="125" y="85"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="2" height="35" width="25">
              <position x="435" y="270"/>
              <connectionPointOut>
                <relPosition x="25" y="15"/>
              </connectionPointOut>
              <expression>N</expression>
            </inVariable>
            <inVariable localId="3" height="35" width="55">
              <position x="275" y="585"/>
              <connectionPointOut>
                <relPosition x="55" y="15"/>
              </connectionPointOut>
              <expression>TRIG</expression>
            </inVariable>
            <inVariable localId="4" height="35" width="55">
              <position x="315" y="650"/>
              <connectionPointOut>
                <relPosition x="55" y="15"/>
              </connectionPointOut>
              <expression>CODE</expression>
            </inVariable>
            <outVariable localId="5" height="35" width="45">
              <position x="740" y="605"/>
              <connectionPointIn>
                <relPosition x="0" y="15"/>
                <connection refLocalId="1" formalParameter="ACK">
                  <position x="740" y="620"/>
                  <position x="650" y="620"/>
                </connection>
              </connectionPointIn>
              <expression>ACK</expression>
            </outVariable>
            <outVariable localId="6" height="35" width="75">
              <position x="740" y="650"/>
              <connectionPointIn>
                <relPosition x="0" y="15"/>
                <connection refLocalId="1" formalParameter="RESULT">
                  <position x="740" y="665"/>
                  <position x="650" y="665"/>
                </connection>
              </connectionPointIn>
              <expression>RESULT</expression>
            </outVariable>
            <block localId="7" width="80" height="65" typeName="AND">
              <position x="385" y="545"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="13" formalParameter="OUT">
                      <position x="385" y="575"/>
                      <position x="335" y="575"/>
                      <position x="335" y="455"/>
                      <position x="625" y="455"/>
                      <position x="625" y="285"/>
                      <position x="615" y="285"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="55"/>
                    <connection refLocalId="3">
                      <position x="385" y="600"/>
                      <position x="330" y="600"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="80" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="9" height="35" width="85">
              <position x="240" y="330"/>
              <connectionPointOut>
                <relPosition x="85" y="15"/>
              </connectionPointOut>
              <expression>COUNTER</expression>
            </inVariable>
            <block localId="10" width="80" height="65" typeName="ADD">
              <position x="380" y="330"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="9">
                      <position x="380" y="360"/>
                      <position x="352" y="360"/>
                      <position x="352" y="345"/>
                      <position x="325" y="345"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="55"/>
                    <connection refLocalId="11">
                      <position x="380" y="385"/>
                      <position x="325" y="385"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="80" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="11" height="35" width="85" executionOrderId="0" negated="false">
              <position x="240" y="370"/>
              <connectionPointOut>
                <relPosition x="85" y="17"/>
              </connectionPointOut>
              <expression>1</expression>
            </inVariable>
            <block localId="13" width="80" height="65" typeName="EQ">
              <position x="535" y="255"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="2">
                      <position x="535" y="285"/>
                      <position x="460" y="285"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="55"/>
                    <connection refLocalId="10" formalParameter="OUT">
                      <position x="535" y="310"/>
                      <position x="497" y="310"/>
                      <position x="497" y="360"/>
                      <position x="460" y="360"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="80" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <block localId="15" width="80" height="135" typeName="SEL">
              <position x="785" y="245"/>
              <inputVariables>
                <variable formalParameter="G">
                  <connectionPointIn>
                    <relPosition x="0" y="40"/>
                    <connection refLocalId="13" formalParameter="OUT">
                      <position x="785" y="285"/>
                      <position x="615" y="285"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN0">
                  <connectionPointIn>
                    <relPosition x="0" y="75"/>
                    <connection refLocalId="10" formalParameter="OUT">
                      <position x="785" y="320"/>
                      <position x="650" y="320"/>
                      <position x="650" y="360"/>
                      <position x="460" y="360"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="115"/>
                    <connection refLocalId="16">
                      <position x="785" y="360"/>
                      <position x="760" y="360"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="80" y="40"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="16" height="35" width="85" executionOrderId="0" negated="false">
              <position x="675" y="345"/>
              <connectionPointOut>
                <relPosition x="85" y="17"/>
              </connectionPointOut>
              <expression>0</expression>
            </inVariable>
            <outVariable localId="17" height="35" width="85">
              <position x="905" y="270"/>
              <connectionPointIn>
                <relPosition x="0" y="15"/>
                <connection refLocalId="15" formalParameter="OUT">
                  <position x="905" y="285"/>
                  <position x="865" y="285"/>
                </connection>
              </connectionPointIn>
              <expression>COUNTER</expression>
            </outVariable>
          </FBD>
        </body>
      </pou>
    </pous>
  </types>
  <instances>
    <configurations>
      <configuration name="configuration0">
        <globalVars>
          <variable name="pyext_csv_update">
            <type>
              <INT/>
            </type>
            <initialValue>
              <simpleValue value="0"/>
            </initialValue>
          </variable>
        </globalVars>
      </configuration>
    </configurations>
  </instances>
</project>