Change SS_PB as states are

This commit is contained in:
bmidf 2025-07-18 16:00:30 +04:00
parent 90951c338d
commit 244394321f
4 changed files with 2042 additions and 53 deletions

View File

@ -41,7 +41,7 @@
"position": { "position": {
"height": 0.0907, "height": 0.0907,
"width": 0.1271, "width": 0.1271,
"x": 0.0639, "x": 0.4187,
"y": 0.6156 "y": 0.6156
}, },
"props": { "props": {
@ -50,39 +50,7 @@
"forceFaultStatus": null, "forceFaultStatus": null,
"forceRunningStatus": null, "forceRunningStatus": null,
"tagProps": [ "tagProps": [
"System/MCM01/Station/SSPB/SS_PB1", "System/MCM01/Station/SSPB/UL6_1_SS1",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value",
"value"
]
},
"path": "Symbol-Views/Equipment-Views/SS_Button"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "SS_PB2"
},
"position": {
"height": 0.0907,
"width": 0.1271,
"x": 0.0639,
"y": 0.261
},
"props": {
"params": {
"directionLeft": false,
"forceFaultStatus": null,
"forceRunningStatus": null,
"tagProps": [
"System/MCM01/Station/SSPB/SS_PB2",
"value", "value",
"value", "value",
"value", "value",

View File

@ -10,12 +10,12 @@
"MCM07" "MCM07"
], ],
"running_state": -1, "running_state": -1,
"state": 0, "state": null,
"views_data": [] "views_data": []
}, },
"params": { "params": {
"tagProps": [ "tagProps": [
"System/MCM01/Station/SSPB/SS_PB1", "System/MCM01/Station/SSPB/UL6_1_SS1",
"value", "value",
"value", "value",
"value", "value",
@ -476,17 +476,37 @@
"fallback": "UNKNOWN", "fallback": "UNKNOWN",
"inputType": "scalar", "inputType": "scalar",
"mappings": [ "mappings": [
{
"input": 0,
"output": "OFF"
},
{ {
"input": 1, "input": 1,
"output": "ON" "output": "ON"
}, },
{ {
"input": 0, "input": 2,
"output": "ON" "output": "ON"
}, },
{ {
"input": 2, "input": 3,
"output": "ON"
},
{
"input": 4,
"output": "OFF" "output": "OFF"
},
{
"input": 5,
"output": "ON"
},
{
"input": 6,
"output": "ON"
},
{
"input": 7,
"output": "ON"
} }
], ],
"outputType": "scalar", "outputType": "scalar",
@ -820,6 +840,7 @@
"grow": 1 "grow": 1
}, },
"props": { "props": {
"currentTabIndex": 1,
"menuType": "modern", "menuType": "modern",
"tabSize": { "tabSize": {
"width": 1000 "width": 1000

View File

@ -1,19 +1,19 @@
{ {
"custom": { "custom": {
"alarm_message": null, "alarm_message": null,
"disconnected": true, "disconnected": false,
"plc": "SS_PB1", "plc": "System",
"priority": 5, "priority": 5,
"priority_string": "Unknown", "priority_string": "No active alarms",
"searchId": "PLC01", "searchId": "PLC01",
"state": 0, "state": 4,
"state_string": "Stopped" "state_string": "Disabled"
}, },
"params": { "params": {
"forceFaultStatus": null, "forceFaultStatus": null,
"forceStatus": null, "forceStatus": null,
"tagProps": [ "tagProps": [
"SS_PB1", "System/MCM01/Station/SSPB/UL6_1_SS1",
"value", "value",
"value", "value",
"value", "value",
@ -75,13 +75,37 @@
"fallback": 5, "fallback": 5,
"inputType": "scalar", "inputType": "scalar",
"mappings": [ "mappings": [
{
"input": 0,
"output": 5
},
{ {
"input": 1, "input": 1,
"output": 3 "output": 3
}, },
{ {
"input": 2, "input": 2,
"output": 3
},
{
"input": 3,
"output": 3
},
{
"input": 4,
"output": 5 "output": 5
},
{
"input": 5,
"output": 5
},
{
"input": 6,
"output": 5
},
{
"input": 7,
"output": 3
} }
], ],
"outputType": "scalar", "outputType": "scalar",
@ -95,7 +119,7 @@
"custom.priority_string": { "custom.priority_string": {
"binding": { "binding": {
"config": { "config": {
"expression": "case({view.custom.state},\r\n3, \"Medium\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" "expression": "case({view.custom.priority},\r\n3, \"Medium\",\r\n5, \"No active alarms\",\r\n\"Unknown\")"
}, },
"type": "expr" "type": "expr"
}, },
@ -137,6 +161,26 @@
{ {
"input": 2, "input": 2,
"output": 2 "output": 2
},
{
"input": 3,
"output": 3
},
{
"input": 4,
"output": 4
},
{
"input": 5,
"output": 5
},
{
"input": 6,
"output": 6
},
{
"input": 7,
"output": 7
} }
], ],
"outputType": "scalar", "outputType": "scalar",
@ -150,7 +194,7 @@
"custom.state_string": { "custom.state_string": {
"binding": { "binding": {
"config": { "config": {
"expression": "case({view.custom.state},\r\n1, \"Started\",\r\n0, \"Stopped\",\r\n2, \"Disabled\",\r\n\"Unknown\")" "expression": "case({view.custom.state},\r\n0, \"Stopped\",\r\n1, \"Started\",\r\n2, \"Stopped\",\r\n3, \"Stopped\",\r\n4, \"Disabled\",\r\n5, \"Started\",\r\n6, \"Started\",\r\n7, \"Stopped\",\r\n\"Unknown\")"
}, },
"type": "expr" "type": "expr"
}, },
@ -189,7 +233,7 @@
"props.elements[0].fill.paint": { "props.elements[0].fill.paint": {
"binding": { "binding": {
"config": { "config": {
"expression": "if(\r\n {view.custom.disconnected},\r\n \"#4F4F4F\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3,\r\n \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\",\r\n \"#FFFF00\"\r\n )\r\n)" "expression": "if(\r\n {view.custom.disconnected},\r\n \"#000000\",\r\n switch(\r\n toInt({view.custom.state}),\r\n 0, 1, 2, 3, 4, 5, 6 ,7,\r\n \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\",\r\n \"#AAAAAA\", \"#AAAAAA\", \"#AAAAAA\", \r\n \"#FFFF00\"\r\n )\r\n)\r\n"
}, },
"type": "expr" "type": "expr"
} }
@ -204,17 +248,37 @@
"fallback": "#00CC00", "fallback": "#00CC00",
"inputType": "scalar", "inputType": "scalar",
"mappings": [ "mappings": [
{
"input": 0,
"output": "#007400"
},
{ {
"input": 1, "input": 1,
"output": "#00FF00" "output": "#00FF00"
}, },
{ {
"input": 0, "input": 2,
"output": "#00FF00" "output": "#00FF00"
}, },
{ {
"input": 2, "input": 3,
"output": "#00FF00"
},
{
"input": 4,
"output": "#007400" "output": "#007400"
},
{
"input": 5,
"output": "#00FF00"
},
{
"input": 6,
"output": "#00FF00"
},
{
"input": 7,
"output": "#00FF00"
} }
], ],
"outputType": "color", "outputType": "color",
@ -231,11 +295,11 @@
}, },
"transforms": [ "transforms": [
{ {
"fallback": "#D90000", "fallback": "#940003",
"inputType": "scalar", "inputType": "scalar",
"mappings": [ "mappings": [
{ {
"input": 2, "input": 0,
"output": "#940003" "output": "#940003"
}, },
{ {
@ -243,11 +307,27 @@
"output": "#940003" "output": "#940003"
}, },
{ {
"input": 0, "input": 2,
"output": "#940003"
},
{
"input": 3,
"output": "#D90000"
},
{
"input": 4,
"output": "#940003"
},
{
"input": 5,
"output": "#940003"
},
{
"input": 6,
"output": "#940003" "output": "#940003"
} }
], ],
"outputType": "scalar", "outputType": "color",
"type": "map" "type": "map"
} }
], ],

File diff suppressed because it is too large Load Diff