From 911e613623eef385b6b5260c69311cc01c484d83 Mon Sep 17 00:00:00 2001 From: "b.makharadze" <81828475+bmidf@users.noreply.github.com> Date: Thu, 5 Jun 2025 16:01:21 +0400 Subject: [PATCH] Updates to PullChords in parent project --- .../Equipment-Views/PullChord/view.json | 235 +++++------------- .../Equipment-Views/PullChord_End/view.json | 162 ++++-------- .../Equipment-Views/PullChord_Line/view.json | 209 ++++------------ .../PullChord_Line_Vertical/view.json | 158 ++++-------- image_server_simulation/VFD.svg | 50 ++++ tags/Station_udt.json | 12 + 6 files changed, 261 insertions(+), 565 deletions(-) create mode 100644 image_server_simulation/VFD.svg diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json index 744dd05..d461dfc 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord/view.json @@ -1,16 +1,12 @@ { "custom": { - "alarm_message": null, - "covert_mode": true, "disconnected": false, - "display_icon": true, - "error": false, - "isMatch": 0, "plc": "value", "priority": 0, "priority_string": "No active alarms", - "searchId": "value", - "state": 5 + "searchId": "PLC01", + "state": 0, + "state_string": "Normal" }, "params": { "forceFaultStatus": null, @@ -29,24 +25,6 @@ ] }, "propConfig": { - "custom.alarm_message": { - "persistent": true - }, - "custom.covert_mode": { - "binding": { - "config": { - "path": "this.custom.state" - }, - "transforms": [ - { - "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, "custom.disconnected": { "binding": { "config": { @@ -68,39 +46,6 @@ }, "persistent": true }, - "custom.display_icon": { - "binding": { - "config": { - "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.error": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.isMatch": { - "binding": { - "config": { - "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" - }, - "type": "expr" - }, - "persistent": true - }, "custom.plc": { "binding": { "config": { @@ -128,18 +73,6 @@ "mappings": [ { "input": 1, - "output": 4 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 3, - "output": 2 - }, - { - "input": 4, "output": 1 } ], @@ -154,9 +87,27 @@ "custom.priority_string": { "binding": { "config": { - "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + "path": "view.custom.state" }, - "type": "expr" + "transforms": [ + { + "fallback": "Unknown", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "High" + }, + { + "input": 0, + "output": "No active alarms" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" }, "persistent": true }, @@ -186,28 +137,16 @@ "type": "expression" }, { - "fallback": null, + "fallback": 0, "inputType": "scalar", "mappings": [ { - "input": 4, + "input": true, "output": 1 }, { - "input": 3, - "output": 2 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 1, - "output": 4 - }, - { - "input": 0, - "output": 5 + "input": false, + "output": 0 } ], "outputType": "scalar", @@ -218,6 +157,15 @@ }, "persistent": true }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, "params.forceFaultStatus": { "paramDirection": "input", "persistent": true @@ -253,15 +201,27 @@ "props.elements[0].fill.paint": { "binding": { "config": { - "expression": "\u0027#AAAAAA\u0027" + "path": "view.custom.state" }, "transforms": [ { - "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", - "type": "expression" + "fallback": "#AC0000", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "#AAAAAA" + }, + { + "input": 1, + "output": "#AAAAAA" + } + ], + "outputType": "color", + "type": "map" } ], - "type": "expr" + "type": "property" } }, "props.elements[1].fill.paint": { @@ -271,7 +231,7 @@ }, "transforms": [ { - "expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n{session.custom.colours.state5}\r\n)", + "expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n{session.custom.colours.state1}\r\n)", "type": "expression" } ], @@ -281,11 +241,11 @@ "props.elements[2].visibility": { "binding": { "config": { - "path": "view.custom.error" + "path": "view.custom.state" }, "transforms": [ { - "expression": "if(!{value} \u0026\u0026 {view.custom.display_icon}, \u0027visible\u0027, \u0027hidden\u0027)", + "expression": "if(\r\n !{value} \u0026\u0026 \r\n {view.custom.state} \u003d 0 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)", "type": "expression" } ], @@ -295,78 +255,16 @@ "props.elements[3].visibility": { "binding": { "config": { - "path": "view.custom.error" + "path": "view.custom.state" }, "transforms": [ { - "expression": "if({value} \u0026\u0026 {view.custom.display_icon}, \u0027visible\u0027, \u0027hidden\u0027)", + "expression": "if(\r\n {value} \u0026\u0026 \r\n {view.custom.state} \u003e\u003d 1 \u0026\u0026 \r\n {parent.meta.visible}, \r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)", "type": "expression" } ], "type": "property" } - }, - "props.style.classes": { - "binding": { - "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" - }, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 101, - "output": "State-Styles/State101" - }, - { - "input": 102, - "output": "State-Styles/State102" - }, - { - "input": 103, - "output": "State-Styles/State103" - }, - { - "input": 104, - "output": "State-Styles/State104" - }, - { - "input": 105, - "output": "State-Styles/State105" - }, - { - "input": 106, - "output": "State-Styles/State106" - }, - { - "input": 201, - "output": "State-Styles/State201" - }, - { - "input": 202, - "output": "State-Styles/State202" - }, - { - "input": 203, - "output": "State-Styles/State203" - }, - { - "input": 204, - "output": "State-Styles/State204" - }, - { - "input": 205, - "output": "State-Styles/State205" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } } }, "props": { @@ -428,7 +326,6 @@ "type": "path" } ], - "style": {}, "viewBox": "-0.5 -0.5 27 42" }, "type": "ia.shapes.svg" @@ -476,7 +373,7 @@ }, "transforms": [ { - "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)", "type": "expression" } ], @@ -495,18 +392,6 @@ "mappings": [ { "input": 1, - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": 2, - "output": "Alarms-Styles/Low" - }, - { - "input": 3, - "output": "Alarms-Styles/Medium" - }, - { - "input": 4, "output": "Alarms-Styles/High" } ], @@ -524,7 +409,7 @@ }, "transforms": [ { - "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)", "type": "expression" } ], @@ -542,7 +427,7 @@ "meta.visible": { "binding": { "config": { - "path": "view.custom.display_icon" + "path": "session.custom.alarm_filter.show_safety" }, "type": "property" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json index 7db4f48..f32295b 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_End/view.json @@ -1,16 +1,12 @@ { "custom": { - "alarm_message": null, - "covert_mode": true, "disconnected": false, - "display_icon": true, - "error": false, - "isMatch": 0, "plc": "value", "priority": 0, - "priority_string": "No active alarms", - "searchId": "value", - "state": 5 + "priority_string": "Low", + "searchId": "PLC01", + "state": 0, + "state_string": "Normal" }, "params": { "forceFaultStatus": null, @@ -29,24 +25,6 @@ ] }, "propConfig": { - "custom.alarm_message": { - "persistent": true - }, - "custom.covert_mode": { - "binding": { - "config": { - "path": "this.custom.state" - }, - "transforms": [ - { - "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, "custom.disconnected": { "binding": { "config": { @@ -68,39 +46,6 @@ }, "persistent": true }, - "custom.display_icon": { - "binding": { - "config": { - "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.error": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.isMatch": { - "binding": { - "config": { - "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" - }, - "type": "expr" - }, - "persistent": true - }, "custom.plc": { "binding": { "config": { @@ -123,24 +68,12 @@ }, "transforms": [ { - "fallback": 0, + "fallback": 1, "inputType": "scalar", "mappings": [ { - "input": 1, - "output": 4 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 3, - "output": 2 - }, - { - "input": 4, - "output": 1 + "input": 0, + "output": 0 } ], "outputType": "scalar", @@ -154,7 +87,7 @@ "custom.priority_string": { "binding": { "config": { - "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n0, \"Low\",\r\n\"Unknown\")" }, "type": "expr" }, @@ -186,28 +119,16 @@ "type": "expression" }, { - "fallback": null, + "fallback": 0, "inputType": "scalar", "mappings": [ { - "input": 4, + "input": true, "output": 1 }, { - "input": 3, - "output": 2 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 1, - "output": 4 - }, - { - "input": 0, - "output": 5 + "input": false, + "output": 0 } ], "outputType": "scalar", @@ -218,6 +139,15 @@ }, "persistent": true }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, "params.forceFaultStatus": { "paramDirection": "input", "persistent": true @@ -248,10 +178,36 @@ "width": 1 }, "propConfig": { + "props.elements[0].fill.paint": { + "binding": { + "config": { + "path": "view.custom.state" + }, + "transforms": [ + { + "fallback": "#AC0000", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "#AAAAAA" + }, + { + "input": 1, + "output": "#B79D9D" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "property" + } + }, "props.style.classes": { "binding": { "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + "expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})" }, "transforms": [ { @@ -315,9 +271,7 @@ "elements": [ { "d": "M 0.01621377,0.01595147 H 25.93719 V 41.138171 H 0.01621377 Z", - "fill": { - "paint": "#D5D5D5" - }, + "fill": {}, "name": "path", "stroke": { "paint": "#000000", @@ -375,7 +329,7 @@ }, "transforms": [ { - "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)", "type": "expression" } ], @@ -394,18 +348,6 @@ "mappings": [ { "input": 1, - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": 2, - "output": "Alarms-Styles/Low" - }, - { - "input": 3, - "output": "Alarms-Styles/Medium" - }, - { - "input": 4, "output": "Alarms-Styles/High" } ], @@ -423,7 +365,7 @@ }, "transforms": [ { - "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)", "type": "expression" } ], @@ -441,7 +383,7 @@ "meta.visible": { "binding": { "config": { - "path": "view.custom.display_icon" + "path": "session.custom.alarm_filter.show_safety" }, "type": "property" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json index c624981..cbd9e2b 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line/view.json @@ -1,16 +1,13 @@ { "custom": { "alarm_message": null, - "covert_mode": true, "disconnected": false, - "display_icon": true, - "error": false, - "isMatch": 0, "plc": "value", "priority": 0, "priority_string": "No active alarms", "searchId": "PLC01", - "state": 5 + "state": 0, + "state_string": "Normal" }, "params": { "forceFaultStatus": null, @@ -29,24 +26,6 @@ ] }, "propConfig": { - "custom.alarm_message": { - "persistent": true - }, - "custom.covert_mode": { - "binding": { - "config": { - "path": "this.custom.state" - }, - "transforms": [ - { - "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, "custom.disconnected": { "binding": { "config": { @@ -68,39 +47,6 @@ }, "persistent": true }, - "custom.display_icon": { - "binding": { - "config": { - "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.error": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.isMatch": { - "binding": { - "config": { - "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" - }, - "type": "expr" - }, - "persistent": true - }, "custom.plc": { "binding": { "config": { @@ -123,24 +69,12 @@ }, "transforms": [ { - "fallback": 0, + "fallback": 1, "inputType": "scalar", "mappings": [ { - "input": 1, - "output": 4 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 3, - "output": 2 - }, - { - "input": 4, - "output": 1 + "input": 0, + "output": 0 } ], "outputType": "scalar", @@ -154,7 +88,7 @@ "custom.priority_string": { "binding": { "config": { - "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" + "expression": "case({view.custom.state},\r\n1, \"High\",\r\n0, \"No active alarms\",\r\n\"Unknown\")" }, "type": "expr" }, @@ -186,28 +120,16 @@ "type": "expression" }, { - "fallback": null, + "fallback": 0, "inputType": "scalar", "mappings": [ { - "input": 4, + "input": true, "output": 1 }, { - "input": 3, - "output": 2 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 1, - "output": 4 - }, - { - "input": 0, - "output": 5 + "input": false, + "output": 0 } ], "outputType": "scalar", @@ -218,6 +140,15 @@ }, "persistent": true }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, "params.forceFaultStatus": { "paramDirection": "input", "persistent": true @@ -251,11 +182,11 @@ "props.elements[0].visibility": { "binding": { "config": { - "path": "view.custom.error" + "path": "view.custom.state" }, "transforms": [ { - "expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)", + "expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)", "type": "expression" } ], @@ -265,11 +196,11 @@ "props.elements[1].visibility": { "binding": { "config": { - "path": "view.custom.error" + "path": "view.custom.state" }, "transforms": [ { - "expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)", + "expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)", "type": "expression" } ], @@ -283,72 +214,30 @@ }, "transforms": [ { - "expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n\u0027#000000\u0027\r\n)", - "type": "expression" + "fallback": "#800000", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "#FF0000" + }, + { + "input": 0, + "output": "#000000" + } + ], + "outputType": "color", + "type": "map" } ], "type": "property" } }, - "props.style.classes": { + "props.elements[2].visibility": { "binding": { "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + "expression": "if({parent.meta.visible}, \u0027visible\u0027, \u0027hidden\u0027)" }, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 101, - "output": "State-Styles/State101" - }, - { - "input": 102, - "output": "State-Styles/State102" - }, - { - "input": 103, - "output": "State-Styles/State103" - }, - { - "input": 104, - "output": "State-Styles/State104" - }, - { - "input": 105, - "output": "State-Styles/State105" - }, - { - "input": 106, - "output": "State-Styles/State106" - }, - { - "input": 201, - "output": "State-Styles/State201" - }, - { - "input": 202, - "output": "State-Styles/State202" - }, - { - "input": 203, - "output": "State-Styles/State203" - }, - { - "input": 204, - "output": "State-Styles/State204" - }, - { - "input": 205, - "output": "State-Styles/State205" - } - ], - "outputType": "style-list", - "type": "map" - } - ], "type": "expr" } } @@ -397,7 +286,6 @@ } ], "preserveAspectRatio": "none", - "style": {}, "viewBox": "-0.5 -0.5 102 12" }, "type": "ia.shapes.svg" @@ -445,7 +333,7 @@ }, "transforms": [ { - "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)", "type": "expression" } ], @@ -464,18 +352,6 @@ "mappings": [ { "input": 1, - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": 2, - "output": "Alarms-Styles/Low" - }, - { - "input": 3, - "output": "Alarms-Styles/Medium" - }, - { - "input": 4, "output": "Alarms-Styles/High" } ], @@ -493,7 +369,7 @@ }, "transforms": [ { - "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)", "type": "expression" } ], @@ -511,7 +387,7 @@ "meta.visible": { "binding": { "config": { - "path": "view.custom.display_icon" + "path": "session.custom.alarm_filter.show_safety" }, "type": "property" } @@ -546,6 +422,7 @@ "props": { "mode": "percent", "style": { + "borderStyle": "none", "cursor": "pointer", "overflow": "visible" } diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json index 1bb31fc..7b2d2cd 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/PullChord_Line_Vertical/view.json @@ -1,16 +1,12 @@ { "custom": { - "alarm_message": null, - "covert_mode": true, "disconnected": false, - "display_icon": true, - "error": false, - "isMatch": 0, "plc": "value", "priority": 0, - "priority_string": "No active alarms", - "searchId": "value", - "state": 5 + "priority_string": "Unknown", + "searchId": "PLC01", + "state": 0, + "state_string": "Normal" }, "params": { "forceFaultStatus": null, @@ -29,24 +25,6 @@ ] }, "propConfig": { - "custom.alarm_message": { - "persistent": true - }, - "custom.covert_mode": { - "binding": { - "config": { - "path": "this.custom.state" - }, - "transforms": [ - { - "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_safety},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_safety},\r\n\t\t4, {session.custom.alarm_filter.show_safety},\r\n\t\t5, {session.custom.alarm_filter.show_safety},\r\n\t\tFalse)", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, "custom.disconnected": { "binding": { "config": { @@ -68,39 +46,6 @@ }, "persistent": true }, - "custom.display_icon": { - "binding": { - "config": { - "expression": "{this.custom.covert_mode}||{this.custom.isMatch}\u003e0" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.error": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.isMatch": { - "binding": { - "config": { - "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" - }, - "type": "expr" - }, - "persistent": true - }, "custom.plc": { "binding": { "config": { @@ -123,24 +68,12 @@ }, "transforms": [ { - "fallback": 0, + "fallback": 1, "inputType": "scalar", "mappings": [ { - "input": 1, - "output": 4 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 3, - "output": 2 - }, - { - "input": 4, - "output": 1 + "input": 0, + "output": 0 } ], "outputType": "scalar", @@ -178,7 +111,7 @@ "0": "{view.params.tagProps[0]}", "fc": "{session.custom.fc}" }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Estopped" }, "transforms": [ { @@ -186,28 +119,16 @@ "type": "expression" }, { - "fallback": null, + "fallback": 0, "inputType": "scalar", "mappings": [ { - "input": 4, + "input": true, "output": 1 }, { - "input": 3, - "output": 2 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 1, - "output": 4 - }, - { - "input": 0, - "output": 5 + "input": false, + "output": 0 } ], "outputType": "scalar", @@ -218,6 +139,15 @@ }, "persistent": true }, + "custom.state_string": { + "binding": { + "config": { + "expression": "case({view.custom.state},\r\n1, \"Active\",\r\n0, \"Normal\",\r\n\"Unknown\")" + }, + "type": "expr" + }, + "persistent": true + }, "params.forceFaultStatus": { "paramDirection": "input", "persistent": true @@ -251,11 +181,11 @@ "props.elements[0].visibility": { "binding": { "config": { - "path": "view.custom.error" + "path": "view.custom.state" }, "transforms": [ { - "expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)", + "expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)", "type": "expression" } ], @@ -265,11 +195,11 @@ "props.elements[1].visibility": { "binding": { "config": { - "path": "view.custom.error" + "path": "view.custom.state" }, "transforms": [ { - "expression": "if({value}, \u0027visible\u0027,\u0027hidden\u0027)", + "expression": "if(\r\n ({value} \u003d 0 || {value} \u003d 1 || !{parent.meta.visible}),\r\n \u0027hidden\u0027,\r\n \u0027visible\u0027\r\n)", "type": "expression" } ], @@ -283,8 +213,20 @@ }, "transforms": [ { - "expression": "case({value},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state1},\r\n3,{session.custom.colours.state1},\r\n4,{session.custom.colours.state1},\r\n\u0027#000000\u0027\r\n)", - "type": "expression" + "fallback": "#800000", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "#FF0000" + }, + { + "input": 0, + "output": "#000000" + } + ], + "outputType": "color", + "type": "map" } ], "type": "property" @@ -293,7 +235,7 @@ "props.style.classes": { "binding": { "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" + "expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})" }, "transforms": [ { @@ -445,7 +387,7 @@ }, "transforms": [ { - "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", + "expression": "case({value},\r\n0,{session.custom.colours.state5},\r\n1,{session.custom.colours.state1},\r\n{session.custom.colours.fallback}\r\n)", "type": "expression" } ], @@ -464,18 +406,6 @@ "mappings": [ { "input": 1, - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": 2, - "output": "Alarms-Styles/Low" - }, - { - "input": 3, - "output": "Alarms-Styles/Medium" - }, - { - "input": 4, "output": "Alarms-Styles/High" } ], @@ -493,7 +423,7 @@ }, "transforms": [ { - "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", + "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#000000\u0027,\r\n\t\t\t\u0027#FFFFFF\u0027)\r\n\t)", "type": "expression" } ], @@ -503,7 +433,7 @@ "meta.tooltip.text": { "binding": { "config": { - "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown\")" + "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" }, "type": "expr" } @@ -511,7 +441,7 @@ "meta.visible": { "binding": { "config": { - "path": "view.custom.display_icon" + "path": "session.custom.alarm_filter.show_safety" }, "type": "property" } diff --git a/image_server_simulation/VFD.svg b/image_server_simulation/VFD.svg new file mode 100644 index 0000000..4c508c4 --- /dev/null +++ b/image_server_simulation/VFD.svg @@ -0,0 +1,50 @@ + + + + + + + + + + diff --git a/tags/Station_udt.json b/tags/Station_udt.json index f558695..32fce2f 100644 --- a/tags/Station_udt.json +++ b/tags/Station_udt.json @@ -6,12 +6,24 @@ "name": "Alarm", "tagType": "Folder", "tags": [ + { + "opcItemPath": { + "bindType": "parameter", + "binding": "ns\u003d1;s\u003d[PLC]{InstanceName}.HMI.Alarm.Stopped" + }, + "valueSource": "opc", + "dataType": "Boolean", + "name": "Stopped", + "tagType": "AtomicTag", + "opcServer": "PLC" + }, { "opcItemPath": { "bindType": "parameter", "binding": "ns\u003d1;s\u003d[PLC]{InstanceName}.HMI.Alarm.EStopped" }, "valueSource": "opc", + "dataType": "Boolean", "name": "Estopped", "tagType": "AtomicTag", "opcServer": "PLC"