tests/python/py_ext_0@py_ext/pyfile.xml
branchsvghmi
changeset 3089 10b2e620b57f
parent 3063 466c3df67835
equal deleted inserted replaced
3088:56453485c6ad 3089:10b2e620b57f
     1 <?xml version='1.0' encoding='utf-8'?>
     1 <?xml version='1.0' encoding='utf-8'?>
     2 <PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     2 <PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     3   <variables>
     3   <variables>
     4     <variable name="SomeVarName" type="DINT" onchange="MyFunc"/>
     4     <variable name="SomeVarName" type="DINT" onchange="MyFunc, SomeChange"/>
     5     <variable name="Grumpf" type="STRING" initial="'mhoo'" onchange="MyFunc, MyOtherFunc"/>
     5     <variable name="Grumpf" type="STRING" initial="'mhoo'" onchange="MyFunc, MyOtherFunc"/>
     6   </variables>
     6   </variables>
     7   <globals>
     7   <globals>
     8     <xhtml:p><![CDATA[
     8     <xhtml:p><![CDATA[
     9 print "All python PLC globals variables :", PLCGlobalsDesc
     9 print "All python PLC globals variables :", PLCGlobalsDesc
    12 def MyFunc(*args):
    12 def MyFunc(*args):
    13     print args
    13     print args
    14 
    14 
    15 def MyOtherFunc(*args):
    15 def MyOtherFunc(*args):
    16     print "other", args
    16     print "other", args
       
    17 
       
    18 def SomeChange(*args):
       
    19     print "count",OnChange.SomeVarName.count
       
    20     print "first",OnChange.SomeVarName.first
       
    21     print "last",OnChange.SomeVarName.last
    17 
    22 
    18 
    23 
    19 ]]></xhtml:p>
    24 ]]></xhtml:p>
    20   </globals>
    25   </globals>
    21   <init>
    26   <init>