--- a/svghmi/widget_jump.ysl2 Fri Sep 02 10:46:05 2022 +0200
+++ b/svghmi/widget_jump.ysl2 Fri Sep 02 12:02:43 2022 +0200
@@ -13,7 +13,7 @@
- Absolute: force page jump to be not relative even if first path is of type HMI_NODE
- - name=value: Notify jump by setting variable with path having same name assigned
+ - name=value: Notify PLC about jump by setting variable with path having same name assigned "active"+"inactive" labeled elements can be provided and reflect current
@@ -35,6 +35,10 @@
HMI:Jump:AbsolutePage:Absolute@/PUMP9
HMI:Jump:AbsolutePage:Absolute:notify=1@notify=/PUMP9
+ HMI:Jump:AbsolutePage:notify=1@notify=.did_jump shortdesc > Jump to given page
@@ -63,6 +67,7 @@
(that.is_relative && that.indexes.length > 0) ?
that.indexes[0] + that.offset : undefined;
fading_page_switch(name, index);
@@ -106,6 +111,16 @@
+ foreach "arg[position()>1 and contains(@value,'=')]"{ + const "name","substring-before(@value,'=')"; + const "value","substring-after(@value,'=')"; + const "index" foreach "$paths" if "@assign = $name" value "position()-1"; + | this.apply_hmi_value(«$index», «$value»); --- a/tests/projects/svghmi/svghmi_0@svghmi/svghmi.svg Fri Sep 02 10:46:05 2022 +0200
+++ b/tests/projects/svghmi/svghmi_0@svghmi/svghmi.svg Fri Sep 02 12:02:43 2022 +0200
@@ -133,12 +133,12 @@
inkscape:document-units="px"
- inkscape:current-layer="g1450-4-9"
+ inkscape:current-layer="hmi0" - inkscape:zoom="1.1339844"
- inkscape:cx="1880.7924"
- inkscape:cy="528.36862"
+ inkscape:zoom="0.40092403" + inkscape:cx="323.58553" + inkscape:cy="-56.756946" inkscape:window-width="1600"
inkscape:window-height="836"
@@ -3257,14 +3257,14 @@
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.28600003;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:#ff6600;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
- style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#434343;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#434343;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - style="text-align:center;text-anchor:middle;fill:#434343;fill-opacity:1;stroke-width:0.99999994px;"
+ style="text-align:center;text-anchor:middle;fill:#434343;fill-opacity:1;stroke-width:0.99999994px" id="tspan1460-3-5">Disabled</tspan></text>
@@ -3366,14 +3366,14 @@
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.28600003;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:#ff6600;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
- style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#434343;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#434343;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="text1454-0-7-2"><tspan
- style="text-align:center;text-anchor:middle;fill:#434343;fill-opacity:1;stroke-width:0.99999994px;"
+ style="text-align:center;text-anchor:middle;fill:#434343;fill-opacity:1;stroke-width:0.99999994px" id="tspan1460-3-5-9">Disabled</tspan></text>
@@ -3465,14 +3465,14 @@
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.28600003;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:#ff6600;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
- style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#434343;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#434343;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="text1454-0-7-8"><tspan
- style="text-align:center;text-anchor:middle;fill:#434343;fill-opacity:1;stroke-width:0.99999994px;"
+ style="text-align:center;text-anchor:middle;fill:#434343;fill-opacity:1;stroke-width:0.99999994px" id="tspan1460-3-5-7">Disabled</tspan></text>
@@ -3564,14 +3564,14 @@
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.28600003;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:#ff6600;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
- style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#434343;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#434343;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="text1454-0-7-3"><tspan
- style="text-align:center;text-anchor:middle;fill:#434343;fill-opacity:1;stroke-width:0.99999994px;"
+ style="text-align:center;text-anchor:middle;fill:#434343;fill-opacity:1;stroke-width:0.99999994px" id="tspan1460-3-5-6">Disabled</tspan></text>
@@ -8526,4 +8526,35 @@
style="text-align:center;text-anchor:middle;fill:#ff6600;stroke-width:0.99999994px">up</tspan></text>
+ transform="translate(-940,-418)" + inkscape:label="HMI:Jump:Home:notify=42:plop="WTF"@notify=/SELECTION@plop=/PUMP0/STRIN" + inkscape:label="button" + sodipodi:nodetypes="cssssccc" + inkscape:connector-curvature="0" + d="m 1217.4113,1410.4016 -22,24.5657 c -10.7925,12.0511 6.1317,35.5791 -13.5791,35.5791 h -174.2877 c -19.71078,0 -2.7866,-23.528 -13.57905,-35.5791 l -22,-24.5657 127.74845,-48.4334 z" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:#ff6600;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" /> + inkscape:label="home_jmp" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#ff6600;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="text-align:center;text-anchor:middle;fill:#ff6600;stroke-width:0.99999994px" + sodipodi:role="line">Home</tspan></text>