tests/svghmi/py_ext_0@py_ext/pyfile.xml
author Edouard Tisserant
Thu, 18 Jun 2020 14:15:43 +0200
branchsvghmi
changeset 2983 43198edb6ac0
child 2994 b6a9ef7f7e43
permissions -rw-r--r--
SVGHMI: Add use of Python PLC Globals it test
2983
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
     1
<?xml version='1.0' encoding='utf-8'?>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
     2
<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
     3
  <variables>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
     4
    <variable name="SomePLCglobal" type="HMI_STRING" onchange="MyOnChangeFunc"/>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
     5
  </variables>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
     6
  <globals>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
     7
    <xhtml:p><![CDATA[
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
     8
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
     9
def MyOnChangeFunc(changed_var_name):
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    10
    print changed_var_name + ": " + getattr(PLCGlobals, changed_var_name)
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    11
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    12
]]></xhtml:p>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    13
  </globals>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    14
  <init>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    15
    <xhtml:p><![CDATA[
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    16
]]></xhtml:p>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    17
  </init>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    18
  <cleanup>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    19
    <xhtml:p><![CDATA[
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    20
]]></xhtml:p>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    21
  </cleanup>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    22
  <start>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    23
    <xhtml:p><![CDATA[
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    24
]]></xhtml:p>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    25
  </start>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    26
  <stop>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    27
    <xhtml:p><![CDATA[
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    28
]]></xhtml:p>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    29
  </stop>
43198edb6ac0 SVGHMI: Add use of Python PLC Globals it test
Edouard Tisserant
parents:
diff changeset
    30
</PyFile>