tests/python/py_ext_0@py_ext/pyfile.xml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Tue, 20 Oct 2020 00:23:52 +0200
branchsvghmi
changeset 3063 466c3df67835
parent 2680 6bfed6757495
child 2699 467ff0e58327
permissions -rw-r--r--
PY_EXT: OnChange is now a coma separated list of callables. Updated tests/python accordingly.
<?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, MyOtherFunc"/>
  </variables>
  <globals>
    <xhtml:p><![CDATA[
print "All python PLC globals variables :", PLCGlobalsDesc
print "Current extention name :", __ext_name__

def MyFunc(*args):
    print args

def MyOtherFunc(*args):
    print "other", 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>