tests/python/py_ext_0@py_ext/pyfile.xml
author Edouard Tisserant
Thu, 10 Sep 2020 16:08:26 +0200
changeset 2689 7f67a7f6bfcc
parent 2680 6bfed6757495
child 2692 d4bede6cd3f1
permissions -rw-r--r--
Runtime/PLCObject : move call to PreStartPLC right after call to the "start" method of all python extensions, and then just before the start of the python loop executing python_* blocks.
<?xml version='1.0' encoding='utf-8'?>
<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <variables>
    <variable name="SomeVarName" type="DINT" onchange="MyFunc"/>
    <variable name="Grumpf" type="STRING" initial="'mhoo'" onchange="MyFunc"/>
  </variables>
  <globals>
    <xhtml:p><![CDATA[
print "All python PLC globals variables :", PLCGlobalsDesc
print "Current extention name :", __ext_name__

def MyFunc(*args):
    print args

]]></xhtml:p>
  </globals>
  <init>
    <xhtml:p><![CDATA[
]]></xhtml:p>
  </init>
  <cleanup>
    <xhtml:p><![CDATA[
]]></xhtml:p>
  </cleanup>
  <start>
    <xhtml:p><![CDATA[
]]></xhtml:p>
  </start>
  <stop>
    <xhtml:p><![CDATA[
]]></xhtml:p>
  </stop>
</PyFile>