tests/svghmi_v2/py_ext_0@py_ext/pyfile.xml
author Edouard Tisserant
Mon, 08 Nov 2021 14:06:29 +0100
changeset 3385 18621ce81f5f
parent 3016 085a678715d0
permissions -rw-r--r--
SVGHMI: Changes /CURRENT_PAGE_* behaviour to prevent problem whith multiclient : all clients were switching page when one was jumping.
- now PLC have to prefix page name with "!" to order page switch.
- HMI do not prefix with "!" when jumping, this avoiding looping incidently
- In case of multiple client:
CURRENT_PAGE reflects current page of last client hwo did jump
Setting CURRENT_PAGE with "!" affects all clients simultaneously
3016
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
     1
<?xml version='1.0' encoding='utf-8'?>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
     2
<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
     3
  <variables>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
     4
    <variable name="SomePLCglobal" type="HMI_STRING" initial="'blaf'" onchange="MyOnChangeFunc"/>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
     5
  </variables>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
     6
  <globals>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
     7
    <xhtml:p><![CDATA[
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
     8
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
     9
def MyOnChangeFunc(changed_var_name):
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    10
    print changed_var_name + ": " + getattr(PLCGlobals, changed_var_name)
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    11
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    12
]]></xhtml:p>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    13
  </globals>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    14
  <init>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    15
    <xhtml:p><![CDATA[
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    16
]]></xhtml:p>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    17
  </init>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    18
  <cleanup>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    19
    <xhtml:p><![CDATA[
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    20
]]></xhtml:p>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    21
  </cleanup>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    22
  <start>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    23
    <xhtml:p><![CDATA[
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    24
]]></xhtml:p>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    25
  </start>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    26
  <stop>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    27
    <xhtml:p><![CDATA[
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    28
]]></xhtml:p>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    29
  </stop>
085a678715d0 Beremiz test project with newly created widgets.
usveticic
parents:
diff changeset
    30
</PyFile>