tests/python/py_ext_0@py_ext/pyfile.xml
changeset 2680 6bfed6757495
parent 1452 7a2b344de8cf
child 2692 d4bede6cd3f1
--- a/tests/python/py_ext_0@py_ext/pyfile.xml	Wed Jun 17 14:30:55 2020 +0200
+++ b/tests/python/py_ext_0@py_ext/pyfile.xml	Wed Jun 17 14:32:55 2020 +0200
@@ -1,13 +1,17 @@
 <?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"/>
-    <variable name="Grumpf" type="STRING"/>
+    <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>