tests/python/py_ext_0@py_ext/pyfile.xml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Tue, 20 Oct 2020 00:23:52 +0200
changeset 2692 d4bede6cd3f1
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.
1436
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     1
<?xml version='1.0' encoding='utf-8'?>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     2
<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     3
  <variables>
2680
6bfed6757495 tests/python : add some STRING PLC Python globals with OnChange.
Edouard Tisserant
parents: 1452
diff changeset
     4
    <variable name="SomeVarName" type="DINT" onchange="MyFunc"/>
2692
d4bede6cd3f1 PY_EXT: OnChange is now a coma separated list of callables. Updated tests/python accordingly.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 2680
diff changeset
     5
    <variable name="Grumpf" type="STRING" initial="'mhoo'" onchange="MyFunc, MyOtherFunc"/>
1436
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     6
  </variables>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     7
  <globals>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     8
    <xhtml:p><![CDATA[
1452
7a2b344de8cf Fixed build of tests/python.
Edouard Tisserant
parents: 1436
diff changeset
     9
print "All python PLC globals variables :", PLCGlobalsDesc
7a2b344de8cf Fixed build of tests/python.
Edouard Tisserant
parents: 1436
diff changeset
    10
print "Current extention name :", __ext_name__
2680
6bfed6757495 tests/python : add some STRING PLC Python globals with OnChange.
Edouard Tisserant
parents: 1452
diff changeset
    11
6bfed6757495 tests/python : add some STRING PLC Python globals with OnChange.
Edouard Tisserant
parents: 1452
diff changeset
    12
def MyFunc(*args):
6bfed6757495 tests/python : add some STRING PLC Python globals with OnChange.
Edouard Tisserant
parents: 1452
diff changeset
    13
    print args
6bfed6757495 tests/python : add some STRING PLC Python globals with OnChange.
Edouard Tisserant
parents: 1452
diff changeset
    14
2692
d4bede6cd3f1 PY_EXT: OnChange is now a coma separated list of callables. Updated tests/python accordingly.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 2680
diff changeset
    15
def MyOtherFunc(*args):
d4bede6cd3f1 PY_EXT: OnChange is now a coma separated list of callables. Updated tests/python accordingly.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 2680
diff changeset
    16
    print "other", args
d4bede6cd3f1 PY_EXT: OnChange is now a coma separated list of callables. Updated tests/python accordingly.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 2680
diff changeset
    17
d4bede6cd3f1 PY_EXT: OnChange is now a coma separated list of callables. Updated tests/python accordingly.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 2680
diff changeset
    18
1436
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    19
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    20
  </globals>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    21
  <init>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    22
    <xhtml:p><![CDATA[
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    23
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    24
  </init>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    25
  <cleanup>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    26
    <xhtml:p><![CDATA[
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    27
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    28
  </cleanup>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    29
  <start>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    30
    <xhtml:p><![CDATA[
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    31
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    32
  </start>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    33
  <stop>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    34
    <xhtml:p><![CDATA[
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    35
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    36
  </stop>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    37
</PyFile>