From a341670602f000af4b038ac9f615b177e41c6756 Mon Sep 17 00:00:00 2001 From: beka makharadze Date: Tue, 1 Jul 2025 11:22:21 +0400 Subject: [PATCH] Fix JR PB Docked-East --- .../Information-Docked-East-Extendo/view.json | 22 ++++-- .../Information-Docked-East-JR-PB/view.json | 74 +++++++++++++++---- 2 files changed, 75 insertions(+), 21 deletions(-) diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo/view.json index 828a942..02340a8 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo/view.json @@ -1,6 +1,14 @@ { "custom": { - "PLC_list": null, + "PLC_list": [ + "MCM01", + "MCM02", + "MCM03", + "MCM04", + "MCM05", + "MCM06", + "MCM07" + ], "running_state": -1, "state": 0, "views_data": [] @@ -958,11 +966,11 @@ "inputType": "scalar", "mappings": [ { - "input": "TRUE", + "input": "ON", "output": "#47FF47" }, { - "input": "FALSE", + "input": "OFF", "output": "#FF0000" } ], @@ -1111,11 +1119,11 @@ "inputType": "scalar", "mappings": [ { - "input": "TRUE", + "input": "ON", "output": "#47FF47" }, { - "input": "FALSE", + "input": "OFF", "output": "#FF0000" } ], @@ -1264,11 +1272,11 @@ "inputType": "scalar", "mappings": [ { - "input": "TRUE", + "input": "ON", "output": "#47FF47" }, { - "input": "FALSE", + "input": "OFF", "output": "#FF0000" } ], diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json index 2272421..9a1b10c 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/PopUp-Views/Controller-Equipment/Information-Docked-East-JR-PB/view.json @@ -1,13 +1,21 @@ { "custom": { - "PLC_list": null, + "PLC_list": [ + "MCM01", + "MCM02", + "MCM03", + "MCM04", + "MCM05", + "MCM06", + "MCM07" + ], "running_state": -1, "state": 0, "views_data": [] }, "params": { "tagProps": [ - "/System/Station/Buttons/UL1_3_JR_PB2", + "/System/Station/JR/UL1_3_JR_PB1", "value", "value", "value", @@ -433,7 +441,7 @@ }, "transforms": [ { - "fallback": "#000000", + "fallback": "#FFFFFF", "inputType": "scalar", "mappings": [ { @@ -465,20 +473,20 @@ }, "transforms": [ { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", "type": "expression" }, { - "fallback": "OFF", + "fallback": "UNKNOWN", "inputType": "scalar", "mappings": [ - { - "input": false, - "output": "OFF" - }, { "input": true, "output": "ON" + }, + { + "input": false, + "output": "OFF" } ], "outputType": "scalar", @@ -500,11 +508,11 @@ "mappings": [ { "input": "ON", - "output": "#FF0000" + "output": "#47FF47" }, { "input": "OFF", - "output": "#47FF47" + "output": "#FF0000" } ], "outputType": "color", @@ -598,6 +606,46 @@ }, "type": "expr" } + }, + "props.style.backgroundColor": { + "binding": { + "config": { + "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#B17B50\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET PRESSED\",\r\n \"#FFB988\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET\",\r\n \"#FE9240\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n" + }, + "type": "expr" + } + }, + "props.text": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start_PB" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "JAM RESET", + "inputType": "scalar", + "mappings": [ + { + "input": 1, + "output": "JAM RESET PRESSED" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } } }, "props": { @@ -607,10 +655,8 @@ } }, "style": { - "backgroundColor": "#FE9240", "classes": "Background-Styles/Controller" - }, - "text": "RESET JAM" + } }, "type": "ia.input.button" }