diff --git a/.resources/c5114b673dc55f800ed09a0f7da5e02301ba032e71d6077672a3570c4b164608 b/.resources/0585009c5c1f69778f677ea6e5e2565c3ce4a5ea90c0f6ae90b7dd59c0b08917 similarity index 98% rename from .resources/c5114b673dc55f800ed09a0f7da5e02301ba032e71d6077672a3570c4b164608 rename to .resources/0585009c5c1f69778f677ea6e5e2565c3ce4a5ea90c0f6ae90b7dd59c0b08917 index b809ed77..21700630 100644 --- a/.resources/c5114b673dc55f800ed09a0f7da5e02301ba032e71d6077672a3570c4b164608 +++ b/.resources/0585009c5c1f69778f677ea6e5e2565c3ce4a5ea90c0f6ae90b7dd59c0b08917 @@ -1567,6 +1567,75 @@ "results": { "enabled": true } + }, + "selection": { + "data": [ + { + "Description": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "PS3_1_SIO1 - TEST" + }, + "Device": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "PS3_1_SIO1" + }, + "Duration": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "01:12:29" + }, + "FullTag": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "System/MCM01/IO_Block/SIO/PS3_1_SIO1/Alarm/twesrt" + }, + "ID": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": 3 + }, + "Location": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "MCM01" + }, + "Priority": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "Diagnostic" + }, + "StartTimestamp": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "$": [ + "ts", + 0, + 1758293457803 + ], + "$ts": 1758289226000 + } + }, + "Tag": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "PS3_1_SIO1.HMI.twesrt" + } + } + ], + "selectedColumn": "Duration", + "selectedRow": 0 } }, "type": "ia.display.table" @@ -3260,7 +3329,7 @@ "$": [ "ts", 192, - 1758280365675 + 1758290858284 ], "$ts": 1755606669646 }, @@ -3268,7 +3337,7 @@ "$": [ "ts", 192, - 1758280365675 + 1758290858284 ], "$ts": 1755608469646 } @@ -4410,7 +4479,7 @@ "$": [ "ts", 192, - 1758280365675 + 1758290858284 ], "$ts": 1755606669646 }, @@ -4418,7 +4487,7 @@ "$": [ "ts", 192, - 1758280365675 + 1758290858284 ], "$ts": 1755608469646 }, diff --git a/.resources/17c7f6d437f137a389a859a29285596ab1e516be8c0161aab49db2365ae05c1b b/.resources/17c7f6d437f137a389a859a29285596ab1e516be8c0161aab49db2365ae05c1b new file mode 100644 index 00000000..669b1291 Binary files /dev/null and b/.resources/17c7f6d437f137a389a859a29285596ab1e516be8c0161aab49db2365ae05c1b differ diff --git a/.resources/1e47163e9f546b25c8408c5687f3196f2d1730f8e2bac2107dc52ae834dc0a88 b/.resources/1e47163e9f546b25c8408c5687f3196f2d1730f8e2bac2107dc52ae834dc0a88 new file mode 100644 index 00000000..a966f223 --- /dev/null +++ b/.resources/1e47163e9f546b25c8408c5687f3196f2d1730f8e2bac2107dc52ae834dc0a88 @@ -0,0 +1,81 @@ +def deviceType(self, path, props): + try: + docked_view = "Docked-East-" + + devices = [] + tags = [] + + if "Conveyor" in path: + docked_view += "Conv" + devices = autStand.devices.build_device_table(self) + system.perspective.print(devices) + elif "VFD" in path: + docked_view += "VFD" + else: + docked_view += "Device" + + tags = autStand.devices.getAllTags(self, props[0]) + system.perspective.print(tags) + +# return 1 + return [docked_view, tags, devices] + + except Exception as e: + import traceback + msg = "Error in deviceType: {}\n{}".format(str(e), traceback.format_exc()) + system.perspective.print(msg) + # optionally: system.gui.errorBox(msg) # if running in Vision, not Perspective + return None + + +def handleTagHighlight(view, currentValue): + tag_priority = currentValue.value + + # --- CASE 1: Remove all highlights by applying CLEAR class --- + if not tag_priority or str(tag_priority).upper() == "CLEAR": + for child in view.rootContainer.getChildren()[0].getChildren(): + try: + child.props.style.classes = "" + except: + pass + return False + + parts = str(tag_priority).split("||") + tag = parts[0] + splitedTag = tag.split("/") + deviceName = splitedTag[-1] + + components = view.rootContainer.getChildren()[0].getChildren() + + priority = parts[1] + + foundMatch = False + +# clear all highlights and apply new one when found + for child in components: + params = child.props.get("params", {}) + tagProps = params.get("tagProps", {}) + tagsList = list(tagProps) + + if len(tagsList) == 0: + continue + + child.props.style.classes = "" + + tagPath = tagsList[0] +# system.perspective.print(tagPath) + + if tag == tagPath: + child.props.style["classes"] = "Highlight/Pulse-" + priority + path = child.props.get("path") +# docked_view = deviceType(child) + docked_view = deviceType(view, path, tagProps) +# system.perspective.print(docked_view) + system.perspective.openDock(docked_view[0], params = {'tagProps':tagProps, 'tags': docked_view[1], 'devices':docked_view[2]}) +# tags = autStand.devices.getAllTags(view, tagProps[0]) +# system.perspective.openDock(docked_view, params={'tagProps': tagProps, 'tags': tags}) + + foundMatch = True + + return foundMatch + diff --git a/.resources/efe2523733556a0feb21d0a386738e22f36892d13767687e5bb2946646645453 b/.resources/33d8fee810c259f34957e710b75fe93ceaa47c180a5127979fb898883e4ddba0 similarity index 99% rename from .resources/efe2523733556a0feb21d0a386738e22f36892d13767687e5bb2946646645453 rename to .resources/33d8fee810c259f34957e710b75fe93ceaa47c180a5127979fb898883e4ddba0 index f37000f4..0d580a1f 100644 --- a/.resources/efe2523733556a0feb21d0a386738e22f36892d13767687e5bb2946646645453 +++ b/.resources/33d8fee810c259f34957e710b75fe93ceaa47c180a5127979fb898883e4ddba0 @@ -4,7 +4,7 @@ "$": [ "ds", 192, - 1758290292372 + 1758293575644 ], "$columns": [ { diff --git a/.resources/419e9d368ef71bfdf9818c5682b6a701e0f4a9775c42f8da2c0633be660a4b39 b/.resources/419e9d368ef71bfdf9818c5682b6a701e0f4a9775c42f8da2c0633be660a4b39 deleted file mode 100644 index 0ab43496..00000000 Binary files a/.resources/419e9d368ef71bfdf9818c5682b6a701e0f4a9775c42f8da2c0633be660a4b39 and /dev/null differ diff --git a/.resources/48b6649ca5d74d98828ef1b4aca4801529438cd25f8fe84de55169ab17471879 b/.resources/48b6649ca5d74d98828ef1b4aca4801529438cd25f8fe84de55169ab17471879 deleted file mode 100644 index c4ea476a..00000000 Binary files a/.resources/48b6649ca5d74d98828ef1b4aca4801529438cd25f8fe84de55169ab17471879 and /dev/null differ diff --git a/.resources/7746df87bc2c49a2a908937678761d5fccc3f8e2e63a0857e477dc03a60e219a b/.resources/7746df87bc2c49a2a908937678761d5fccc3f8e2e63a0857e477dc03a60e219a deleted file mode 100644 index a2043147..00000000 Binary files a/.resources/7746df87bc2c49a2a908937678761d5fccc3f8e2e63a0857e477dc03a60e219a and /dev/null differ diff --git a/.resources/9e79e766821987efe661c01603cc111d5a536f00b9a020f83bf94af5aa09b083 b/.resources/9e79e766821987efe661c01603cc111d5a536f00b9a020f83bf94af5aa09b083 new file mode 100644 index 00000000..58a1259c Binary files /dev/null and b/.resources/9e79e766821987efe661c01603cc111d5a536f00b9a020f83bf94af5aa09b083 differ diff --git a/.resources/a5cd747873802f73564c0aba32016333f1580eb9e337ec9e3929b253f5c3c753 b/.resources/a5cd747873802f73564c0aba32016333f1580eb9e337ec9e3929b253f5c3c753 deleted file mode 100644 index 97607ba3..00000000 Binary files a/.resources/a5cd747873802f73564c0aba32016333f1580eb9e337ec9e3929b253f5c3c753 and /dev/null differ diff --git a/.resources/5f184675ebca5045caafe005c707df9201226a0836e8db4a3b1936aa249be652 b/.resources/ad92abce0f8c431973ac416eff5878315643fd7bd0f4d26adce6f2287f07f2a0 similarity index 99% rename from .resources/5f184675ebca5045caafe005c707df9201226a0836e8db4a3b1936aa249be652 rename to .resources/ad92abce0f8c431973ac416eff5878315643fd7bd0f4d26adce6f2287f07f2a0 index 0b675cad..a6187f1a 100644 --- a/.resources/5f184675ebca5045caafe005c707df9201226a0836e8db4a3b1936aa249be652 +++ b/.resources/ad92abce0f8c431973ac416eff5878315643fd7bd0f4d26adce6f2287f07f2a0 @@ -1,6 +1,6 @@ { "custom": { - "color": "#f9050d", + "color": "#C2C2C2", "priority": "No Active Alarms" }, "params": { diff --git a/.resources/bc4c9e6d6533e706d36e68909381a5d9efb94ba271c7e414eaf29143395e99f9 b/.resources/bc4c9e6d6533e706d36e68909381a5d9efb94ba271c7e414eaf29143395e99f9 deleted file mode 100644 index 909ef4fe..00000000 --- a/.resources/bc4c9e6d6533e706d36e68909381a5d9efb94ba271c7e414eaf29143395e99f9 +++ /dev/null @@ -1,58 +0,0 @@ -def deviceType(view): - path = view.props.get("path") - docked_view = "Docked-East-" - - if "Conveyor" in path: - docked_view +="Conv" - elif "VFD" in path: - docked_view +="VFD" - else : - docked_view +="Device" - - return docked_view - -def handleTagHighlight(view, currentValue): - tag_priority = currentValue.value - - # --- CASE 1: Remove all highlights by applying CLEAR class --- - if not tag_priority or str(tag_priority).upper() == "CLEAR": - for child in view.rootContainer.getChildren()[0].getChildren(): - try: - child.props.style.classes = "" - except: - pass - return False - - parts = str(tag_priority).split("||") - tag = parts[0] - splitedTag = tag.split("/") - deviceName = splitedTag[-1] - - components = view.rootContainer.getChildren()[0].getChildren() - - priority = parts[1] - - foundMatch = False - -# clear all highlights and apply new one when found - for child in components: - params = child.props.get("params", {}) - tagProps = params.get("tagProps", {}) - tagsList = list(tagProps) - - if len(tagsList) == 0: - continue - - child.props.style.classes = "" - - tagPath = tagsList[0] -# system.perspective.print(tagPath) - - if tag == tagPath: - child.props.style["classes"] = "Highlight/Pulse-" + priority - docked_view = deviceType(child) - system.perspective.openDock(docked_view, params={'tagProps': tagProps}) - foundMatch = True - - return foundMatch - diff --git a/.resources/7539bc9791eca731e99b216f7da21244a9e449cbb82c16600feff4a10a4be2f2 b/.resources/bfc5528e13d5c95e97bcaf64e89dd91e229eba7fedc8aa09fe8dd14d829398ef similarity index 98% rename from .resources/7539bc9791eca731e99b216f7da21244a9e449cbb82c16600feff4a10a4be2f2 rename to .resources/bfc5528e13d5c95e97bcaf64e89dd91e229eba7fedc8aa09fe8dd14d829398ef index 55d6c64b..68c24d26 100644 --- a/.resources/7539bc9791eca731e99b216f7da21244a9e449cbb82c16600feff4a10a4be2f2 +++ b/.resources/bfc5528e13d5c95e97bcaf64e89dd91e229eba7fedc8aa09fe8dd14d829398ef @@ -3,7 +3,7 @@ "PLC": "MCM01", "color": "#C2C2C2", "showTags": true, - "state": "Actuated" + "state": "Closed" }, "params": { "devices": [], @@ -1225,7 +1225,10 @@ "sortable": true, "strictWidth": false, "style": { - "classes": "" + "classes": "", + "fontSize": "0.9vmin", + "whiteSpace": "normal", + "wordBreak": "break-all" }, "toggleSwitch": { "color": { @@ -1236,7 +1239,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 130 + "width": 180 }, { "align": "center", @@ -1317,7 +1320,10 @@ "sortable": true, "strictWidth": false, "style": { - "classes": "" + "classes": "", + "fontSize": "0.9vmin", + "whiteSpace": "normal", + "wordBreak": "break-all" }, "toggleSwitch": { "color": { @@ -1328,7 +1334,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 350 + "width": 310 }, { "align": "center", @@ -1409,7 +1415,8 @@ "sortable": true, "strictWidth": false, "style": { - "classes": "" + "classes": "", + "fontSize": "0.9vmin" }, "toggleSwitch": { "color": { @@ -1420,7 +1427,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 100 + "width": "" } ], "pager": { @@ -1454,6 +1461,7 @@ "grow": 1 }, "props": { + "currentTabIndex": 3, "menuType": "modern", "tabSize": { "width": 1000 diff --git a/.resources/db4ea370fc0caa9d6064356955deb1a8617a1b247b962ddedbacdaa795941c63 b/.resources/db4ea370fc0caa9d6064356955deb1a8617a1b247b962ddedbacdaa795941c63 new file mode 100644 index 00000000..43aa6c96 Binary files /dev/null and b/.resources/db4ea370fc0caa9d6064356955deb1a8617a1b247b962ddedbacdaa795941c63 differ diff --git a/.resources/332bde6fbae5ee219d6180a16c8ce6e1824210a80a2bb0144e61acdaa8865282 b/.resources/e924183d46b07c788f84396a52f132754364c0211526054ea35bc7a4cc8c1ea2 similarity index 76% rename from .resources/332bde6fbae5ee219d6180a16c8ce6e1824210a80a2bb0144e61acdaa8865282 rename to .resources/e924183d46b07c788f84396a52f132754364c0211526054ea35bc7a4cc8c1ea2 index ba782d92..4f57beb6 100644 --- a/.resources/332bde6fbae5ee219d6180a16c8ce6e1824210a80a2bb0144e61acdaa8865282 +++ b/.resources/e924183d46b07c788f84396a52f132754364c0211526054ea35bc7a4cc8c1ea2 @@ -167,12 +167,12 @@ def build_device_table(self): def getAllTags(self, tagPath): """ - Reads all tags under a UDT instance and returns a dataset. - + Reads all tags under a UDT instance (recursively) and returns a dataset. + Args: - tagPath (str): Full path to the clicked device instance (e.g., System/MCM01/Photoeyes/TPE/PS3_1_TPE1) - fc_custom (str): Name of the FC custom property to determine the tag provider - + tagPath (str): Full path to the clicked device instance + (e.g., System/MCM01/Photoeyes/TPE/PS3_1_TPE1) + Returns: system.dataset: Dataset with columns ["Name", "OPC Path", "Value"] """ @@ -180,34 +180,45 @@ def getAllTags(self, tagPath): rows = [] try: - # Determine the tag provider - path = "[" + self.session.custom.fc + "_SCADA_TAG_PROVIDER]" + tagPath + providerPath = "[" + self.session.custom.fc + "_SCADA_TAG_PROVIDER]" - # Browse all child tags under this UDT instance - children = system.tag.browse(path, filter = {}).getResults() - for child in children: - tagType = str(child.get("tagType", "")) - name = str(child.get("name", "")) - fullPath = str(child.get("fullPath", "")) - - # Remove provider if present - if fullPath.startswith("[") and "]" in fullPath: - fullPath = fullPath.split("]", 1)[1] + def browseRecursive(basePath, prefix=""): + children = system.tag.browse(providerPath + basePath, filter={}).getResults() + for child in children: + tagType = str(child.get("tagType", "")) + name = str(child.get("name", "")) + fullPath = str(child.get("fullPath", "")) - # Only include atomic tags, skip folders - if tagType == "AtomicTag": - value = None - try: - result = system.tag.readBlocking([fullPath])[0] - if result is not None and not result.isNull() and result.quality.isGood(): - value = result.value - except: - value = "Unknown" + # Strip provider name + if fullPath.startswith("[") and "]" in fullPath: + fullPath = fullPath.split("]", 1)[1] - rows.append([name, fullPath, value]) + if tagType == "AtomicTag": + value = None + try: + readPath = providerPath + fullPath + result = system.tag.readBlocking([readPath])[0] + + if result.quality.isGood(): + value = str(result.value) + else: + value = "Unknown" + except: + value = "Unknown" + + # Use prefix/folder style path if inside folder + displayName = prefix + name if prefix else name + rows.append([displayName, fullPath, value]) + + elif tagType == "Folder": + # Dive deeper into folder + newPrefix = prefix + name + "/" + browseRecursive(basePath + "/" + name, prefix=newPrefix) + + # Start recursion + browseRecursive(tagPath) return system.dataset.toDataSet(headers, rows) except Exception as e: - system.perspective.print("Error in getAllTags: {}".format(e)) - return system.dataset.toDataSet(headers, []) \ No newline at end of file + system.perspective.print("Error in getAllTags: {}".format(e)) \ No newline at end of file diff --git a/.resources/eced82e68a85c824b3bcd5933071ecdb459c2ffe0acbd2a0650557dc8e7b4526 b/.resources/eced82e68a85c824b3bcd5933071ecdb459c2ffe0acbd2a0650557dc8e7b4526 new file mode 100644 index 00000000..f6a5da26 Binary files /dev/null and b/.resources/eced82e68a85c824b3bcd5933071ecdb459c2ffe0acbd2a0650557dc8e7b4526 differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/resource.json index 427498bb..f337230e 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-19T12:36:20Z" + "timestamp": "2025-09-19T14:52:55Z" }, - "lastModificationSignature": "b2e342fbe4be98836829c596ad8705d49b652ed3b7d92ceffbd5959bf68bf8c5" + "lastModificationSignature": "426a85d902d87208ae4b9e1ece86b27662a69ec0f84ad8525cc6176457f2e505" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/thumbnail.png index a2043147..f6a5da26 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/thumbnail.png differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/view.json index b809ed77..21700630 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Alarms/RealTime/view.json @@ -1567,6 +1567,75 @@ "results": { "enabled": true } + }, + "selection": { + "data": [ + { + "Description": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "PS3_1_SIO1 - TEST" + }, + "Device": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "PS3_1_SIO1" + }, + "Duration": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "01:12:29" + }, + "FullTag": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "System/MCM01/IO_Block/SIO/PS3_1_SIO1/Alarm/twesrt" + }, + "ID": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": 3 + }, + "Location": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "MCM01" + }, + "Priority": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "Diagnostic" + }, + "StartTimestamp": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": { + "$": [ + "ts", + 0, + 1758293457803 + ], + "$ts": 1758289226000 + } + }, + "Tag": { + "style": { + "classes": "Alarms-Styles/Diagnostic" + }, + "value": "PS3_1_SIO1.HMI.twesrt" + } + } + ], + "selectedColumn": "Duration", + "selectedRow": 0 } }, "type": "ia.display.table" @@ -3260,7 +3329,7 @@ "$": [ "ts", 192, - 1758280365675 + 1758290858284 ], "$ts": 1755606669646 }, @@ -3268,7 +3337,7 @@ "$": [ "ts", 192, - 1758280365675 + 1758290858284 ], "$ts": 1755608469646 } @@ -4410,7 +4479,7 @@ "$": [ "ts", 192, - 1758280365675 + 1758290858284 ], "$ts": 1755606669646 }, @@ -4418,7 +4487,7 @@ "$": [ "ts", 192, - 1758280365675 + 1758290858284 ], "$ts": 1755608469646 }, diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/resource.json index 68b0d21d..179dfde8 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-19T13:41:00Z" + "timestamp": "2025-09-19T14:14:52Z" }, - "lastModificationSignature": "159bcf779d752460467d842af762f1f4a47cdc2f73efe60da26c4b885dd28702" + "lastModificationSignature": "182cc8b9fb64c597187e2e07de9667bc41a9398f6d5a3abeaf73bc1062d5dc13" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/thumbnail.png index 0ab43496..669b1291 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/thumbnail.png differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/resource.json index 1a26a820..62618cb4 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-19T13:58:13Z" + "timestamp": "2025-09-19T14:52:55Z" }, - "lastModificationSignature": "b67275b216883876b5da86e62e8434c6a7eb4f0d23a5ba286676c34465d88102" + "lastModificationSignature": "82fe10033dc0f7d34622625de96b56b94cdd37e8a748941e2989f86af46b003f" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/view.json index f37000f4..0d580a1f 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/view.json @@ -4,7 +4,7 @@ "$": [ "ds", 192, - 1758290292372 + 1758293575644 ], "$columns": [ { diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/DPM/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/DPM/resource.json index 375719d7..a725629e 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/DPM/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/DPM/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-16T13:36:34Z" + "timestamp": "2025-09-19T14:25:56Z" }, - "lastModificationSignature": "4b1237ac15b4a71b5aca7a85545cea02fd5bcbd3814669135b7d99c28c1a4c68" + "lastModificationSignature": "4a006674d6d86b950bd34d4dc9993b3dfe70377a954f0bcf9b632edb664fc92e" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/DPM/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/DPM/thumbnail.png index 97607ba3..58a1259c 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/DPM/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/DPM/thumbnail.png differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/VFD/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/VFD/resource.json index 26244d64..b2675046 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/VFD/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/VFD/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-18T19:37:21Z" + "timestamp": "2025-09-19T14:26:19Z" }, - "lastModificationSignature": "a59741c6f4844901815e6d950b0dbdf1263034263340da919f0e85a01be19f7b" + "lastModificationSignature": "824eacbeea448afe5a876e2b7b4896da09a2fc68d7f1778abb2e5c05f2d4d1c5" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/VFD/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/VFD/view.json index 0b675cad..a6187f1a 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/VFD/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/VFD/view.json @@ -1,6 +1,6 @@ { "custom": { - "color": "#f9050d", + "color": "#C2C2C2", "priority": "No Active Alarms" }, "params": { diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/resource.json index 9c9dcbd5..043c91e7 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-12T08:57:39Z" + "timestamp": "2025-09-22T09:36:12Z" }, - "lastModificationSignature": "ceb13f6804a08c80f987c4ee866abe4c4961c8867da6993353eaa172e085ae22" + "lastModificationSignature": "4a36dafff395ff4abbb3f6ea103d133ce10be38fa32664a5b8410ce0dd8ad540" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/thumbnail.png index c4ea476a..43aa6c96 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/thumbnail.png differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/view.json index 55d6c64b..68c24d26 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv/view.json @@ -3,7 +3,7 @@ "PLC": "MCM01", "color": "#C2C2C2", "showTags": true, - "state": "Actuated" + "state": "Closed" }, "params": { "devices": [], @@ -1225,7 +1225,10 @@ "sortable": true, "strictWidth": false, "style": { - "classes": "" + "classes": "", + "fontSize": "0.9vmin", + "whiteSpace": "normal", + "wordBreak": "break-all" }, "toggleSwitch": { "color": { @@ -1236,7 +1239,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 130 + "width": 180 }, { "align": "center", @@ -1317,7 +1320,10 @@ "sortable": true, "strictWidth": false, "style": { - "classes": "" + "classes": "", + "fontSize": "0.9vmin", + "whiteSpace": "normal", + "wordBreak": "break-all" }, "toggleSwitch": { "color": { @@ -1328,7 +1334,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 350 + "width": 310 }, { "align": "center", @@ -1409,7 +1415,8 @@ "sortable": true, "strictWidth": false, "style": { - "classes": "" + "classes": "", + "fontSize": "0.9vmin" }, "toggleSwitch": { "color": { @@ -1420,7 +1427,7 @@ "viewParams": {}, "viewPath": "", "visible": true, - "width": 100 + "width": "" } ], "pager": { @@ -1454,6 +1461,7 @@ "grow": 1 }, "props": { + "currentTabIndex": 3, "menuType": "modern", "tabSize": { "width": 1000 diff --git a/BNA8/ignition/script-python/autStand/Utils/code.py b/BNA8/ignition/script-python/autStand/Utils/code.py index 909ef4fe..a966f223 100644 --- a/BNA8/ignition/script-python/autStand/Utils/code.py +++ b/BNA8/ignition/script-python/autStand/Utils/code.py @@ -1,15 +1,32 @@ -def deviceType(view): - path = view.props.get("path") - docked_view = "Docked-East-" - - if "Conveyor" in path: - docked_view +="Conv" - elif "VFD" in path: - docked_view +="VFD" - else : - docked_view +="Device" - - return docked_view +def deviceType(self, path, props): + try: + docked_view = "Docked-East-" + + devices = [] + tags = [] + + if "Conveyor" in path: + docked_view += "Conv" + devices = autStand.devices.build_device_table(self) + system.perspective.print(devices) + elif "VFD" in path: + docked_view += "VFD" + else: + docked_view += "Device" + + tags = autStand.devices.getAllTags(self, props[0]) + system.perspective.print(tags) + +# return 1 + return [docked_view, tags, devices] + + except Exception as e: + import traceback + msg = "Error in deviceType: {}\n{}".format(str(e), traceback.format_exc()) + system.perspective.print(msg) + # optionally: system.gui.errorBox(msg) # if running in Vision, not Perspective + return None + def handleTagHighlight(view, currentValue): tag_priority = currentValue.value @@ -50,8 +67,14 @@ def handleTagHighlight(view, currentValue): if tag == tagPath: child.props.style["classes"] = "Highlight/Pulse-" + priority - docked_view = deviceType(child) - system.perspective.openDock(docked_view, params={'tagProps': tagProps}) + path = child.props.get("path") +# docked_view = deviceType(child) + docked_view = deviceType(view, path, tagProps) +# system.perspective.print(docked_view) + system.perspective.openDock(docked_view[0], params = {'tagProps':tagProps, 'tags': docked_view[1], 'devices':docked_view[2]}) +# tags = autStand.devices.getAllTags(view, tagProps[0]) +# system.perspective.openDock(docked_view, params={'tagProps': tagProps, 'tags': tags}) + foundMatch = True return foundMatch diff --git a/BNA8/ignition/script-python/autStand/Utils/resource.json b/BNA8/ignition/script-python/autStand/Utils/resource.json index 763be68e..3e17fd50 100644 --- a/BNA8/ignition/script-python/autStand/Utils/resource.json +++ b/BNA8/ignition/script-python/autStand/Utils/resource.json @@ -9,9 +9,9 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-19T13:21:15Z" + "timestamp": "2025-09-19T14:43:02Z" }, "hintScope": 2, - "lastModificationSignature": "717c54551cb487cf4325361e5e75e5db3a065f14656df7dc6ee5dca07eb0f544" + "lastModificationSignature": "9d58c365d8aba15c6e322fa153e168c440f81681d7ecc1e0e3405f21b64be363" } } \ No newline at end of file diff --git a/BNA8/ignition/script-python/autStand/devices/code.py b/BNA8/ignition/script-python/autStand/devices/code.py index ba782d92..4f57beb6 100644 --- a/BNA8/ignition/script-python/autStand/devices/code.py +++ b/BNA8/ignition/script-python/autStand/devices/code.py @@ -167,12 +167,12 @@ def build_device_table(self): def getAllTags(self, tagPath): """ - Reads all tags under a UDT instance and returns a dataset. - + Reads all tags under a UDT instance (recursively) and returns a dataset. + Args: - tagPath (str): Full path to the clicked device instance (e.g., System/MCM01/Photoeyes/TPE/PS3_1_TPE1) - fc_custom (str): Name of the FC custom property to determine the tag provider - + tagPath (str): Full path to the clicked device instance + (e.g., System/MCM01/Photoeyes/TPE/PS3_1_TPE1) + Returns: system.dataset: Dataset with columns ["Name", "OPC Path", "Value"] """ @@ -180,34 +180,45 @@ def getAllTags(self, tagPath): rows = [] try: - # Determine the tag provider - path = "[" + self.session.custom.fc + "_SCADA_TAG_PROVIDER]" + tagPath + providerPath = "[" + self.session.custom.fc + "_SCADA_TAG_PROVIDER]" - # Browse all child tags under this UDT instance - children = system.tag.browse(path, filter = {}).getResults() - for child in children: - tagType = str(child.get("tagType", "")) - name = str(child.get("name", "")) - fullPath = str(child.get("fullPath", "")) - - # Remove provider if present - if fullPath.startswith("[") and "]" in fullPath: - fullPath = fullPath.split("]", 1)[1] + def browseRecursive(basePath, prefix=""): + children = system.tag.browse(providerPath + basePath, filter={}).getResults() + for child in children: + tagType = str(child.get("tagType", "")) + name = str(child.get("name", "")) + fullPath = str(child.get("fullPath", "")) - # Only include atomic tags, skip folders - if tagType == "AtomicTag": - value = None - try: - result = system.tag.readBlocking([fullPath])[0] - if result is not None and not result.isNull() and result.quality.isGood(): - value = result.value - except: - value = "Unknown" + # Strip provider name + if fullPath.startswith("[") and "]" in fullPath: + fullPath = fullPath.split("]", 1)[1] - rows.append([name, fullPath, value]) + if tagType == "AtomicTag": + value = None + try: + readPath = providerPath + fullPath + result = system.tag.readBlocking([readPath])[0] + + if result.quality.isGood(): + value = str(result.value) + else: + value = "Unknown" + except: + value = "Unknown" + + # Use prefix/folder style path if inside folder + displayName = prefix + name if prefix else name + rows.append([displayName, fullPath, value]) + + elif tagType == "Folder": + # Dive deeper into folder + newPrefix = prefix + name + "/" + browseRecursive(basePath + "/" + name, prefix=newPrefix) + + # Start recursion + browseRecursive(tagPath) return system.dataset.toDataSet(headers, rows) except Exception as e: - system.perspective.print("Error in getAllTags: {}".format(e)) - return system.dataset.toDataSet(headers, []) \ No newline at end of file + system.perspective.print("Error in getAllTags: {}".format(e)) \ No newline at end of file diff --git a/BNA8/ignition/script-python/autStand/devices/resource.json b/BNA8/ignition/script-python/autStand/devices/resource.json index fd0ea084..3ad78f8f 100644 --- a/BNA8/ignition/script-python/autStand/devices/resource.json +++ b/BNA8/ignition/script-python/autStand/devices/resource.json @@ -9,9 +9,9 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-11T14:21:44Z" + "timestamp": "2025-09-22T10:07:38Z" }, "hintScope": 2, - "lastModificationSignature": "ac100dce34bb5394c6ec164e067a535fc23d24c32e0c752058d22c189107f89f" + "lastModificationSignature": "71fab1ecf8f0a34c150bbd0e39819fb04f54cc9c1d343925f1b6d41c07383a4e" } } \ No newline at end of file diff --git a/conversion-report.txt b/conversion-report.txt index c792be9e..4f4ccc3d 100644 --- a/conversion-report.txt +++ b/conversion-report.txt @@ -36,3 +36,7 @@ Starting conversion: 20250919:12.08.01 Conversion finished. Elapsed time: 10 ms Starting conversion: 20250919:14.45.44 Conversion finished. Elapsed time: 9 ms +Starting conversion: 20250920:12.20.22 +Conversion finished. Elapsed time: 10 ms +Starting conversion: 20250922:11.54.29 +Conversion finished. Elapsed time: 11 ms