diff --git a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM02 Fluid Inbound Upper/view.json b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM02 Fluid Inbound Upper/view.json index c1c21dd..74fab0c 100644 --- a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM02 Fluid Inbound Upper/view.json +++ b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM02 Fluid Inbound Upper/view.json @@ -715,6 +715,7 @@ "type": "group" } ], + "preserveAspectRatio": "none", "viewBox": "0 0 1850 1028" }, "type": "ia.shapes.svg" diff --git a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM03 Non Con/view.json b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM03 Non Con/view.json index 4be4e48..66f6a4e 100644 --- a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM03 Non Con/view.json +++ b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM03 Non Con/view.json @@ -1543,6 +1543,7 @@ "type": "group" } ], + "preserveAspectRatio": "none", "viewBox": "0 0 1850 1028" }, "type": "ia.shapes.svg" diff --git a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM04 North Bulk Inbound, Fluid Outbound and Problem Solve/view.json b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM04 North Bulk Inbound, Fluid Outbound and Problem Solve/view.json index 20ea596..df7ab5d 100644 --- a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM04 North Bulk Inbound, Fluid Outbound and Problem Solve/view.json +++ b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM04 North Bulk Inbound, Fluid Outbound and Problem Solve/view.json @@ -1991,6 +1991,7 @@ "fill": { "paint": "transparent" }, + "preserveAspectRatio": "none", "viewBox": "0 0 1850 1028" }, "type": "ia.shapes.svg" diff --git a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM05 Chutes/view.json b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM05 Chutes/view.json index db0aaa6..e62b96b 100644 --- a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM05 Chutes/view.json +++ b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM05 Chutes/view.json @@ -3267,6 +3267,7 @@ "type": "group" } ], + "preserveAspectRatio": "none", "viewBox": "0 0 1850 1028" }, "type": "ia.shapes.svg" diff --git a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM05 South Bulk Inbound, Fluid Outbound and Problem Solve/view.json b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM05 South Bulk Inbound, Fluid Outbound and Problem Solve/view.json index 2b0864a..cec0c4b 100644 --- a/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM05 South Bulk Inbound, Fluid Outbound and Problem Solve/view.json +++ b/MTN6_SCADA/com.inductiveautomation.perspective/views/Detailed-Views/MCM05 South Bulk Inbound, Fluid Outbound and Problem Solve/view.json @@ -1906,6 +1906,7 @@ "type": "group" } ], + "preserveAspectRatio": "none", "viewBox": "0 0 1850 1028" }, "type": "ia.shapes.svg" diff --git a/MTN6_SCADA/ignition/script-python/utils/code.py b/MTN6_SCADA/ignition/script-python/utils/code.py index a79d590..104814f 100644 --- a/MTN6_SCADA/ignition/script-python/utils/code.py +++ b/MTN6_SCADA/ignition/script-python/utils/code.py @@ -16,20 +16,38 @@ def handleTagHighlight(view, currentValue): priority = parts[1] if len(parts) > 1 else "1" splitedTag = tag.split("/") - deviceName = splitedTag[-1] + deviceName = splitedTag[-2] # second-to-last part + # Map device keywords to Docked-East views Docked_East_Map = { "VFD": "Docked-East-VFD", - "MCM": "Docked-East-MCM" + "MCM": "Docked-East-MCM", + "EXTENDO": "Docked-East-EX", + "DPM": "Docked-East-DS", + "FIO": "Docked-East-DS", + "SIO": "Docked-East-DS", + "HUB": "Docked-East-DS", + "EPC": "Docked-East-EPC", + "JR": "Docked-East-BTN", + "Chute_JR": "Docked-East-BTN", + "S_PB": "Docked-East-BTN", + "SS_PB": "Docked-East-BTN", + "Chute": "Docked-East-SNP", + "FL_CHUTE": "Docked-East-SNP", + "PalletBuild": "Docked-East-SNP", + "D2C": "Docked-East-SNP", + "NC": "Docked-East-SNP", } - Docked_East_View = Docked_East_Map["VFD"] + Docked_East_View = Docked_East_Map.get(deviceName, "Docked-East-VFD") # fallback + + # Special handling for PE devices if "PE" in deviceName: tag = "/".join(splitedTag[:2]) + "/Conveyor/" + deviceName[:-3] + "VFD1" - if "MCM" in deviceName: - Docked_East_View = Docked_East_Map["MCM"] - + if "MCM" in deviceName: + Docked_East_View = Docked_East_Map["MCM"] + # Clear old highlights (set to Clear class) components = view.rootContainer.getChildren() for child in components: diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/MCM/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/MCM/view.json index 3770c72..2c0dfdd 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/MCM/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Symbol-Views/Equipment-Views/MCM/view.json @@ -1,9 +1,9 @@ { "custom": { "alarm_message": null, - "color": "#00FF00", + "color": "#C2C2C2", "priority": "No Active Alarms", - "state": "System Started" + "state": "Closed" }, "params": { "forceFaultStatus": null, @@ -449,6 +449,14 @@ "enabled": false, "script": "" } + }, + "props.elements[1].style.fill": { + "binding": { + "config": { + "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#FFFFFF\",\r\n \"#000000\"\r\n)\r\n" + }, + "type": "expr" + } } }, "props": { @@ -466,7 +474,6 @@ { "style": { "classes": "", - "fill": "#000000", "fontWeight": "bold" }, "text": "MCM",