{ "custom": { "allTags": [ { "dataType": "Int4", "instancePosition": {}, "instanceStyle": { "classes": "" }, "name": "Fail To Run Delay Setpoint" }, { "dataType": "Int4", "instancePosition": {}, "instanceStyle": { "classes": "" }, "name": "Fail To Stop Delay Setpoint" }, { "dataType": "Float4", "instancePosition": {}, "instanceStyle": { "classes": "" }, "name": "Minimum Speed Setpoint" }, { "dataType": "Boolean", "instancePosition": {}, "instanceStyle": { "classes": "" }, "name": "Reset Required" }, { "dataType": "Int4", "instancePosition": {}, "instanceStyle": { "classes": "" }, "name": "Speed Command Raw Maximum" }, { "dataType": "Int4", "instancePosition": {}, "instanceStyle": { "classes": "" }, "name": "Speed Command Raw Minimum" }, { "dataType": "Int4", "instancePosition": {}, "instanceStyle": { "classes": "" }, "name": "Speed Feedback Raw Maximum" }, { "dataType": "Int4", "instancePosition": {}, "instanceStyle": { "classes": "" }, "name": "Speed Feedback Raw Minimum" } ] }, "params": { "auth": { "almAck": true, "almShelve": true, "config": true, "control": true }, "tagPath": "[Ignition_Common_IO_Gtwy]MPR1140/SATB1_MPR1140_VFD08" }, "propConfig": { "custom.allTags": { "binding": { "config": { "struct": { "tagPath": "{view.params.tagPath} + \"/Config\"" }, "waitOnAll": true }, "enabled": false, "transforms": [ { "code": "\toutput \u003d []\n\ttry:\n\t\t# Simulate fetching tag configurations and sorting by name\n\t\tnodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n\t\tfor item in nodes:\n\t\t if \u0027tags\u0027 in item:\n\t\t \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n\t\t \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027) if x.get(\u0027engUnit\u0027, \u0027misc\u0027) !\u003d \"\" else \u0027misc\u0027)\n\t\t \t\n\t for tagConfig in sortedTags:\n\t if str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t name \u003d tagConfig.get(\"name\", \"\")\n\t dataType \u003d tagConfig.get(\"dataType\", \"\")\n\t tagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t instance \u003d {\n\t \"instanceStyle\": {\n\t \"classes\": \"\"\n\t },\n\t \"instancePosition\": {},\n\t \"name\": name,\n\t \"dataType\": dataType\n\t }\n\t # Group based on name containing \u0027Power\u0027, \u0027Current\u0027, or \u0027Voltage\u0027\n\t output.append(instance)\n\t\t\n\t\t# Return or process the sorted output\n\t\treturn output\n\texcept:\n\t\treturn output", "type": "script" } ], "type": "expr-struct" }, "persistent": true }, "params.auth": { "paramDirection": "input", "persistent": true }, "params.tagPath": { "paramDirection": "input", "persistent": true } }, "props": {}, "root": { "children": [ { "meta": { "name": "FlexRepeater" }, "position": { "basis": "100%" }, "propConfig": { "props.instances": { "binding": { "config": { "struct": { "allTags": "{view.custom.allTags}", "auth": "{view.params.auth.config}", "tagPath": "{view.params.tagPath} + \"/Config\"" }, "waitOnAll": true }, "transforms": [ { "code": "\toutput \u003d []\n\tallTags \u003d system.util.jsonDecode(system.util.jsonEncode(value[\u0027allTags\u0027]))\n\t\n\tfor tag in allTags:\n\t\ttagName \u003d tag[\"name\"]\n\t\ttag[\"tagPath\"] \u003d value[\"tagPath\"] + \"/\" +tagName\n\t\ttag[\u0027enabled\u0027] \u003d value[\u0027auth\u0027]\n\t\toutput.append(tag)\n\t\t\n\treturn output", "type": "script" } ], "type": "expr-struct" } } }, "props": { "alignContent": "flex-start", "elementPosition": { "basis": "50%", "grow": 0 }, "loading": { "order": "with-parent" }, "path": "Library/Framework/Tag Config", "style": { "border": "1px solid var(--border)", "gap": "10px 0", "padding": "10px" }, "useDefaultViewHeight": false, "useDefaultViewWidth": false, "wrap": "wrap" }, "type": "ia.display.flex-repeater" } ], "meta": { "name": "root" }, "props": { "direction": "column", "style": { "classes": "containers/padded-container" } }, "type": "ia.container.flex" } }