exemples/python/py_ext_0@py_ext/pyfile.xml
changeset 3351 88dbdebd10fc
parent 2699 467ff0e58327
child 3814 ab0afe798428
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/python/py_ext_0@py_ext/pyfile.xml	Mon Sep 13 22:23:14 2021 +0200
@@ -0,0 +1,42 @@
+<?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, SomeChange"/>
+    <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
+
+def SomeChange(*args):
+    print "count",OnChange.SomeVarName.count
+    print "first",OnChange.SomeVarName.first
+    print "last",OnChange.SomeVarName.last
+
+
+]]></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>