diff --git a/.resources/332bde6fbae5ee219d6180a16c8ce6e1824210a80a2bb0144e61acdaa8865282 b/.resources/332bde6fbae5ee219d6180a16c8ce6e1824210a80a2bb0144e61acdaa8865282 new file mode 100644 index 00000000..ba782d92 --- /dev/null +++ b/.resources/332bde6fbae5ee219d6180a16c8ce6e1824210a80a2bb0144e61acdaa8865282 @@ -0,0 +1,213 @@ +import os, json, sys + +global_device_mapping = {} + +def build_device_mapping(full_tag_path): + """ + Builds global_device_mapping for devices that: + - Belong to the same PLC (index 1) + - Are children of the clicked device (start with clicked_name + "_") + """ + global global_device_mapping + global_device_mapping.clear() + + try: + # Parse PLC and clicked device + path_parts = full_tag_path.split("/") + plc_name = path_parts[1] if len(path_parts) > 1 else path_parts[0] + clicked_name = path_parts[-1] if len(path_parts) > 0 else "" + + project_name = system.util.getProjectName() + base_path = ( + os.getcwd().replace("\\", "/") + + "/data/projects/" + + project_name + + "/com.inductiveautomation.perspective/Views/autStand/Detailed_Views" + ) + + if not os.path.exists(base_path): + system.perspective.print("Path not found: " + base_path) + return {} + + # loop through all view folders + for view_folder in os.listdir(base_path): + json_file = os.path.join(base_path, view_folder, "view.json") + if not os.path.isfile(json_file): + continue + + try: + with open(json_file, "r") as fh: + view_json = json.load(fh) + except Exception: + continue + + # go one level deeper: root -> children[0] (coordinateContainer) -> its children + root_children = (view_json.get("root") or {}).get("children") or [] + if not root_children: + continue + + container = root_children[0] + children = container.get("children") or [] + + for child in children: + props = child.get("props") or {} + params = props.get("params") or {} + tag_props = params.get("tagProps") + + if isinstance(tag_props, list) and len(tag_props) > 0: + tag_prop = str(tag_props[0]) + parts = tag_prop.split("/") + + if len(parts) > 1 and parts[1] == plc_name: + dev_name = parts[-1] + + # ONLY include devices that are children of clicked_name + prefix = clicked_name + "_" + if dev_name.startswith(prefix): + global_device_mapping[dev_name] = { + "tagPath": tag_prop, + "zone": view_folder + } + + return global_device_mapping + + except Exception as e: + whid = "unknown" + try: + whid = system.tag.readBlocking("Configuration/FC")[0].value + except: + pass + logger = system.util.getLogger("%s-build_device_mapping" % whid) + exc_type, exc_obj, tb = sys.exc_info() + logger.error("Error at line %s: %s" % (tb.tb_lineno, exc_obj)) + return {} + +def build_device_table(self): + """ + Converts global_device_mapping into a dataset: + Columns: Device, Status + Reads each tag value, falls back to 'Unknown' if error/null. + """ + headers = ["Device", "Status"] + rows = [] + state_mappings = { + 0: "Closed", + 1: "Actuated", + 2: "Communication Faulted", + 3: "Conveyor Running In Maintenance Mode", + 4: "Disabled", + 5: "Disconnected", + 6: "Stopped", + 7: "Enabled Not Running", + 8: "Encoder Fault", + 9: "Energy Management", + 10: "ESTOP Was Actuated", + 11: "EStopped", + 12: "EStopped Locally", + 13: "Extended Faulted", + 14: "Full", + 15: "Gaylord Start Pressed", + 16: "Jam Fault", + 17: "Jammed", + 18: "Loading Allowed", + 19: "Loading Not Allowed", + 20: "Low Air Pressure Fault Was Present", + 21: "Maintenance Mode", + 22: "Conveyor Stopped In Maintenance Mode", + 23: "Motor Faulted", + 24: "Motor Was Faulted", + 25: "Normal", + 26: "Off Inactive", + 27: "Open", + 28: "PLC Ready To Run", + 29: "Package Release Pressed", + 30: "Power Branch Was Faulted", + 31: "Pressed", + 32: "Ready To Receive", + 33: "Running", + 34: "Started", + 35: "Stopped", + 36: "System Started", + 37: "Unknown", + 38: "VFD Fault", + 39: "Conveyor Running In Power Saving Mode", + 40: "Conveyor Jogging In Maintenance Mode", + 41: "VFD Reset Required", + 42: "Jam Reset Push Button Pressed", + 43: "Start Push Button Pressed", + 44: "Stop Push Button Pressed", + 45: "No Container", + 46: "Ready To Be Enabled", + 47: "Half Full", + 48: "Enabled", + 49: "Tipper Faulted" + } + + try: + for dev_name, info in global_device_mapping.items(): + tagPath = info.get("tagPath", "") + status_value = "" + provider = "[" + self.session.custom.fc + "_SCADA_TAG_PROVIDER]" + path = provider + tagPath + "/State" + + if tagPath: + try: + result = system.tag.readBlocking([path])[0] + status_value = state_mappings.get(result.value, "Unknown") + except: + status_value = "Unknown" + + rows.append([dev_name, status_value]) + + return system.dataset.toDataSet(headers, rows) + + except Exception as e: + system.perspective.print("Error building device table: %s" % e) + return system.dataset.toDataSet(headers, []) + +def getAllTags(self, tagPath): + """ + Reads all tags under a UDT instance 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 + + Returns: + system.dataset: Dataset with columns ["Name", "OPC Path", "Value"] + """ + headers = ["Name", "OPC Path", "Value"] + rows = [] + + try: + # Determine the tag provider + path = "[" + self.session.custom.fc + "_SCADA_TAG_PROVIDER]" + tagPath + + # 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] + + # 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" + + rows.append([name, fullPath, value]) + + 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 diff --git a/.resources/be0093225614f457f2e00525558c9ecb0ac37456e69043ca0cab2c03c2f2b999 b/.resources/3621c70033f7bc093dacfd177bed3662e44cdd2e48141a4f9ce0d18d0408b334 similarity index 99% rename from .resources/be0093225614f457f2e00525558c9ecb0ac37456e69043ca0cab2c03c2f2b999 rename to .resources/3621c70033f7bc093dacfd177bed3662e44cdd2e48141a4f9ce0d18d0408b334 index 86ca0e53..0511f564 100644 --- a/.resources/be0093225614f457f2e00525558c9ecb0ac37456e69043ca0cab2c03c2f2b999 +++ b/.resources/3621c70033f7bc093dacfd177bed3662e44cdd2e48141a4f9ce0d18d0408b334 @@ -156,7 +156,6 @@ }, "props": { "params": { - "key": "value", "tagProps": [ "System/MCM01/Conveyor/PS3_1", "value", @@ -249,7 +248,6 @@ }, "props": { "params": { - "key": "value", "tagProps": [ "System/MCM01/Conveyor/PS3_2", "value", @@ -3002,7 +3000,6 @@ }, "props": { "params": { - "forceFaultStatus": null, "name": "red", "tagProps": [ "System/MCM01/Conveyor/VFD/UL14_1_VFD1", @@ -4274,7 +4271,7 @@ }, { "meta": { - "name": "PS3_3_SIO1" + "name": "PS3_2_SIO1" }, "position": { "height": 0.0204, @@ -4285,7 +4282,7 @@ "props": { "params": { "tagProps": [ - "System/MCM01/SIO/PS3_3_SIO1", + "System/MCM01/SIO/PS3_2_SIO1", "value", "value", "value", diff --git a/.resources/d0fddea81868108a8389f534f8443a92bca0c200ceafc3e87a7d85d480818424 b/.resources/3658254c84837ed75aaa6a0d01d6989c67f09aa5552888a226ac3ce3a9d91a13 similarity index 57% rename from .resources/d0fddea81868108a8389f534f8443a92bca0c200ceafc3e87a7d85d480818424 rename to .resources/3658254c84837ed75aaa6a0d01d6989c67f09aa5552888a226ac3ce3a9d91a13 index 76ddf0f4..b29e27df 100644 --- a/.resources/d0fddea81868108a8389f534f8443a92bca0c200ceafc3e87a7d85d480818424 +++ b/.resources/3658254c84837ed75aaa6a0d01d6989c67f09aa5552888a226ac3ce3a9d91a13 @@ -1,13 +1,11 @@ { "custom": { - "PLC_list": [ - "MCM01", - "MCM02" - ], + "PLC": "MCM01", "color": "#C2C2C2", - "state": "Closed" + "state": "Actuated" }, "params": { + "devices": [], "tagProps": [ "System/MCM01/Conveyor/UL15_1", "value", @@ -19,26 +17,22 @@ "value", "value", "value" - ] + ], + "tags": [] }, "propConfig": { - "custom.PLC_list": { + "custom.PLC": { "binding": { "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + "path": "view.params.tagProps[0]" }, "transforms": [ { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", + "code": "\treturn value.split(\"/\")[1]", "type": "script" } ], - "type": "tag" + "type": "property" }, "persistent": true }, @@ -172,7 +166,7 @@ }, "transforms": [ { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "expression": "coalesce({value},0)", "type": "expression" }, { @@ -384,14 +378,22 @@ }, "persistent": true }, + "params.devices": { + "paramDirection": "input", + "persistent": true + }, "params.tagProps": { "paramDirection": "input", "persistent": true + }, + "params.tags": { + "paramDirection": "input", + "persistent": true } }, "props": { "defaultSize": { - "width": 403 + "width": 600 } }, "root": { @@ -1621,971 +1623,554 @@ { "children": [ { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px" - }, - "props": { - "text": "Commands", - "textStyle": { - "color": "#060606" - } - }, - "type": "ia.display.label" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Speed_At_60Hz_30rev" - }, - "position": { - "basis": "50px", - "grow": 1 - }, - "propConfig": { - "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}/VFD_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN (60hz/30rev)\u0027)", - "type": "expression" - }, - { - "fallback": "Unknown (60hz/30rev)", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "Speed At 30 rev/s" - }, - { - "input": 0, - "output": "Speed At 60Hz" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "padding": 20 - }, - "textStyle": { - "color": "#7D7D7D" - } - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\n\tvfdType \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\" + self.view.params.tagProps[0] + \"/VFD_Type\"\n\tprop \u003d \"\"\n\t\n\tvfdTypeVal \u003d system.tag.readBlocking([vfdType])[0].value\n\t\n\tif vfdTypeVal \u003d\u003d 1:\n\t\tprop \u003d \"Speed_At_30rev\"\n\telse:\n\t\tprop \u003d \"Speed_At_60Hz\"\n\t\t\n\tpropHzRev \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\" + self.view.params.tagProps[0] + \"/\" + prop\n\tvalue \u003d self.props.value\n\tsystem.tag.writeAsync([propHzRev], [value])\n\t\t\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "NumericEntryField" - }, - "position": { - "basis": "150px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.value": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/VFD_Type" - }, - "transforms": [ - { - "code": "\n provider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n baseTag \u003d self.view.params.tagProps[0]\n basePath \u003d \"[\"+ provider + \"]\" + baseTag\n child \u003d \"\"\n \n\n if value \u003d\u003d 1:\n child \u003d \"Speed_At_30rev\"\n else:\n child \u003d \"Speed_At_60Hz\"\n\n fullPath \u003d basePath + \"/\" + child\n tagValue \u003d system.tag.readBlocking([fullPath])[0]\n result \u003d tagValue.value\n\t\n \n return result", - "type": "script" - }, - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "inputBounds": { - "maximum": 1000, - "minimum": 0 - } - }, - "type": "ia.input.numeric-entry-field" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "200px" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Speed_At_60Hz_30rev" - }, - "position": { - "basis": "46px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Cycle_Time_Factor" - }, - "position": { - "basis": "50px", - "grow": 1 - }, - "props": { - "style": { - "padding": 20 - }, - "text": "Cycle Time Factor", - "textStyle": { - "color": "#7D7D7D" - } - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpropMaintMode \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+ self.view.params.tagProps[0] + \"/Cycle_Time_Factor\"\n\tvalue \u003d self.props.value\n\tsystem.tag.writeAsync([propMaintMode], [value])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "NumericEntryField" - }, - "position": { - "basis": "150px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.value": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Cycle_Time_Factor" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "inputBounds": { - "maximum": 1000, - "minimum": 0 - } - }, - "type": "ia.input.numeric-entry-field" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "200px" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Cycle_Time_Factor" - }, - "position": { - "basis": "46px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], "meta": { - "name": "Commands" - }, - "position": { - "basis": "200px" - }, - "props": { - "alignContent": "flex-start", - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\tpropMaintMode \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Maintenance_Mode\"\n\tinMaintenanceMode \u003d system.tag.readBlocking([propMaintMode])[0].value\n\t\n\n\tsystem.tag.writeBlocking([propMaintMode], [not inMaintenanceMode])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Maintenance" - }, - "position": { - "basis": "34px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027#000000\u0027)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": false, - "output": "#0000FF" - }, - { - "input": true, - "output": "#7E5A5A" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce({value},\u0027Unknown\u0027)", - "type": "expression" - }, - { - "fallback": "Maintenance Mode: Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": false, - "output": "Activate Maintenance Mode" - }, - { - "input": true, - "output": "Disable Maintenance Mode" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "marginBottom": 10 - } - }, - "type": "ia.input.button" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "50px" - }, - "props": { - "text": "FPM", - "textStyle": { - "color": "#7D7D7D" - } - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpropMaintMode \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+ self.view.params.tagProps[0] + \"/Maintenance/Speed_FPM\"\n\tvalue \u003d self.props.value\n\tsystem.tag.writeAsync([propMaintMode], [value])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "NumericEntryField" - }, - "position": { - "basis": "150px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "if(\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || \r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0,\r\n {value},\r\n false\r\n)\r\n", - "type": "expression" - }, - { - "expression": "if(isNull({value}), false, {value})", - "type": "expression" - } - ], - "type": "tag" - } - }, - "props.value": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Speed_FPM" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "inputBounds": { - "maximum": 1000, - "minimum": 0 - } - }, - "type": "ia.input.numeric-entry-field" - } - ], - "meta": { - "name": "FPM" - }, - "position": { - "basis": "65px", - "shrink": 0 - }, - "props": { - "justify": "center", - "style": { - "marginBottom": 10 - } - }, - "type": "ia.container.flex" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Start_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Start" - }, - "position": { - "basis": "80px", - "shrink": 0 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Buttons_State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#00D900", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#00D900" - }, - { - "input": 1, - "output": "#00FF00" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Buttons_State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "START", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "STARTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "marginBottom": 10 - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Stop_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Stop" - }, - "position": { - "basis": "80px", - "shrink": 0 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Buttons_State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#D90000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#D90000" - }, - { - "input": 2, - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Buttons_State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "STOP", - "inputType": "scalar", - "mappings": [ - { - "input": 2, - "output": "STOPPED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "marginBottom": 10 - } - }, - "type": "ia.input.button" - }, - { - "events": { - "dom": { - "onMouseDown": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\tspeedFPM \u003d self.parent.getChild(\"FPM\").getChild(\"NumericEntryField\").props.value\n\tif (speedFPM !\u003d 0):\t\n\t\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Jog_PB_Pressed\"\n\t\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - }, - "onMouseUp": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\tspeedFPM \u003d self.parent.getChild(\"FPM\").getChild(\"NumericEntryField\").props.value\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Jog_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[False])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Jog" - }, - "position": { - "basis": "80px", - "shrink": 0 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Jog_PB_Pressed" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#00ACAC", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "#47FFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Jog_PB_Pressed" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "JOG", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "JOG PRESSED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "marginBottom": 10 - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Direction_PB_Pressed\"\n\tdirection \u003d system.tag.readBlocking([tag_path])[0].value\n\tsystem.tag.writeBlocking([tag_path], [not direction])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Direction" - }, - "position": { - "basis": "80px", - "shrink": 0 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Direction" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027Direction\u0027)", - "type": "expression" - }, - { - "fallback": "Direction Backward", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "Direction Forward" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "backgroundColor": "#095ECD", - "marginBottom": 10 - } - }, - "type": "ia.input.button" - } - ], - "custom": { - "errorMessage": "" - }, - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "500px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Maintenance" + "name": "Table" }, "position": { "basis": "400px", - "grow": 1 + "grow": 1, + "shrink": 0 }, - "props": { - "direction": "column", - "style": { - "marginTop": -40 + "propConfig": { + "props.data": { + "binding": { + "config": { + "path": "view.params.devices" + }, + "type": "property" + } } }, - "type": "ia.container.flex" + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Device", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Device" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 210 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Status", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Status" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 380 + } + ], + "pager": { + "bottom": false + }, + "selection": { + "enableRowSelection": false + }, + "virtualized": false + }, + "type": "ia.display.table" } ], "meta": { - "name": "Commands_tab" + "name": "Devices_tab" }, "position": { "tabIndex": 2 }, "props": { - "alignItems": "center", - "direction": "column", - "enabled": false, - "justify": "space-between", - "style": { - "paddingTop": 1 + "alignItems": "flex-start", + "justify": "space-evenly" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Table" + }, + "position": { + "basis": "400px", + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "path": "view.params.tags" + }, + "type": "property" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Name", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Name" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 130 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "OPC Path", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "OPC Path" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "OPC Path" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 350 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Value", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Value" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 100 + } + ], + "pager": { + "bottom": false + }, + "selection": { + "enableRowSelection": false + }, + "virtualized": false + }, + "type": "ia.display.table" } + ], + "meta": { + "name": "Tags_tab" + }, + "position": { + "tabIndex": 3 + }, + "props": { + "alignItems": "flex-start", + "justify": "space-evenly" }, "type": "ia.container.flex" } @@ -2597,7 +2182,7 @@ "grow": 1 }, "props": { - "currentTabIndex": 2, + "currentTabIndex": 3, "menuType": "modern", "tabSize": { "width": 1000 @@ -2623,7 +2208,8 @@ "tabs": [ "Alarms", "Info", - "Commands" + "Devices", + "Tags" ] }, "type": "ia.container.tab" diff --git a/.resources/389916f2d7b7cac8a361cb0e3622f86ba6de0286bb9260af03d6db4909b87bcd b/.resources/389916f2d7b7cac8a361cb0e3622f86ba6de0286bb9260af03d6db4909b87bcd deleted file mode 100644 index 2b969e0a..00000000 Binary files a/.resources/389916f2d7b7cac8a361cb0e3622f86ba6de0286bb9260af03d6db4909b87bcd and /dev/null differ diff --git a/.resources/a4e30995159973100a7155769b0e0aecd84f802d66e78d222d9c5e479ad6cb4d b/.resources/4bbcafab65a6aa7e38db91fa301115f82bdf2c4f81078ae5d058978282fa2a0e similarity index 86% rename from .resources/a4e30995159973100a7155769b0e0aecd84f802d66e78d222d9c5e479ad6cb4d rename to .resources/4bbcafab65a6aa7e38db91fa301115f82bdf2c4f81078ae5d058978282fa2a0e index eed39c22..412109b0 100644 --- a/.resources/a4e30995159973100a7155769b0e0aecd84f802d66e78d222d9c5e479ad6cb4d +++ b/.resources/4bbcafab65a6aa7e38db91fa301115f82bdf2c4f81078ae5d058978282fa2a0e @@ -1,6 +1,161 @@ { "custom": { - "FilteredViews": [] + "FilteredViews": [ + { + "Path": "autStand/Equipment/Beacon", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Button", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Camera", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Chute", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Conveyor", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Conveyor45", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Conveyor_Left90", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Conveyor_Right90", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/DPM", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/EPC", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Encoder", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Field_IO", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/JAM", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/MCM", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Photoeye_Tracking", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Photoeye_Long", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Photoeye_Chute", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/ProxSwitch", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/SS_Button", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Safety_IO", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/Solenoid", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + }, + { + "Path": "autStand/Equipment/VFD", + "instancePosition": {}, + "instanceStyle": { + "classes": "" + } + } + ] }, "events": { "system": { diff --git a/.resources/5364c091f830834b366843a110e56b15cce76e29552f22be76a8d28f387326bf b/.resources/5364c091f830834b366843a110e56b15cce76e29552f22be76a8d28f387326bf new file mode 100644 index 00000000..59d4c8d6 Binary files /dev/null and b/.resources/5364c091f830834b366843a110e56b15cce76e29552f22be76a8d28f387326bf differ diff --git a/.resources/5427c6172e2b4382f51d0327b2808784159d686e97c4d80938585dab63d16e74 b/.resources/5427c6172e2b4382f51d0327b2808784159d686e97c4d80938585dab63d16e74 deleted file mode 100644 index 7cae698f..00000000 Binary files a/.resources/5427c6172e2b4382f51d0327b2808784159d686e97c4d80938585dab63d16e74 and /dev/null differ diff --git a/.resources/56f6a96352f6e5f51cc2da6a980ffe9a9b5a54995d91d4c87b5ae0c43f2574c6 b/.resources/56f6a96352f6e5f51cc2da6a980ffe9a9b5a54995d91d4c87b5ae0c43f2574c6 new file mode 100644 index 00000000..1f89fc4f Binary files /dev/null and b/.resources/56f6a96352f6e5f51cc2da6a980ffe9a9b5a54995d91d4c87b5ae0c43f2574c6 differ diff --git a/.resources/ed764bb2d942de31c7b15c7a57fd60c990d972e59c0f214ef5a3bfaae9a7a3e7 b/.resources/57bea166d71eb107287bd2b328b1eb0841a8b3da0424af71ac4c042011ea4f8c similarity index 92% rename from .resources/ed764bb2d942de31c7b15c7a57fd60c990d972e59c0f214ef5a3bfaae9a7a3e7 rename to .resources/57bea166d71eb107287bd2b328b1eb0841a8b3da0424af71ac4c042011ea4f8c index 7c29df89..b8083f94 100644 --- a/.resources/ed764bb2d942de31c7b15c7a57fd60c990d972e59c0f214ef5a3bfaae9a7a3e7 +++ b/.resources/57bea166d71eb107287bd2b328b1eb0841a8b3da0424af71ac4c042011ea4f8c @@ -190,7 +190,7 @@ "dom": { "onClick": { "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})\t" + "script": "\tautStand.devices.build_device_mapping(self.view.params.tagProps[0])\n\tdevice_table_dataset \u003d autStand.devices.build_device_table(self)\n\ttags_table_dataset \u003d autStand.devices.getAllTags(self, self.view.params.tagProps[0])\n\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps, \"devices\": device_table_dataset, \"tags\":tags_table_dataset})" }, "scope": "G", "type": "script" diff --git a/.resources/5bc9e9b9a65045155f900e70479f6957e387736e1c07fcffcc508b8969cc2c7c b/.resources/5bc9e9b9a65045155f900e70479f6957e387736e1c07fcffcc508b8969cc2c7c deleted file mode 100644 index 421716b4..00000000 Binary files a/.resources/5bc9e9b9a65045155f900e70479f6957e387736e1c07fcffcc508b8969cc2c7c and /dev/null differ diff --git a/.resources/5d97cc4eb2098566c3ad26180b5c15a9e979741d1a47c2a1cb8f218c0dda7092 b/.resources/5d97cc4eb2098566c3ad26180b5c15a9e979741d1a47c2a1cb8f218c0dda7092 new file mode 100644 index 00000000..ad88e008 Binary files /dev/null and b/.resources/5d97cc4eb2098566c3ad26180b5c15a9e979741d1a47c2a1cb8f218c0dda7092 differ diff --git a/.resources/68f8f18abb7ce5e41ffc50ae11a5ecc9ebf4d81cddbaa1c077d8b247725a6541 b/.resources/68f8f18abb7ce5e41ffc50ae11a5ecc9ebf4d81cddbaa1c077d8b247725a6541 new file mode 100644 index 00000000..3bb37e1f --- /dev/null +++ b/.resources/68f8f18abb7ce5e41ffc50ae11a5ecc9ebf4d81cddbaa1c077d8b247725a6541 @@ -0,0 +1,643 @@ +{ + "custom": { + "color": "#C2C2C2", + "priority": "No Active Alarms", + "state": "Closed" + }, + "params": { + "angle": 0, + "directionLeft": true, + "tagProps": [ + "System/MCM01/Conveyor/VFD/UL1_3_VFD1", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] + }, + "propConfig": { + "custom.color": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "#000000", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "#C2C2C2" + }, + { + "input": 1, + "output": "#FF0000" + }, + { + "input": 2, + "output": "#FFA500" + }, + { + "input": 3, + "output": "#0008FF" + }, + { + "input": 4, + "output": "#00FF00" + }, + { + "input": 5, + "output": "#FFF700" + }, + { + "input": 6, + "output": "#87CEEB" + }, + { + "input": 7, + "output": "#90EE90" + }, + { + "input": 8, + "output": "#964B00" + }, + { + "input": 9, + "output": "#FFFFFF" + }, + { + "input": 10, + "output": "#000000" + }, + { + "input": 11, + "output": "#8B0000" + }, + { + "input": 12, + "output": "#808080" + }, + { + "input": 13, + "output": "#8B8000" + }, + { + "input": 14, + "output": "#006400" + }, + { + "input": 15, + "output": "#FFFFC5" + }, + { + "input": 16, + "output": "#00008B" + }, + { + "input": 17, + "output": "#FF7276" + }, + { + "input": 18, + "output": "#556B2F" + }, + { + "input": 19, + "output": "#B43434" + }, + { + "input": 20, + "output": "#4682B4" + }, + { + "input": 21, + "output": "#FFD700" + } + ], + "outputType": "color", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.priority": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": null, + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "No Active Alarms" + }, + { + "input": 1, + "output": "High" + }, + { + "input": 2, + "output": "Medium" + }, + { + "input": 3, + "output": "Low" + }, + { + "input": 4, + "output": "Diagnostic" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "custom.state": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "type": "expression" + }, + { + "fallback": "Unknown", + "inputType": "scalar", + "mappings": [ + { + "input": 0, + "output": "Closed" + }, + { + "input": 1, + "output": "Actuated" + }, + { + "input": 2, + "output": "Communication Faulted" + }, + { + "input": 3, + "output": "Conveyor Running In Maintenance Mode" + }, + { + "input": 4, + "output": "Disabled" + }, + { + "input": 5, + "output": "Disconnected" + }, + { + "input": 6, + "output": "Stopped" + }, + { + "input": 7, + "output": "Enabled Not Running" + }, + { + "input": 8, + "output": "Encoder Fault" + }, + { + "input": 9, + "output": "Energy Management" + }, + { + "input": 10, + "output": "ESTOP Was Actuated" + }, + { + "input": 11, + "output": "EStopped" + }, + { + "input": 12, + "output": "EStopped Locally" + }, + { + "input": 13, + "output": "Extended Faulted" + }, + { + "input": 14, + "output": "Full" + }, + { + "input": 15, + "output": "Gaylord Start Pressed" + }, + { + "input": 16, + "output": "Jam Fault" + }, + { + "input": 17, + "output": "Jammed" + }, + { + "input": 18, + "output": "Loading Allowed" + }, + { + "input": 19, + "output": "Loading Not Allowed" + }, + { + "input": 20, + "output": "Low Air Pressure Fault Was Present" + }, + { + "input": 21, + "output": "Maintenance Mode" + }, + { + "input": 22, + "output": "Conveyor Stopped In Maintenance Mode" + }, + { + "input": 23, + "output": "Motor Faulted" + }, + { + "input": 24, + "output": "Motor Was Faulted" + }, + { + "input": 25, + "output": "Normal" + }, + { + "input": 26, + "output": "Off Inactive" + }, + { + "input": 27, + "output": "Open" + }, + { + "input": 28, + "output": "PLC Ready To Run" + }, + { + "input": 29, + "output": "Package Release Pressed" + }, + { + "input": 30, + "output": "Power Branch Was Faulted" + }, + { + "input": 31, + "output": "Pressed" + }, + { + "input": 32, + "output": "Ready To Receive" + }, + { + "input": 33, + "output": "Running" + }, + { + "input": 34, + "output": "Started" + }, + { + "input": 35, + "output": "Stopped" + }, + { + "input": 36, + "output": "System Started" + }, + { + "input": 37, + "output": "Unknown" + }, + { + "input": 38, + "output": "VFD Fault" + }, + { + "input": 39, + "output": "Conveyor Running In Power Saving Mode" + }, + { + "input": 40, + "output": "Conveyor Jogging In Maintenance Mode" + }, + { + "input": 41, + "output": "VFD Reset Required" + }, + { + "input": 42, + "output": "Jam Reset Push Button Pressed" + }, + { + "input": 43, + "output": "Start Push Button Pressed" + }, + { + "input": 44, + "output": "Stop Push Button Pressed" + }, + { + "input": 45, + "output": "No Container" + }, + { + "input": 46, + "output": "Ready To Be Enabled" + }, + { + "input": 47, + "output": "Half Full" + }, + { + "input": 48, + "output": "Enabled" + }, + { + "input": 49, + "output": "Tipper Faulted" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + }, + "persistent": true + }, + "params.angle": { + "paramDirection": "input", + "persistent": true + }, + "params.directionLeft": { + "paramDirection": "input", + "persistent": true + }, + "params.tagProps": { + "paramDirection": "inout", + "persistent": true + } + }, + "props": { + "defaultSize": { + "height": 20, + "width": 29 + } + }, + "root": { + "children": [ + { + "meta": { + "name": "RunningStatus" + }, + "position": { + "grow": 1 + }, + "propConfig": { + "position.display": { + "binding": { + "config": { + "expression": "if(({view.custom.display_icon} || ({view.custom.show_running} \u0026\u0026 !{view.custom.show_error})) \u0026\u0026 !{view.params.directionLeft}, True, False)" + }, + "enabled": false, + "type": "expr" + } + }, + "props.elements[0].fill.paint": { + "binding": { + "config": { + "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" + }, + "type": "expr" + } + }, + "props.style.transform": { + "binding": { + "config": { + "fallbackDelay": 2.5, + "mode": "indirect", + "references": { + "0": "{view.params.tagProps[0]}", + "fc": "{session.custom.fc}" + }, + "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Direction" + }, + "transforms": [ + { + "expression": "coalesce({value},{view.params.forceFaultStatus},\"\")", + "type": "expression" + }, + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "scaleX(-1)" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "tag" + } + } + }, + "props": { + "elements": [ + { + "d": "M 5 15 L 45 15 L 60 25 L 60 55 L 20 55 L 5 45 Z M 5 15 L 15 5 L 55 5 L 60 25 M 45 15 L 55 5", + "fill": {}, + "name": "path", + "stroke": { + "paint": "#4c4c4c", + "width": "2" + }, + "type": "path" + } + ], + "style": { + "overflow": "hidden" + }, + "viewBox": "-1.5 -1.5 73 63" + }, + "type": "ia.shapes.svg" + } + ], + "events": { + "dom": { + "onClick": { + "config": { + "script": "\tsystem.perspective.openDock(\u0027Docked-Eas-TPR\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" + }, + "scope": "G", + "type": "script" + }, + "onDoubleClick": { + "config": { + "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" + }, + "enabled": false, + "scope": "G", + "type": "script" + }, + "onMouseEnter": { + "config": { + "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" + }, + "scope": "G", + "type": "script" + } + } + }, + "meta": { + "name": "root", + "tooltip": { + "enabled": true, + "location": "top-left", + "style": {} + } + }, + "propConfig": { + "meta.tooltip.style.classes": { + "binding": { + "config": { + "expression": "{view.custom.priority}" + }, + "transforms": [ + { + "fallback": "Alarms-Styles/NoAlarm", + "inputType": "scalar", + "mappings": [ + { + "input": "High", + "output": "Alarms-Styles/High" + }, + { + "input": "Medium", + "output": "Alarms-Styles/Medium" + }, + { + "input": "Low", + "output": "Alarms-Styles/Low" + }, + { + "input": "Diagnostic", + "output": "Alarms-Styles/Diagnostic" + } + ], + "outputType": "style-list", + "type": "map" + } + ], + "type": "expr" + } + }, + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" + }, + "type": "expr" + } + }, + "meta.visible": { + "binding": { + "config": { + "path": "session.custom.alarm_filter.show_running" + }, + "type": "property" + } + }, + "props.style.borderStyle": { + "binding": { + "config": { + "path": "view.custom.disconnected" + }, + "enabled": false, + "transforms": [ + { + "fallback": "", + "inputType": "scalar", + "mappings": [ + { + "input": true, + "output": "solid" + }, + { + "input": false, + "output": "none" + } + ], + "outputType": "scalar", + "type": "map" + } + ], + "type": "property" + } + } + }, + "props": { + "justify": "center", + "style": { + "borderColor": "#FF0000", + "borderStyle": "none", + "borderWidth": "2px", + "cursor": "pointer" + } + }, + "type": "ia.container.flex" + } +} \ No newline at end of file diff --git a/.resources/3425676516b9c8d0142034d9a8f48f2931050a4dbf46b7f99cd9d4fe38596645 b/.resources/69ebb64489257cd74ec83d4e53c2f1076d500ea205eab6949118fbc46b6f7481 similarity index 99% rename from .resources/3425676516b9c8d0142034d9a8f48f2931050a4dbf46b7f99cd9d4fe38596645 rename to .resources/69ebb64489257cd74ec83d4e53c2f1076d500ea205eab6949118fbc46b6f7481 index e5405084..1725948b 100644 --- a/.resources/3425676516b9c8d0142034d9a8f48f2931050a4dbf46b7f99cd9d4fe38596645 +++ b/.resources/69ebb64489257cd74ec83d4e53c2f1076d500ea205eab6949118fbc46b6f7481 @@ -53,7 +53,18 @@ }, "props": { "params": { - "key": "value" + "tagProps": [ + "System/MCM02/Conveyor/PS3_12", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] }, "path": "autStand/Equipment/Conveyor" }, diff --git a/.resources/737fcd8a93c3a4a4fafaafd0f7ada970278f418519518c4aee9a38b947a7d2bd b/.resources/737fcd8a93c3a4a4fafaafd0f7ada970278f418519518c4aee9a38b947a7d2bd deleted file mode 100644 index 50ccc975..00000000 Binary files a/.resources/737fcd8a93c3a4a4fafaafd0f7ada970278f418519518c4aee9a38b947a7d2bd and /dev/null differ diff --git a/.resources/a11e9a1d8d91c1f2a1d32968913a33055b5348b27d6b44cd4b7deb47d100e0b9 b/.resources/a11e9a1d8d91c1f2a1d32968913a33055b5348b27d6b44cd4b7deb47d100e0b9 deleted file mode 100644 index 36ab122a..00000000 Binary files a/.resources/a11e9a1d8d91c1f2a1d32968913a33055b5348b27d6b44cd4b7deb47d100e0b9 and /dev/null differ diff --git a/.resources/aa4ee6644895cc020d800a2c199c46222fcef9529a661ba9e4f0c601a4df97d3 b/.resources/aa4ee6644895cc020d800a2c199c46222fcef9529a661ba9e4f0c601a4df97d3 deleted file mode 100644 index be89a8b2..00000000 Binary files a/.resources/aa4ee6644895cc020d800a2c199c46222fcef9529a661ba9e4f0c601a4df97d3 and /dev/null differ diff --git a/.resources/37154af49c096e05cf7bcdf509f76c144b652e2a1112e523309439cd375a14fd b/.resources/aaf614d7fb4af32bc46a8f94cea5440f083aa18cb04e784296010d57e495a155 similarity index 99% rename from .resources/37154af49c096e05cf7bcdf509f76c144b652e2a1112e523309439cd375a14fd rename to .resources/aaf614d7fb4af32bc46a8f94cea5440f083aa18cb04e784296010d57e495a155 index 793ab165..24c98cc9 100644 --- a/.resources/37154af49c096e05cf7bcdf509f76c144b652e2a1112e523309439cd375a14fd +++ b/.resources/aaf614d7fb4af32bc46a8f94cea5440f083aa18cb04e784296010d57e495a155 @@ -428,7 +428,7 @@ "modal": false, "resizable": false, "show": "onDemand", - "size": 400, + "size": 600, "viewParams": {}, "viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv" }, @@ -596,7 +596,7 @@ "modal": false, "resizable": false, "show": "onDemand", - "size": 400, + "size": 600, "viewParams": {}, "viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv" }, diff --git a/.resources/aff02c503003a10fb6084db01ab885373d793b94956240c1cb54419f1e7fef3d b/.resources/aff02c503003a10fb6084db01ab885373d793b94956240c1cb54419f1e7fef3d new file mode 100644 index 00000000..cb3038cc Binary files /dev/null and b/.resources/aff02c503003a10fb6084db01ab885373d793b94956240c1cb54419f1e7fef3d differ diff --git a/.resources/bb0a0c63b2b82c15a3dc67827c4f7fa793dcb65c479fa888e99a1454b4bb11b0 b/.resources/b0df2ddca60ffe33f4d5d1693a26be226b0be30c85f3d8552f9ae6e391cf4d21 similarity index 99% rename from .resources/bb0a0c63b2b82c15a3dc67827c4f7fa793dcb65c479fa888e99a1454b4bb11b0 rename to .resources/b0df2ddca60ffe33f4d5d1693a26be226b0be30c85f3d8552f9ae6e391cf4d21 index 984d86b3..f3dcf10d 100644 --- a/.resources/bb0a0c63b2b82c15a3dc67827c4f7fa793dcb65c479fa888e99a1454b4bb11b0 +++ b/.resources/b0df2ddca60ffe33f4d5d1693a26be226b0be30c85f3d8552f9ae6e391cf4d21 @@ -830,7 +830,6 @@ } }, "props": { - "currentTabIndex": 2, "menuType": "modern", "tabSize": { "width": 1000 diff --git a/.resources/bf4b1acbbfbb62444f5c44072546b0d6e8b9f7dba633e1c0052e54166b601fcb b/.resources/bf4b1acbbfbb62444f5c44072546b0d6e8b9f7dba633e1c0052e54166b601fcb deleted file mode 100644 index bb2f5fac..00000000 Binary files a/.resources/bf4b1acbbfbb62444f5c44072546b0d6e8b9f7dba633e1c0052e54166b601fcb and /dev/null differ diff --git a/.resources/c90c67b8a39c6ab9ce53225ee80c73a3f1483cc0b49254c6b8fbcb5a316adb7c b/.resources/c90c67b8a39c6ab9ce53225ee80c73a3f1483cc0b49254c6b8fbcb5a316adb7c new file mode 100644 index 00000000..eb12a4d3 Binary files /dev/null and b/.resources/c90c67b8a39c6ab9ce53225ee80c73a3f1483cc0b49254c6b8fbcb5a316adb7c differ diff --git a/.resources/cb451ffd12ff1e2efb789147bc8d9e0d8a24e08b45cfd404e83428b0d23e5ad9 b/.resources/cb451ffd12ff1e2efb789147bc8d9e0d8a24e08b45cfd404e83428b0d23e5ad9 new file mode 100644 index 00000000..fba9a004 Binary files /dev/null and b/.resources/cb451ffd12ff1e2efb789147bc8d9e0d8a24e08b45cfd404e83428b0d23e5ad9 differ diff --git a/.resources/4f38789fc7c430a28baaf7710e679bd1c3106594ea3295a4f9ea1707f560564d b/.resources/d922b79f53031249606974467828954e7572c7640fc88b9375989a8fedb60f2b similarity index 99% rename from .resources/4f38789fc7c430a28baaf7710e679bd1c3106594ea3295a4f9ea1707f560564d rename to .resources/d922b79f53031249606974467828954e7572c7640fc88b9375989a8fedb60f2b index ee527f81..8fc7196e 100644 --- a/.resources/4f38789fc7c430a28baaf7710e679bd1c3106594ea3295a4f9ea1707f560564d +++ b/.resources/d922b79f53031249606974467828954e7572c7640fc88b9375989a8fedb60f2b @@ -3287,7 +3287,7 @@ "grow": 1 }, "props": { - "currentTabIndex": 2, + "currentTabIndex": 1, "menuType": "modern", "tabSize": { "width": 1000 diff --git a/.resources/f908280523b9caefbff0b3b1c2465d03a5dc1692f8cff4e435b5970363f66bd1 b/.resources/f908280523b9caefbff0b3b1c2465d03a5dc1692f8cff4e435b5970363f66bd1 new file mode 100644 index 00000000..af767bad Binary files /dev/null and b/.resources/f908280523b9caefbff0b3b1c2465d03a5dc1692f8cff4e435b5970363f66bd1 differ diff --git a/BNA8/com.inductiveautomation.perspective/page-config/config.json b/BNA8/com.inductiveautomation.perspective/page-config/config.json index 793ab165..24c98cc9 100644 --- a/BNA8/com.inductiveautomation.perspective/page-config/config.json +++ b/BNA8/com.inductiveautomation.perspective/page-config/config.json @@ -428,7 +428,7 @@ "modal": false, "resizable": false, "show": "onDemand", - "size": 400, + "size": 600, "viewParams": {}, "viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv" }, @@ -596,7 +596,7 @@ "modal": false, "resizable": false, "show": "onDemand", - "size": 400, + "size": 600, "viewParams": {}, "viewPath": "autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Conv" }, diff --git a/BNA8/com.inductiveautomation.perspective/page-config/resource.json b/BNA8/com.inductiveautomation.perspective/page-config/resource.json index 31907e84..dd622a1a 100644 --- a/BNA8/com.inductiveautomation.perspective/page-config/resource.json +++ b/BNA8/com.inductiveautomation.perspective/page-config/resource.json @@ -9,8 +9,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-04T14:13:10Z" + "timestamp": "2025-09-10T08:20:09Z" }, - "lastModificationSignature": "02a3fd1afca63b5162124a67cb4a784c58d8f416ea4c7abd469435cf6f5777ca" + "lastModificationSignature": "4604c221ea422bc2df7f817693ca918ac76a7b6deea75cc0f98f02304c3f589b" } } \ No newline at end of file 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 cde46916..7e17450f 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-10T06:49:04Z" + "timestamp": "2025-09-11T13:51:08Z" }, - "lastModificationSignature": "44f4fb4480d7e3818a23f3e6bc8b8f8fb62bc4849ebba282fd85b074289e1402" + "lastModificationSignature": "0d5aa46aa0f12e061d22c571ce45ba9752fc2950f666a99f1153bd736126c651" } } \ 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 50ccc975..eb12a4d3 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/Detailed_Views/MCM01-FLUID INBOUND/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/view.json index 86ca0e53..0511f564 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM01-FLUID INBOUND/view.json @@ -156,7 +156,6 @@ }, "props": { "params": { - "key": "value", "tagProps": [ "System/MCM01/Conveyor/PS3_1", "value", @@ -249,7 +248,6 @@ }, "props": { "params": { - "key": "value", "tagProps": [ "System/MCM01/Conveyor/PS3_2", "value", @@ -3002,7 +3000,6 @@ }, "props": { "params": { - "forceFaultStatus": null, "name": "red", "tagProps": [ "System/MCM01/Conveyor/VFD/UL14_1_VFD1", @@ -4274,7 +4271,7 @@ }, { "meta": { - "name": "PS3_3_SIO1" + "name": "PS3_2_SIO1" }, "position": { "height": 0.0204, @@ -4285,7 +4282,7 @@ "props": { "params": { "tagProps": [ - "System/MCM01/SIO/PS3_3_SIO1", + "System/MCM01/SIO/PS3_2_SIO1", "value", "value", "value", diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/resource.json index a3bf0fe6..255ea84e 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-09T14:19:22Z" + "timestamp": "2025-09-10T10:52:17Z" }, - "lastModificationSignature": "683c9c1c5b1fb4e19ed2274bbde72455648b29581be47b22839cbceaebef45fe" + "lastModificationSignature": "be8f9b14912997311b30491445b083d73b6008d021f37e0063c8cb4e7301b51a" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/thumbnail.png index 7cae698f..59d4c8d6 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/thumbnail.png differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/view.json index e5405084..1725948b 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Detailed_Views/MCM02-NC SORTER/view.json @@ -53,7 +53,18 @@ }, "props": { "params": { - "key": "value" + "tagProps": [ + "System/MCM02/Conveyor/PS3_12", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ] }, "path": "autStand/Equipment/Conveyor" }, diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Conveyor/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Conveyor/resource.json index 1a055719..d0487312 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Conveyor/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Conveyor/resource.json @@ -9,8 +9,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-09T16:29:55Z" + "timestamp": "2025-09-11T13:36:49Z" }, - "lastModificationSignature": "65ff29e1fcfd4476403a9de995a74ba26950ceb1e7c0e8418517e47c8bb3f419" + "lastModificationSignature": "9651f468fd3cab1023dfd80b86ab1fd43ea4b0f43b8ba04bd3c59ddd2bb652a3" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Conveyor/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Conveyor/view.json index 7c29df89..b8083f94 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Conveyor/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Conveyor/view.json @@ -190,7 +190,7 @@ "dom": { "onClick": { "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})\t" + "script": "\tautStand.devices.build_device_mapping(self.view.params.tagProps[0])\n\tdevice_table_dataset \u003d autStand.devices.build_device_table(self)\n\ttags_table_dataset \u003d autStand.devices.getAllTags(self, self.view.params.tagProps[0])\n\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps, \"devices\": device_table_dataset, \"tags\":tags_table_dataset})" }, "scope": "G", "type": "script" diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/resource.json index 3d2f7bc7..47525d6e 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-02T13:45:42Z" + "timestamp": "2025-09-10T07:53:32Z" }, - "lastModificationSignature": "bc77c0ec2c7d05aee6a4a8211df208458a47fffd138e162845eec2b13e46e83a" + "lastModificationSignature": "17f7c799be9fd0b4d841f4503eec436a243b32a33f1a1bb5cdc431ce4ad86c65" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/thumbnail.png index 2b969e0a..ad88e008 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/thumbnail.png differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/view.json index 984d86b3..f3dcf10d 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-Button/view.json @@ -830,7 +830,6 @@ } }, "props": { - "currentTabIndex": 2, "menuType": "modern", "tabSize": { "width": 1000 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 ce220a9d..1314e9c9 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-02T14:52:25Z" + "timestamp": "2025-09-11T14:00:54Z" }, - "lastModificationSignature": "736e305f35825b0e5643c4c38f95080c5fcd1d7430d699ef0a4e23d218c6e91c" + "lastModificationSignature": "cc7f5bc89bdbc61531f44eaa129785367a39a4c2b85cb158444ecb538d8348d4" } } \ 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 421716b4..fba9a004 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 76ddf0f4..b29e27df 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 @@ -1,13 +1,11 @@ { "custom": { - "PLC_list": [ - "MCM01", - "MCM02" - ], + "PLC": "MCM01", "color": "#C2C2C2", - "state": "Closed" + "state": "Actuated" }, "params": { + "devices": [], "tagProps": [ "System/MCM01/Conveyor/UL15_1", "value", @@ -19,26 +17,22 @@ "value", "value", "value" - ] + ], + "tags": [] }, "propConfig": { - "custom.PLC_list": { + "custom.PLC": { "binding": { "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" + "path": "view.params.tagProps[0]" }, "transforms": [ { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", + "code": "\treturn value.split(\"/\")[1]", "type": "script" } ], - "type": "tag" + "type": "property" }, "persistent": true }, @@ -172,7 +166,7 @@ }, "transforms": [ { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", + "expression": "coalesce({value},0)", "type": "expression" }, { @@ -384,14 +378,22 @@ }, "persistent": true }, + "params.devices": { + "paramDirection": "input", + "persistent": true + }, "params.tagProps": { "paramDirection": "input", "persistent": true + }, + "params.tags": { + "paramDirection": "input", + "persistent": true } }, "props": { "defaultSize": { - "width": 403 + "width": 600 } }, "root": { @@ -1621,971 +1623,554 @@ { "children": [ { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px" - }, - "props": { - "text": "Commands", - "textStyle": { - "color": "#060606" - } - }, - "type": "ia.display.label" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Speed_At_60Hz_30rev" - }, - "position": { - "basis": "50px", - "grow": 1 - }, - "propConfig": { - "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}/VFD_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN (60hz/30rev)\u0027)", - "type": "expression" - }, - { - "fallback": "Unknown (60hz/30rev)", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "Speed At 30 rev/s" - }, - { - "input": 0, - "output": "Speed At 60Hz" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "padding": 20 - }, - "textStyle": { - "color": "#7D7D7D" - } - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\n\tvfdType \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\" + self.view.params.tagProps[0] + \"/VFD_Type\"\n\tprop \u003d \"\"\n\t\n\tvfdTypeVal \u003d system.tag.readBlocking([vfdType])[0].value\n\t\n\tif vfdTypeVal \u003d\u003d 1:\n\t\tprop \u003d \"Speed_At_30rev\"\n\telse:\n\t\tprop \u003d \"Speed_At_60Hz\"\n\t\t\n\tpropHzRev \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\" + self.view.params.tagProps[0] + \"/\" + prop\n\tvalue \u003d self.props.value\n\tsystem.tag.writeAsync([propHzRev], [value])\n\t\t\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "NumericEntryField" - }, - "position": { - "basis": "150px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.value": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/VFD_Type" - }, - "transforms": [ - { - "code": "\n provider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n baseTag \u003d self.view.params.tagProps[0]\n basePath \u003d \"[\"+ provider + \"]\" + baseTag\n child \u003d \"\"\n \n\n if value \u003d\u003d 1:\n child \u003d \"Speed_At_30rev\"\n else:\n child \u003d \"Speed_At_60Hz\"\n\n fullPath \u003d basePath + \"/\" + child\n tagValue \u003d system.tag.readBlocking([fullPath])[0]\n result \u003d tagValue.value\n\t\n \n return result", - "type": "script" - }, - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "inputBounds": { - "maximum": 1000, - "minimum": 0 - } - }, - "type": "ia.input.numeric-entry-field" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "200px" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Speed_At_60Hz_30rev" - }, - "position": { - "basis": "46px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Cycle_Time_Factor" - }, - "position": { - "basis": "50px", - "grow": 1 - }, - "props": { - "style": { - "padding": 20 - }, - "text": "Cycle Time Factor", - "textStyle": { - "color": "#7D7D7D" - } - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpropMaintMode \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+ self.view.params.tagProps[0] + \"/Cycle_Time_Factor\"\n\tvalue \u003d self.props.value\n\tsystem.tag.writeAsync([propMaintMode], [value])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "NumericEntryField" - }, - "position": { - "basis": "150px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.value": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Cycle_Time_Factor" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "inputBounds": { - "maximum": 1000, - "minimum": 0 - } - }, - "type": "ia.input.numeric-entry-field" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "200px" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Cycle_Time_Factor" - }, - "position": { - "basis": "46px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], "meta": { - "name": "Commands" - }, - "position": { - "basis": "200px" - }, - "props": { - "alignContent": "flex-start", - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\tpropMaintMode \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Maintenance_Mode\"\n\tinMaintenanceMode \u003d system.tag.readBlocking([propMaintMode])[0].value\n\t\n\n\tsystem.tag.writeBlocking([propMaintMode], [not inMaintenanceMode])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Maintenance" - }, - "position": { - "basis": "34px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027#000000\u0027)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": false, - "output": "#0000FF" - }, - { - "input": true, - "output": "#7E5A5A" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce({value},\u0027Unknown\u0027)", - "type": "expression" - }, - { - "fallback": "Maintenance Mode: Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": false, - "output": "Activate Maintenance Mode" - }, - { - "input": true, - "output": "Disable Maintenance Mode" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "marginBottom": 10 - } - }, - "type": "ia.input.button" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "50px" - }, - "props": { - "text": "FPM", - "textStyle": { - "color": "#7D7D7D" - } - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpropMaintMode \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+ self.view.params.tagProps[0] + \"/Maintenance/Speed_FPM\"\n\tvalue \u003d self.props.value\n\tsystem.tag.writeAsync([propMaintMode], [value])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "NumericEntryField" - }, - "position": { - "basis": "150px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "if(\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || \r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0,\r\n {value},\r\n false\r\n)\r\n", - "type": "expression" - }, - { - "expression": "if(isNull({value}), false, {value})", - "type": "expression" - } - ], - "type": "tag" - } - }, - "props.value": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Speed_FPM" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "inputBounds": { - "maximum": 1000, - "minimum": 0 - } - }, - "type": "ia.input.numeric-entry-field" - } - ], - "meta": { - "name": "FPM" - }, - "position": { - "basis": "65px", - "shrink": 0 - }, - "props": { - "justify": "center", - "style": { - "marginBottom": 10 - } - }, - "type": "ia.container.flex" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Start_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Start" - }, - "position": { - "basis": "80px", - "shrink": 0 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Buttons_State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#00D900", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#00D900" - }, - { - "input": 1, - "output": "#00FF00" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Buttons_State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "START", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "STARTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "marginBottom": 10 - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Stop_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Stop" - }, - "position": { - "basis": "80px", - "shrink": 0 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Buttons_State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#D90000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#D90000" - }, - { - "input": 2, - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Buttons_State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "STOP", - "inputType": "scalar", - "mappings": [ - { - "input": 2, - "output": "STOPPED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "marginBottom": 10 - } - }, - "type": "ia.input.button" - }, - { - "events": { - "dom": { - "onMouseDown": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\tspeedFPM \u003d self.parent.getChild(\"FPM\").getChild(\"NumericEntryField\").props.value\n\tif (speedFPM !\u003d 0):\t\n\t\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Jog_PB_Pressed\"\n\t\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - }, - "onMouseUp": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\tspeedFPM \u003d self.parent.getChild(\"FPM\").getChild(\"NumericEntryField\").props.value\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Jog_PB_Pressed\"\n\tsystem.tag.writeBlocking([tag_path],[False])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Jog" - }, - "position": { - "basis": "80px", - "shrink": 0 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Jog_PB_Pressed" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#00ACAC", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "#47FFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Jog_PB_Pressed" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "JOG", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "JOG PRESSED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "marginBottom": 10 - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Direction_PB_Pressed\"\n\tdirection \u003d system.tag.readBlocking([tag_path])[0].value\n\tsystem.tag.writeBlocking([tag_path], [not direction])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Direction" - }, - "position": { - "basis": "80px", - "shrink": 0 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Maintenance_Mode" - }, - "transforms": [ - { - "expression": "coalesce(\r\n {value},\r\n {view.params.forceFaultStatus},\r\n False\r\n) \u0026\u0026 (\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 ||\r\n indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "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}/Maintenance/Direction" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027Direction\u0027)", - "type": "expression" - }, - { - "fallback": "Direction Backward", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "Direction Forward" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "backgroundColor": "#095ECD", - "marginBottom": 10 - } - }, - "type": "ia.input.button" - } - ], - "custom": { - "errorMessage": "" - }, - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "500px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Maintenance" + "name": "Table" }, "position": { "basis": "400px", - "grow": 1 + "grow": 1, + "shrink": 0 }, - "props": { - "direction": "column", - "style": { - "marginTop": -40 + "propConfig": { + "props.data": { + "binding": { + "config": { + "path": "view.params.devices" + }, + "type": "property" + } } }, - "type": "ia.container.flex" + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Device", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Device" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 210 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Status", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Status" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 380 + } + ], + "pager": { + "bottom": false + }, + "selection": { + "enableRowSelection": false + }, + "virtualized": false + }, + "type": "ia.display.table" } ], "meta": { - "name": "Commands_tab" + "name": "Devices_tab" }, "position": { "tabIndex": 2 }, "props": { - "alignItems": "center", - "direction": "column", - "enabled": false, - "justify": "space-between", - "style": { - "paddingTop": 1 + "alignItems": "flex-start", + "justify": "space-evenly" + }, + "type": "ia.container.flex" + }, + { + "children": [ + { + "meta": { + "name": "Table" + }, + "position": { + "basis": "400px", + "grow": 1, + "shrink": 0 + }, + "propConfig": { + "props.data": { + "binding": { + "config": { + "path": "view.params.tags" + }, + "type": "property" + } + } + }, + "props": { + "columns": [ + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Name", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Name" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 130 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "OPC Path", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "OPC Path" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "OPC Path" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 350 + }, + { + "align": "center", + "boolean": "checkbox", + "dateFormat": "MM/DD/YYYY", + "editable": false, + "field": "Value", + "filter": { + "boolean": { + "condition": "" + }, + "date": { + "condition": "", + "value": "" + }, + "enabled": false, + "number": { + "condition": "", + "value": "" + }, + "string": { + "condition": "", + "value": "" + }, + "visible": "on-hover" + }, + "footer": { + "align": "center", + "justify": "left", + "style": { + "classes": "" + }, + "title": "" + }, + "header": { + "align": "center", + "justify": "center", + "style": { + "classes": "" + }, + "title": "Value" + }, + "justify": "center", + "nullFormat": { + "includeNullStrings": false, + "nullFormatValue": "", + "strict": false + }, + "number": "value", + "numberFormat": "0,0.##", + "progressBar": { + "bar": { + "color": "", + "style": { + "classes": "" + } + }, + "max": 100, + "min": 0, + "track": { + "color": "", + "style": { + "classes": "" + } + }, + "value": { + "enabled": true, + "format": "0,0.##", + "justify": "center", + "style": { + "classes": "" + } + } + }, + "render": "auto", + "resizable": true, + "sort": "none", + "sortable": true, + "strictWidth": false, + "style": { + "classes": "" + }, + "toggleSwitch": { + "color": { + "selected": "", + "unselected": "" + } + }, + "viewParams": {}, + "viewPath": "", + "visible": true, + "width": 100 + } + ], + "pager": { + "bottom": false + }, + "selection": { + "enableRowSelection": false + }, + "virtualized": false + }, + "type": "ia.display.table" } + ], + "meta": { + "name": "Tags_tab" + }, + "position": { + "tabIndex": 3 + }, + "props": { + "alignItems": "flex-start", + "justify": "space-evenly" }, "type": "ia.container.flex" } @@ -2597,7 +2182,7 @@ "grow": 1 }, "props": { - "currentTabIndex": 2, + "currentTabIndex": 3, "menuType": "modern", "tabSize": { "width": 1000 @@ -2623,7 +2208,8 @@ "tabs": [ "Alarms", "Info", - "Commands" + "Devices", + "Tags" ] }, "type": "ia.container.tab" diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/resource.json index 632bed75..b6f45d99 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-02T14:49:12Z" + "timestamp": "2025-09-10T07:56:52Z" }, - "lastModificationSignature": "27246210e54b3eb4f5cfaba54e4c440c3ae20b7b1829a0766d94f7362c93796d" + "lastModificationSignature": "d7208e9095befc233592771a00607908395c5ccacce1821ada57e3955c228fa6" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/thumbnail.png index be89a8b2..1f89fc4f 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/thumbnail.png differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json index ee527f81..8fc7196e 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Controller-Equipment/Information-Docked-East-MCM/view.json @@ -3287,7 +3287,7 @@ "grow": 1 }, "props": { - "currentTabIndex": 2, + "currentTabIndex": 1, "menuType": "modern", "tabSize": { "width": 1000 diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Legend_Popup/Legend-popup-view/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Legend_Popup/Legend-popup-view/resource.json index 9b8c6969..7d96aa94 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Legend_Popup/Legend-popup-view/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Legend_Popup/Legend-popup-view/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-10T07:16:44Z" + "timestamp": "2025-09-10T07:18:12Z" }, - "lastModificationSignature": "1fbbd48f74c3d1f7cb590d090d3d808a1acd6e136d8d28d8010bc3f43271ca6d" + "lastModificationSignature": "2b540246a675bc0678874102553f75fa14c2d6fdd3f49011d4c2cb479030f3d1" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Legend_Popup/Legend-popup-view/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Legend_Popup/Legend-popup-view/thumbnail.png index e5dcf8f4..cb3038cc 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Legend_Popup/Legend-popup-view/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/PopUp-Views/Legend_Popup/Legend-popup-view/thumbnail.png differ diff --git a/BNA8/ignition/script-python/autStand/devices/code.py b/BNA8/ignition/script-python/autStand/devices/code.py new file mode 100644 index 00000000..ba782d92 --- /dev/null +++ b/BNA8/ignition/script-python/autStand/devices/code.py @@ -0,0 +1,213 @@ +import os, json, sys + +global_device_mapping = {} + +def build_device_mapping(full_tag_path): + """ + Builds global_device_mapping for devices that: + - Belong to the same PLC (index 1) + - Are children of the clicked device (start with clicked_name + "_") + """ + global global_device_mapping + global_device_mapping.clear() + + try: + # Parse PLC and clicked device + path_parts = full_tag_path.split("/") + plc_name = path_parts[1] if len(path_parts) > 1 else path_parts[0] + clicked_name = path_parts[-1] if len(path_parts) > 0 else "" + + project_name = system.util.getProjectName() + base_path = ( + os.getcwd().replace("\\", "/") + + "/data/projects/" + + project_name + + "/com.inductiveautomation.perspective/Views/autStand/Detailed_Views" + ) + + if not os.path.exists(base_path): + system.perspective.print("Path not found: " + base_path) + return {} + + # loop through all view folders + for view_folder in os.listdir(base_path): + json_file = os.path.join(base_path, view_folder, "view.json") + if not os.path.isfile(json_file): + continue + + try: + with open(json_file, "r") as fh: + view_json = json.load(fh) + except Exception: + continue + + # go one level deeper: root -> children[0] (coordinateContainer) -> its children + root_children = (view_json.get("root") or {}).get("children") or [] + if not root_children: + continue + + container = root_children[0] + children = container.get("children") or [] + + for child in children: + props = child.get("props") or {} + params = props.get("params") or {} + tag_props = params.get("tagProps") + + if isinstance(tag_props, list) and len(tag_props) > 0: + tag_prop = str(tag_props[0]) + parts = tag_prop.split("/") + + if len(parts) > 1 and parts[1] == plc_name: + dev_name = parts[-1] + + # ONLY include devices that are children of clicked_name + prefix = clicked_name + "_" + if dev_name.startswith(prefix): + global_device_mapping[dev_name] = { + "tagPath": tag_prop, + "zone": view_folder + } + + return global_device_mapping + + except Exception as e: + whid = "unknown" + try: + whid = system.tag.readBlocking("Configuration/FC")[0].value + except: + pass + logger = system.util.getLogger("%s-build_device_mapping" % whid) + exc_type, exc_obj, tb = sys.exc_info() + logger.error("Error at line %s: %s" % (tb.tb_lineno, exc_obj)) + return {} + +def build_device_table(self): + """ + Converts global_device_mapping into a dataset: + Columns: Device, Status + Reads each tag value, falls back to 'Unknown' if error/null. + """ + headers = ["Device", "Status"] + rows = [] + state_mappings = { + 0: "Closed", + 1: "Actuated", + 2: "Communication Faulted", + 3: "Conveyor Running In Maintenance Mode", + 4: "Disabled", + 5: "Disconnected", + 6: "Stopped", + 7: "Enabled Not Running", + 8: "Encoder Fault", + 9: "Energy Management", + 10: "ESTOP Was Actuated", + 11: "EStopped", + 12: "EStopped Locally", + 13: "Extended Faulted", + 14: "Full", + 15: "Gaylord Start Pressed", + 16: "Jam Fault", + 17: "Jammed", + 18: "Loading Allowed", + 19: "Loading Not Allowed", + 20: "Low Air Pressure Fault Was Present", + 21: "Maintenance Mode", + 22: "Conveyor Stopped In Maintenance Mode", + 23: "Motor Faulted", + 24: "Motor Was Faulted", + 25: "Normal", + 26: "Off Inactive", + 27: "Open", + 28: "PLC Ready To Run", + 29: "Package Release Pressed", + 30: "Power Branch Was Faulted", + 31: "Pressed", + 32: "Ready To Receive", + 33: "Running", + 34: "Started", + 35: "Stopped", + 36: "System Started", + 37: "Unknown", + 38: "VFD Fault", + 39: "Conveyor Running In Power Saving Mode", + 40: "Conveyor Jogging In Maintenance Mode", + 41: "VFD Reset Required", + 42: "Jam Reset Push Button Pressed", + 43: "Start Push Button Pressed", + 44: "Stop Push Button Pressed", + 45: "No Container", + 46: "Ready To Be Enabled", + 47: "Half Full", + 48: "Enabled", + 49: "Tipper Faulted" + } + + try: + for dev_name, info in global_device_mapping.items(): + tagPath = info.get("tagPath", "") + status_value = "" + provider = "[" + self.session.custom.fc + "_SCADA_TAG_PROVIDER]" + path = provider + tagPath + "/State" + + if tagPath: + try: + result = system.tag.readBlocking([path])[0] + status_value = state_mappings.get(result.value, "Unknown") + except: + status_value = "Unknown" + + rows.append([dev_name, status_value]) + + return system.dataset.toDataSet(headers, rows) + + except Exception as e: + system.perspective.print("Error building device table: %s" % e) + return system.dataset.toDataSet(headers, []) + +def getAllTags(self, tagPath): + """ + Reads all tags under a UDT instance 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 + + Returns: + system.dataset: Dataset with columns ["Name", "OPC Path", "Value"] + """ + headers = ["Name", "OPC Path", "Value"] + rows = [] + + try: + # Determine the tag provider + path = "[" + self.session.custom.fc + "_SCADA_TAG_PROVIDER]" + tagPath + + # 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] + + # 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" + + rows.append([name, fullPath, value]) + + 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 diff --git a/BNA8/ignition/script-python/autStand/devices/resource.json b/BNA8/ignition/script-python/autStand/devices/resource.json new file mode 100644 index 00000000..fd0ea084 --- /dev/null +++ b/BNA8/ignition/script-python/autStand/devices/resource.json @@ -0,0 +1,17 @@ +{ + "scope": "A", + "version": 1, + "restricted": false, + "overridable": true, + "files": [ + "code.py" + ], + "attributes": { + "lastModification": { + "actor": "admin", + "timestamp": "2025-09-11T14:21:44Z" + }, + "hintScope": 2, + "lastModificationSignature": "ac100dce34bb5394c6ec164e067a535fc23d24c32e0c752058d22c189107f89f" + } +} \ No newline at end of file diff --git a/conversion-report.txt b/conversion-report.txt index 90090b76..790af8a5 100644 --- a/conversion-report.txt +++ b/conversion-report.txt @@ -20,3 +20,7 @@ Starting conversion: 20250909:10.44.27 Conversion finished. Elapsed time: 10 ms Starting conversion: 20250910:10.51.22 Conversion finished. Elapsed time: 11 ms +Starting conversion: 20250910:19.14.58 +Conversion finished. Elapsed time: 10 ms +Starting conversion: 20250910:19.17.28 +Conversion finished. Elapsed time: 11 ms