2026-04-24 FE Backup

This commit is contained in:
2026-04-24 12:37:16 +00:00
parent ace79b82f7
commit 0ba11a23b8
3705 changed files with 1240402 additions and 0 deletions

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -0,0 +1,227 @@
{
"custom": {},
"params": {
"TagId": "value"
},
"propConfig": {
"params.TagId": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 224,
"width": 701
}
},
"root": {
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "32px"
},
"props": {
"text": "GEN Resume",
"textStyle": {
"fontSize": 18,
"fontWeight": "bold",
"paddingLeft": 15
}
},
"type": "ia.display.label"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "SimpleGauge"
},
"position": {
"grow": 1
},
"props": {
"arc": {
"cornerRadius": 5
},
"endAngle": 425,
"label": {
"maxDecimal": 0,
"offsetY": 22,
"units": "/35"
},
"maxValue": 35,
"startAngle": 120,
"value": 15
},
"type": "ia.chart.simple-gauge"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "32px"
},
"props": {
"text": "Ready",
"textStyle": {
"fontSize": 18,
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "SimpleGauge"
},
"position": {
"grow": 1
},
"props": {
"arc": {
"cornerRadius": 5
},
"endAngle": 425,
"label": {
"maxDecimal": 0,
"offsetY": 22,
"units": "/35"
},
"maxValue": 35,
"startAngle": 120,
"value": 18
},
"type": "ia.chart.simple-gauge"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "32px"
},
"props": {
"text": "Running",
"textStyle": {
"fontSize": 18,
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer_0"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "SimpleGauge"
},
"position": {
"grow": 1
},
"props": {
"arc": {
"cornerRadius": 5
},
"endAngle": 425,
"label": {
"color": "#EF4341",
"maxDecimal": 0,
"offsetY": 22,
"units": "/35"
},
"maxValue": 35,
"startAngle": 120,
"value": 2
},
"type": "ia.chart.simple-gauge"
},
{
"meta": {
"name": "Label"
},
"position": {
"basis": "32px"
},
"props": {
"text": "Faulted",
"textStyle": {
"fontSize": 18,
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer_1"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "212px"
},
"props": {
"justify": "space-evenly",
"style": {
"overflow": "visible"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"backgroundColor": "#E3E3E3",
"borderBottomLeftRadius": 5,
"borderBottomRightRadius": 5,
"borderTopLeftRadius": 5,
"borderTopRightRadius": 5,
"borderWidth": 3,
"marginBottom": 10,
"marginLeft": 10,
"marginRight": 10,
"marginTop": 10,
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -0,0 +1,106 @@
{
"custom": {
"allTags": []
},
"params": {
"auth": {
"almAck": true,
"almShelve": true,
"config": true,
"control": true
},
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_CH31_SYSTEM"
},
"propConfig": {
"custom.allTags": {
"binding": {
"config": {
"struct": {
"tagPath": "{view.params.tagPath} + \"/Config\""
},
"waitOnAll": true
},
"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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

View File

@@ -0,0 +1,9 @@
SELECT
id,
body,
last_updated,
last_updated_by
FROM
tag_notes
WHERE
tag_path = :tagPath

View File

@@ -0,0 +1,480 @@
{
"custom": {
"trendConfig": {}
},
"params": {
"selectedPens": [],
"tagPath": "[Ignition_SATB1_IO2_default]GAL1271/SATB1_GAL1271_PDU_P2-4-3"
},
"propConfig": {
"custom.trendConfig": {
"persistent": true
},
"custom.trendConfig.allPens": {
"binding": {
"config": {
"struct": {
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"custom.trendConfig.selectedPens": {
"binding": {
"config": {
"path": "view.params.selectedPens"
},
"type": "property"
}
},
"params.selectedPens": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"width": 1200
}
},
"root": {
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "ToggleSwitch"
},
"position": {
"basis": "34px",
"shrink": 0
},
"props": {
"label": {
"text": "Table View"
}
},
"type": "ia.input.toggle-switch"
},
{
"meta": {
"name": "FlexRepeater"
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"struct": {
"allPens": "{view.custom.trendConfig.allPens}",
"selectedPens": "{view.custom.trendConfig.selectedPens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"direction": "column",
"elementPosition": {
"basis": "auto",
"grow": 0,
"shrink": 0
},
"loading": {
"order": "with-parent"
},
"path": "Library/Templates/Framework/Pen List",
"useDefaultViewHeight": false,
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
}
],
"meta": {
"name": "Pens Lists"
},
"position": {
"basis": "250px"
},
"props": {
"direction": "column",
"style": {
"border": "1px solid var(--border)",
"border-right": "none"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"domId": "CustomPowerChart",
"name": "Power Chart"
},
"position": {
"basis": "800px",
"grow": 1
},
"propConfig": {
"custom.pens": {
"binding": {
"config": {
"struct": {
"axes": "{this.props.axes}",
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
"type": "script"
},
{
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"position.display": {
"binding": {
"config": {
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
},
"type": "expr"
}
},
"props.axes": {
"binding": {
"config": {
"struct": {
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"props.config": {
"onChange": {
"enabled": null,
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
}
},
"props.pens": {
"binding": {
"config": {
"struct": {
"enabledPens": "{view.custom.trendConfig.selectedPens}",
"pens": "{this.custom.pens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"config": {
"endDate": {
"$": [
"ts",
0,
1731972292627
],
"$ts": 1730879940000
},
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
"responsiveDesignWidth": 100,
"startDate": {
"$": [
"ts",
0,
1731972292627
],
"$ts": 1730733759000
},
"unitOfTime": 2,
"visibility": {
"buttons": {
"showAnnotationButton": false,
"showSettingsButton": false,
"showTagBrowserButton": false
}
}
},
"interaction": {
"chartZoomLevel": 1,
"rangeZoomLevel": 1
},
"plots": [
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 2,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 1,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 1,
"style": {
"classes": ""
}
}
]
},
"type": "ia.chart.powerchart"
},
{
"children": [
{
"meta": {
"name": "Label",
"visible": false
},
"position": {
"basis": "200px"
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Power Chart.props.pens"
},
"transforms": [
{
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"color": "--neutral-80",
"fontSize": "14px",
"marginTop": "-143px",
"minHeight": "-143px"
},
"text": "Please select a tag."
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Pens Cont"
},
"position": {
"basis": "0px"
},
"props": {
"alignItems": "center",
"direction": "column",
"style": {
"overflow": "visible",
"zIndex": 0
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "TrendTable"
},
"position": {
"basis": "320px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Pens Lists/ToggleSwitch.props.selected"
},
"type": "property"
}
},
"props.params.historianSettings": {
"binding": {
"config": {
"path": "..../FlexContainer.custom.historianSettings"
},
"type": "property"
}
},
"props.params.selectedPens": {
"binding": {
"config": {
"path": "../Power Chart.props.pens"
},
"type": "property"
}
}
},
"props": {
"path": "Library/Templates/Framework/TrendTable"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "Chart Cont"
},
"position": {
"basis": "200px",
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"custom": {
"historianSettings": {
"dateFormat": "YYYY/MM/DD",
"endDate": {
"$": [
"ts",
192,
1747948194045
],
"$ts": 1730879940000
},
"export": {
"dateFormat": "None",
"timeFormat": "x"
},
"measureOfTime": "hours",
"mode": "realtime",
"penNamePathDepth": 1,
"pointCount": 300,
"rangeEndDate": null,
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
"rangeStartDate": null,
"refreshRate": 1000,
"responsiveDesignWidth": 100,
"startDate": {
"$": [
"ts",
192,
1747948194045
],
"$ts": 1730733759000
},
"tagBrowserStartPath": "",
"timeFormat": "h:mm A",
"unitOfTime": 2,
"visibility": {
"buttons": {
"showAnnotationButton": false,
"showFullscreenButton": true,
"showMoreButton": true,
"showPanZoomButton": true,
"showRangeBrushButton": true,
"showSettingsButton": false,
"showTagBrowserButton": false,
"showXTraceButton": true
},
"showDateRangeSelector": true,
"showPenControlDisplay": true,
"showTagBrowser": false
}
}
},
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "100%"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "containers/padded-container"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,426 @@
{
"custom": {
"tabsConfig": {
"tabs": [
"Status",
"Control",
"Config",
"Trend",
"Meta",
"Wiki"
]
},
"trendConfig": {
"selectedPens": []
}
},
"params": {
"auth": {
"almAck": true,
"almShelve": true,
"config": true,
"control": true
},
"objectName": "ValveC",
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/ValveC 1"
},
"propConfig": {
"custom.tabsConfig": {
"persistent": true
},
"custom.tabsConfig.showConfig": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagPath}"
},
"tagPath": "{1}/Config"
},
"transforms": [
{
"expression": "coalesce({value},false) !\u003d false",
"type": "expression"
}
],
"type": "tag"
}
},
"custom.tabsConfig.showControl": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagPath}"
},
"tagPath": "{1}/Control"
},
"transforms": [
{
"expression": "coalesce({value},false) !\u003d false",
"type": "expression"
}
],
"type": "tag"
}
},
"custom.trendConfig": {
"persistent": true
},
"params.auth": {
"paramDirection": "input",
"persistent": true
},
"params.objectName": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "Status"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Info\u0027)"
},
"type": "expr"
}
}
},
"props": {
"loading": {
"order": "with-parent"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Trend"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.selectedPens": {
"binding": {
"config": {
"path": "view.custom.trendConfig.selectedPens"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Trends\u0027)"
},
"type": "expr"
}
}
},
"props": {
"loading": {
"order": "with-parent"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Config"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.auth": {
"binding": {
"config": {
"path": "view.params.auth"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Config\u0027)"
},
"type": "expr"
}
}
},
"props": {
"loading": {
"order": "with-parent"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Meta"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.auth": {
"binding": {
"config": {
"path": "view.params.auth"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Meta\u0027)"
},
"type": "expr"
}
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Wiki"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.auth": {
"binding": {
"config": {
"path": "view.params.auth"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
}
},
"props": {
"path": "Library/Framework/Tag Notes/View Notes"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Control"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.auth": {
"binding": {
"config": {
"path": "view.params.auth"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Control\u0027)"
},
"type": "expr"
}
}
},
"props": {
"loading": {
"order": "with-parent"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "TabContainer"
},
"position": {
"basis": "300px",
"grow": 1
},
"propConfig": {
"props.tabs": {
"binding": {
"config": {
"expression": "{view.custom.tabsConfig}"
},
"transforms": [
{
"code": "\ttabs \u003d value[\u0027tabs\u0027]\n\tshowConfig \u003d value[\u0027showConfig\u0027]\n\tshowControl \u003d value[\u0027showControl\u0027]\n\tif not showConfig:\n\t\ttabs.pop(tabs.indexOf(\u0027Config\u0027))\n\tif not showControl:\n\t\ttabs.pop(tabs.indexOf(\u0027Control\u0027))\n\t\n\treturn tabs",
"type": "script"
}
],
"type": "expr"
}
}
},
"props": {
"contentStyle": {
"backgroundColor": "var(--container)"
}
},
"type": "ia.container.tab"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column"
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "enableDisablePen",
"pageScope": true,
"script": "\t# When a pen is selected or de-selected on the trends page, this handler is\n\t# responsible for appending or removing the pen name from the proper trend\n\t# config list.\n\t\n\tname \u003d payload[\u0027name\u0027]\n\tenabledOrDisabled \u003d payload[\u0027enabledOrDisabled\u0027]\n\tgroup \u003d payload[\u0027group\u0027]\n\t\n\tif enabledOrDisabled \u003d\u003d True:\n\t\tif name not in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].append(name)\n\telse:\n\t\tif name in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].remove(name)",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -0,0 +1,480 @@
{
"custom": {
"trendConfig": {}
},
"params": {
"selectedPens": [],
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Chiller 1"
},
"propConfig": {
"custom.trendConfig": {
"persistent": true
},
"custom.trendConfig.allPens": {
"binding": {
"config": {
"struct": {
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"custom.trendConfig.selectedPens": {
"binding": {
"config": {
"path": "view.params.selectedPens"
},
"type": "property"
}
},
"params.selectedPens": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"width": 1200
}
},
"root": {
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "ToggleSwitch"
},
"position": {
"basis": "34px",
"shrink": 0
},
"props": {
"label": {
"text": "Table View"
}
},
"type": "ia.input.toggle-switch"
},
{
"meta": {
"name": "FlexRepeater"
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"struct": {
"allPens": "{view.custom.trendConfig.allPens}",
"selectedPens": "{view.custom.trendConfig.selectedPens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"direction": "column",
"elementPosition": {
"basis": "auto",
"grow": 0,
"shrink": 0
},
"loading": {
"order": "with-parent"
},
"path": "Library/Templates/Framework/Pen List",
"useDefaultViewHeight": false,
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
}
],
"meta": {
"name": "Pens Lists"
},
"position": {
"basis": "250px"
},
"props": {
"direction": "column",
"style": {
"border": "1px solid var(--border)",
"border-right": "none"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"domId": "CustomPowerChart",
"name": "Power Chart"
},
"position": {
"basis": "800px",
"grow": 1
},
"propConfig": {
"custom.pens": {
"binding": {
"config": {
"struct": {
"axes": "{this.props.axes}",
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
"type": "script"
},
{
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"position.display": {
"binding": {
"config": {
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
},
"type": "expr"
}
},
"props.axes": {
"binding": {
"config": {
"struct": {
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"props.config": {
"onChange": {
"enabled": null,
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
}
},
"props.pens": {
"binding": {
"config": {
"struct": {
"enabledPens": "{view.custom.trendConfig.selectedPens}",
"pens": "{this.custom.pens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"config": {
"endDate": {
"$": [
"ts",
0,
1731972292627
],
"$ts": 1730879940000
},
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
"responsiveDesignWidth": 100,
"startDate": {
"$": [
"ts",
0,
1731972292627
],
"$ts": 1730733759000
},
"unitOfTime": 2,
"visibility": {
"buttons": {
"showAnnotationButton": false,
"showSettingsButton": false,
"showTagBrowserButton": false
}
}
},
"interaction": {
"chartZoomLevel": 1,
"rangeZoomLevel": 1
},
"plots": [
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 2,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 1,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 1,
"style": {
"classes": ""
}
}
]
},
"type": "ia.chart.powerchart"
},
{
"children": [
{
"meta": {
"name": "Label",
"visible": false
},
"position": {
"basis": "200px"
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Power Chart.props.pens"
},
"transforms": [
{
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"color": "--neutral-80",
"fontSize": "14px",
"marginTop": "-143px",
"minHeight": "-143px"
},
"text": "Please select a tag."
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Pens Cont"
},
"position": {
"basis": "0px"
},
"props": {
"alignItems": "center",
"direction": "column",
"style": {
"overflow": "visible",
"zIndex": 0
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "TrendTable"
},
"position": {
"basis": "320px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Pens Lists/ToggleSwitch.props.selected"
},
"type": "property"
}
},
"props.params.historianSettings": {
"binding": {
"config": {
"path": "..../FlexContainer.custom.historianSettings"
},
"type": "property"
}
},
"props.params.selectedPens": {
"binding": {
"config": {
"path": "../Power Chart.props.pens"
},
"type": "property"
}
}
},
"props": {
"path": "Library/Templates/Framework/TrendTable"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "Chart Cont"
},
"position": {
"basis": "200px",
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"custom": {
"historianSettings": {
"dateFormat": "YYYY/MM/DD",
"endDate": {
"$": [
"ts",
192,
1747947762435
],
"$ts": 1730879940000
},
"export": {
"dateFormat": "None",
"timeFormat": "x"
},
"measureOfTime": "hours",
"mode": "realtime",
"penNamePathDepth": 1,
"pointCount": 300,
"rangeEndDate": null,
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
"rangeStartDate": null,
"refreshRate": 1000,
"responsiveDesignWidth": 100,
"startDate": {
"$": [
"ts",
192,
1747947762435
],
"$ts": 1730733759000
},
"tagBrowserStartPath": "",
"timeFormat": "h:mm A",
"unitOfTime": 2,
"visibility": {
"buttons": {
"showAnnotationButton": false,
"showFullscreenButton": true,
"showMoreButton": true,
"showPanZoomButton": true,
"showRangeBrushButton": true,
"showSettingsButton": false,
"showTagBrowserButton": false,
"showXTraceButton": true
},
"showDateRangeSelector": true,
"showPenControlDisplay": true,
"showTagBrowser": false
}
}
},
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "100%"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "containers/padded-container"
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -0,0 +1,7 @@
{
"base": {
"style": {
"padding": "1px"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,216 @@
{
"custom": {
"allTags": [
{
"dataType": "Float4",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Supply Temperature DB"
},
{
"dataType": "Float4",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Max DP"
},
{
"dataType": "Float4",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Max Differential Pressure"
},
{
"dataType": "Float4",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Max Flow"
},
{
"dataType": "Float4",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Min Flow SP"
},
{
"dataType": "Int8",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Fail To Close Delay SP"
},
{
"dataType": "Int8",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Fail To Open Delay SP"
},
{
"dataType": "Int8",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Fail To Run Delay SP"
},
{
"dataType": "Int8",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Fail To Stop Delay SP"
},
{
"dataType": "Int8",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Startup Alarm Delay SP"
},
{
"dataType": "Int8",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Supply Temperature Delay"
},
{
"dataType": "Int8",
"format": "##,###.##",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Valve Close Delay SP"
}
]
},
"params": {
"auth": {
"almAck": true,
"almShelve": true,
"config": true,
"control": true
},
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_CH24_SYSTEM"
},
"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 \"format\": \u0027##,###.##\u0027\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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -0,0 +1,101 @@
def trace_power_flow():
# 1. Define the network structure in order from left to right
# This makes it easy to find neighbors.
ds_names = ["DS-1A1", "DS-1B1"]
# 2. Build the list of all tags we need to read
# Using readBlocking for a single, efficient tag read
tag_paths_to_read = [
'[Ignition_Common_IO_Gtwy]Cables/SES/SESA_Out1', # Assumes a tag for the source status
'[Ignition_Common_IO_Gtwy]Cables/SES/SESB_Out3'
]
for name in ds_names:
# Assuming your UDT instances are in a folder named 'DS'
base_path = "[Ignition_Common_IO_Gtwy]Yard/SATB1_YARD_{}".format(name)
tag_paths_to_read.append("{}/Breaker Closed Way 01".format(base_path))
tag_paths_to_read.append("{}/Breaker Closed Way 02".format(base_path))
# 3. Read all tags at once
try:
tag_values = system.tag.readBlocking(tag_paths_to_read)
except Exception as e:
# Log error if tags can't be read
system.util.getLogger("PowerTrace").error("Error reading tags: {}".format(e))
return
# Create a dictionary for easy access to tag values
# e.g., values['UT-HS1']['Switch_L_Status']
values = {}
values['SESA-FRD1_Live'] = tag_values[0].value
values['SESB-FRD3_Live'] = tag_values[1].value
read_idx = 2
for name in ds_names:
values[name] = {
'Way01': tag_values[read_idx].value,
'Way02': tag_values[read_idx + 1].value
}
read_idx += 2
# 4. The Tracing Algorithm
# This dictionary will store the final state: e.g., energized_state['UT P1.2'] = 'DS-1A1'
energized_state = {}
# A queue for our BFS traversal, storing (ut_name, source)
# Using a list as a queue: append to add, pop(0) to remove from front
q = []
# Initialize the queue with active sources
if values['SESA-FRD1_Live']:
q.append( ("DS-1A1", "SESA-FRD1") )
if values['SESB-FRD3_Live']:
q.append( ("DS-1B1", "SESB-FRD3") )
# Process the queue until it's empty
visited = set() # Keep track of UTs we've already processed to prevent infinite loops
while q:
current_ds_name, source = q.pop(0)
if current_ds_name in visited:
continue
visited.add(current_ds_name)
energized_state[current_ds_name] = source
current_ut_index = ds_names.index(current_ds_name)
# Check for propagation to the RIGHT (-->)
if current_ut_index < len(ds_names) - 1:
neighbor_name = ds_names[current_ut_index + 1]
# Condition: Current UT's right switch is closed AND Neighbor's left switch is closed
if values[current_ds_name]['Way02'] and values[neighbor_name]['Way02']:
if neighbor_name not in visited:
q.append( (neighbor_name, source) )
# Check for propagation to the LEFT (<--)
if current_ut_index > 0:
neighbor_name = ds_names[current_ut_index - 1]
# Condition: Current UT's left switch is closed AND Neighbor's right switch is closed
if values[current_ds_name]['Way02'] and values[neighbor_name]['Way02']:
if neighbor_name not in visited:
q.append( (neighbor_name, source) )
print energized_state
# 5. Prepare and write the results back to Ignition tags
tag_paths_to_write = []
values_to_write = []
# Set UT states
for name in ds_names:
is_energized = name in energized_state
power_source = energized_state.get(name, 'None')
tag_paths_to_write.append("[Ignition_Common_IO_Gtwy]Yard/SATB1_YARD_{}/Data/isEnergized".format(name))
values_to_write.append(is_energized)
tag_paths_to_write.append("[Ignition_Common_IO_Gtwy]Yard/SATB1_YARD_{}/Data/PowerSource".format(name))
values_to_write.append(power_source)
# Write all values in a single, efficient call
if tag_paths_to_write:
system.tag.writeBlocking(tag_paths_to_write, values_to_write)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@@ -0,0 +1,851 @@
{
"custom": {},
"params": {
"BoxColor": "--olGray",
"InputPower": 0,
"OutputPower": 0,
"proportion": "",
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Breaker\n"
},
"propConfig": {
"params.BoxColor": {
"paramDirection": "input",
"persistent": true
},
"params.InputPower": {
"paramDirection": "input",
"persistent": true
},
"params.OutputPower": {
"binding": {
"config": {
"expression": "if({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),1,0)"
},
"type": "expr"
},
"paramDirection": "output",
"persistent": true
},
"params.proportion": {
"paramDirection": "output",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 200,
"width": 2468
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "General"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.elements[0].elements[0].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower},\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[1].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower},\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[2].fill": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower},\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[3].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower},\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[4].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[5].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[6].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[6].visibility": {
"binding": {
"config": {
"expression": "\r\nif(tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027visible\u0027,\u0027hidden\u0027)\r\n\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[7].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[7].visibility": {
"binding": {
"config": {
"expression": "\r\nif(!tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027visible\u0027,\u0027hidden\u0027)\r\n\r\n"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"elements": [
{
"d": "M6537.5,191.897c0,2.3 1.867,4.167 4.167,4.167c2.299,-0 4.166,-1.867 4.166,-4.167c0,-2.3 -1.867,-4.167 -4.166,-4.167c-2.3,0 -4.167,1.867 -4.167,4.167Z",
"fill": {
"paint": "transparent"
},
"id": "Terminal32",
"name": "Terminal32",
"stroke": {
"miterlimit": "10",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M6541.67,187.73l-0,-0.838",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M6535.42,149.892c-0,-3.449 2.8,-6.25 6.25,-6.25c3.449,0 6.25,2.801 6.25,6.25c-0,3.45 -2.801,6.25 -6.25,6.25c-3.45,0 -6.25,-2.8 -6.25,-6.25Z",
"id": "In16",
"name": "In16",
"type": "path"
},
{
"d": "M6541.67,186.892l-0,-37",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M6545.83,247.063c0,-2.3 -1.867,-4.167 -4.166,-4.167c-2.3,-0 -4.167,1.867 -4.167,4.167c0,2.299 1.867,4.166 4.167,4.166c2.299,0 4.166,-1.867 4.166,-4.166Z",
"fill": {
"paint": "transparent"
},
"id": "Terminal33",
"name": "Terminal33",
"stroke": {
"miterlimit": "10",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M6541.67,251.229l-0,0.839",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M6549.41,193.729c8.448,7.001 12.598,15.745 12.366,26.918c0.219,10.579 -3.561,19.678 -12.366,26.918",
"fill": {
"paint": "transparent"
},
"id": "Closed16",
"name": "Closed16",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M6568.41,193.729c8.447,7.001 12.597,15.745 12.365,26.918c0.22,10.579 -3.56,19.678 -12.365,26.918",
"fill": {
"paint": "transparent"
},
"id": "Open16",
"name": "Open16",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
}
],
"id": "CB17",
"name": "CB17",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"miterlimit": "1"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 6663 296"
},
"type": "ia.shapes.svg"
},
{
"children": [
{
"meta": {
"name": "rectangle"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.elements[1].stroke.paint": {
"binding": {
"config": {
"expression": "case(\r\n\t{/root.custom.AlarmSeverity},\r\n\t1, \"var(--coolpurple)\",\r\n\t2, \"var(--goldenyellow)\",\r\n\t3, \"var(--sunsetorange)\",\r\n\t4, \"var(--alarmred)\",\r\n\t\"transparent\"\r\n)\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"fill": {
"opacity": "1",
"paint": "transparent"
},
"height": 58,
"id": "rect1",
"name": "rect1",
"stroke": {
"dasharray": "none",
"dashoffset": "0",
"opacity": "1",
"width": 1.5
},
"type": "rect",
"width": 26,
"x": 2416,
"y": 91
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmPurple Icon"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if({/root.custom.AlarmSeverity}!\u003d1,false,true)\r\n\r\n\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"elements": [
{
"elements": [
{
"d": "m 854.903,82.071 v 877.525 c 0,18.438 -14.969,33.407 -33.407,33.407 H 220.17 c -18.437,0 -33.407,-14.969 -33.407,-33.407 V 82.071 c 0,-18.438 14.97,-33.407 33.407,-33.407 h 601.326 c 18.438,0 33.407,14.969 33.407,33.407 z",
"fill": {
"paint": "#7166b7"
},
"id": "path1",
"name": "path1",
"stroke": {
"paint": "#000000",
"width": "33.33px"
},
"type": "path"
},
{
"elements": [
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path2",
"name": "path2",
"type": "path"
}
],
"id": "g2",
"name": "g2",
"transform": "matrix(845.675,0,0,845.675,420.621,942.427)",
"type": "group"
},
{
"id": "g3",
"name": "g3",
"transform": "matrix(845.675,0,0,845.675,621.046,942.427)",
"type": "group"
}
],
"id": "g4",
"name": "g4",
"transform": "matrix(1,0,0,0.805553,0,1.79345)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g5",
"name": "g5",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "matrix(0.02454845,0,0,0.02454819,62.214355,34.214484)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g7",
"name": "g7",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "translate(2367,43)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmYellow Icon"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if({/root.custom.AlarmSeverity}!\u003d2,false,true)\r\n\r\n\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"elements": [
{
"elements": [
{
"d": "m 476.192,128.475 c 9.301,-15.826 26.285,-25.544 44.641,-25.544 18.357,0 35.341,9.718 44.641,25.544 98.023,166.79 331.22,563.583 430.343,732.245 9.409,16.011 9.524,35.834 0.301,51.952 -9.223,16.119 -26.371,26.064 -44.942,26.064 -197.149,0 -663.536,0 -860.685,0 -18.571,0 -35.719,-9.945 -44.942,-26.064 C 36.326,896.554 36.44,876.731 45.85,860.72 144.973,692.058 378.17,295.265 476.192,128.475 Z",
"fill": {
"paint": "#f4b834"
},
"id": "path1-7",
"name": "path1-7",
"stroke": {
"paint": "#000000",
"width": "33.33px"
},
"type": "path"
},
{
"elements": [
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path2-8",
"name": "path2-8",
"type": "path"
}
],
"id": "g2-6",
"name": "g2-6",
"transform": "matrix(845.675,0,0,845.675,420.621,1006.62)",
"type": "group"
},
{
"id": "g3-7",
"name": "g3-7",
"transform": "matrix(845.675,0,0,845.675,621.046,1006.62)",
"type": "group"
}
],
"id": "g4-1",
"name": "g4-1",
"transform": "matrix(1,0,0,0.803347,0,14.4369)",
"type": "group"
}
],
"id": "g5-7",
"name": "g5-7",
"transform": "matrix(0.02405886,0,0,0.02405895,62.469344,34.469531)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g8",
"name": "g8",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "translate(2367,43)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmOrange Icon"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if({/root.custom.AlarmSeverity}!\u003d3,false,true)\r\n\r\n\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"elements": [
{
"elements": [
{
"d": "m 545.877,45.009 450.78,450.781 c 13.822,13.822 13.822,36.265 0,50.087 l -450.78,450.78 c -13.822,13.822 -36.265,13.822 -50.087,0 L 45.009,545.877 c -13.821,-13.822 -13.821,-36.265 0,-50.087 L 495.79,45.009 c 13.822,-13.821 36.265,-13.821 50.087,0 z",
"fill": {
"paint": "#de7c33"
},
"id": "path1-9",
"name": "path1-9",
"stroke": {
"paint": "#000000",
"width": "33.33px"
},
"type": "path"
},
{
"elements": [
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path2-9",
"name": "path2-9",
"type": "path"
}
],
"id": "g2-2",
"name": "g2-2",
"transform": "matrix(761.797,0,0,761.797,430.56,887.507)",
"type": "group"
},
{
"id": "g3-3",
"name": "g3-3",
"transform": "matrix(761.797,0,0,761.797,611.106,887.507)",
"type": "group"
}
],
"id": "g4-9",
"name": "g4-9",
"transform": "matrix(1,0,0,0.846556,0,-3.16266)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g6",
"name": "g6",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "matrix(0.02386836,0,0,0.02386836,62.568564,34.568564)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g9",
"name": "g9",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "translate(2367,43)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmRed Icon"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if({/root.custom.AlarmSeverity}!\u003d4,false,true)\r\n\r\n\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"elements": [
{
"cx": "75",
"cy": "47",
"fill": {
"paint": "#e22028"
},
"id": "circle1",
"name": "circle1",
"rx": "11.612939",
"ry": "11.612941",
"stroke": {
"paint": "#000000",
"width": "0.774118px"
},
"type": "ellipse"
},
{
"elements": [
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path1",
"name": "path1",
"type": "path"
}
],
"id": "g1",
"name": "g1",
"transform": "matrix(845.675,0,0,845.675,322.381,879.38)",
"type": "group"
},
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path2",
"name": "path2",
"type": "path"
}
],
"id": "g2",
"name": "g2",
"transform": "matrix(845.675,0,0,845.675,522.806,879.38)",
"type": "group"
}
],
"id": "g4",
"name": "g4",
"transform": "matrix(0.02322588,0,0,0.02101536,62.903178,34.784214)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g10",
"name": "g10",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "translate(2367,43)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
}
],
"meta": {
"name": "Alarm block"
},
"position": {
"height": 1,
"width": 1
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
],
"meta": {
"name": "Element"
},
"position": {
"grow": 1
},
"props": {
"mode": "percent",
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.coord"
}
],
"meta": {
"name": "root"
},
"propConfig": {
"custom.AlarmSeverity": {
"binding": {
"config": {
"expression": "tag(tostr({view.params.tagPath})+\u0027/AlarmSeverity\u0027)"
},
"type": "expr"
}
}
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,638 @@
{
"custom": {
"alarmSeverity": -1,
"colorHandler": {
"lines": "var(--olGray)"
}
},
"params": {
"boxColor": "var(--olGray)",
"inputPower": 1,
"objectName": "Chiller",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_CH01_MOTOR",
"textColor": "var(--olGray)",
"textHandler": {
"deviceLabel": "CH-A01",
"motor1": "330.4kW",
"motor2": "442 FLA"
}
},
"propConfig": {
"custom.alarmSeverity": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"transforms": [
{
"code": "\treturn alarm.summary.calcMaxPriority(value)",
"type": "script"
}
],
"type": "property"
},
"persistent": true
},
"custom.colorHandler": {
"persistent": true
},
"custom.colorHandler.cables": {
"binding": {
"config": {
"path": "view.params.inputPower"
},
"transforms": [
{
"fallback": "purple",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "var(--olGreen)"
},
{
"input": 1,
"output": "var(--olRed)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"params.boxColor": {
"paramDirection": "input",
"persistent": true
},
"params.inputPower": {
"paramDirection": "input",
"persistent": true
},
"params.objectName": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
},
"params.textColor": {
"paramDirection": "input",
"persistent": true
},
"params.textHandler": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 110,
"width": 70
}
},
"root": {
"children": [
{
"meta": {
"name": "ACCH"
},
"position": {
"height": 110,
"width": 70
},
"propConfig": {
"props.elements[0].elements[1].fill": {
"binding": {
"config": {
"path": "view.params.boxColor"
},
"type": "property"
}
},
"props.elements[0].elements[2].elements[0].elements[0].fill.paint": {
"binding": {
"config": {
"path": "view.params.textColor"
},
"type": "property"
}
},
"props.elements[0].elements[2].elements[2].elements[0].fill.paint": {
"binding": {
"config": {
"path": "view.params.textColor"
},
"type": "property"
}
},
"props.elements[0].elements[2].elements[4].elements[0].fill.paint": {
"binding": {
"config": {
"path": "view.params.textColor"
},
"type": "property"
}
},
"props.elements[0].elements[2].elements[6].elements[0].fill.paint": {
"binding": {
"config": {
"path": "view.params.textColor"
},
"type": "property"
}
},
"props.elements[1].elements[0].elements[0].stroke.paint": {
"binding": {
"config": {
"path": "view.params.inputPower"
},
"transforms": [
{
"fallback": "var(--olGray)",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "var(--olGreen)"
},
{
"input": 1,
"output": "var(--olRed)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.elements[1].elements[0].elements[1].stroke.paint": {
"binding": {
"config": {
"path": "view.params.inputPower"
},
"transforms": [
{
"fallback": "var(--olGray)",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "var(--olGreen)"
},
{
"input": 1,
"output": "var(--olRed)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.elements[1].elements[0].elements[2].stroke.paint": {
"binding": {
"config": {
"path": "view.params.inputPower"
},
"transforms": [
{
"fallback": "var(--olGray)",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "var(--olGreen)"
},
{
"input": 1,
"output": "var(--olRed)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.elements[1].elements[1].elements[1].style.fill": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[1].elements[1].elements[3].style.fill": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[3].style.fill": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[3].text": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"transforms": [
{
"code": "\ttxt \u003d value.split(\u0027_\u0027)\n\treturn txt[-2]",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"elements": [
{
"elements": [
{
"fill": {
"opacity": 0
},
"height": 67.5,
"name": "rect",
"type": "rect",
"visibility": "hidden",
"width": "37.5",
"x": "3.75",
"y": "11.25"
},
{
"d": "M3.75,15.268l-0,-4.018l4.464,0l0,0.75l-3.714,-0l-0,3.268l-0.75,-0Zm10.714,-4.018l0,0.75l-2.678,0l-0,-0.75l2.678,0Zm12.5,0l0,0.75l-8.928,0l-0,-0.75l8.928,0Zm6.25,0l0,0.75l-2.678,0l-0,-0.75l2.678,0Zm8.036,4.018l-0.75,-0l0,-3.268l-3.714,0l-0,-0.75l4.464,0l-0,4.018Zm-0,5.625l-0.75,-0l-0,-2.411l0.75,0l-0,2.411Zm-0,11.25l-0.75,-0l-0,-8.036l0.75,0l-0,8.036Zm-0,5.625l-0.75,-0l-0,-2.411l0.75,0l-0,2.411Zm-0,11.25l-0.75,-0l-0,-8.036l0.75,0l-0,8.036Zm-0,5.625l-0.75,-0l-0,-2.411l0.75,0l-0,2.411Zm-0,11.25l-0.75,-0l-0,-8.036l0.75,0l-0,8.036Zm-0,5.625l-0.75,-0l-0,-2.411l0.75,0l-0,2.411Zm-4.464,7.232l-0,-0.75l3.714,0l-0,-3.268l0.75,0l-0,4.018l-4.464,0Zm-6.25,0l-0,-0.75l2.678,0l0,0.75l-2.678,0Zm-12.5,0l-0,-0.75l8.928,0l0,0.75l-8.928,0Zm-6.25,0l-0,-0.75l2.678,0l0,0.75l-2.678,0Zm-8.036,-4.018l0.75,0l-0,3.268l3.714,0l0,0.75l-4.464,0l-0,-4.018Zm-0,-5.625l0.75,0l-0,2.411l-0.75,-0l-0,-2.411Zm-0,-11.25l0.75,0l-0,8.036l-0.75,-0l-0,-8.036Zm-0,-5.625l0.75,0l-0,2.411l-0.75,-0l-0,-2.411Zm-0,-11.25l0.75,0l-0,8.036l-0.75,-0l-0,-8.036Zm-0,-5.625l0.75,0l-0,2.411l-0.75,-0l-0,-2.411Zm-0,-11.25l0.75,0l-0,8.036l-0.75,-0l-0,-8.036Zm-0,-5.625l0.75,0l-0,2.411l-0.75,-0l-0,-2.411Z",
"name": "path",
"type": "path",
"visibility": "visible"
},
{
"elements": [
{
"elements": [
{
"d": "M0.001,-0l0.319,-0.705l0.105,0l0.319,0.705l-0.13,-0l-0.085,-0.198l0.054,0.035l-0.422,0l0.054,-0.035l-0.084,0.198l-0.13,-0Zm0.37,-0.566l-0.14,0.333l-0.026,-0.032l0.334,0l-0.025,0.032l-0.141,-0.333l-0.002,0Z",
"fill": {
"rule": "nonzero"
},
"name": "path",
"type": "path"
}
],
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,32.7595,63.7053)",
"type": "group"
},
{
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,46.6286,63.7053)",
"type": "group"
},
{
"elements": [
{
"d": "M0.405,0.01c-0.073,0 -0.136,-0.015 -0.189,-0.044c-0.052,-0.03 -0.092,-0.072 -0.12,-0.126c-0.028,-0.055 -0.042,-0.119 -0.042,-0.193c-0,-0.074 0.014,-0.138 0.042,-0.192c0.028,-0.054 0.068,-0.096 0.12,-0.125c0.053,-0.03 0.116,-0.045 0.189,-0.045c0.047,0 0.092,0.007 0.134,0.022c0.043,0.015 0.078,0.036 0.105,0.063l-0.042,0.102c-0.03,-0.025 -0.061,-0.044 -0.092,-0.055c-0.031,-0.012 -0.065,-0.018 -0.101,-0.018c-0.071,0 -0.126,0.022 -0.163,0.065c-0.037,0.043 -0.056,0.104 -0.056,0.183c0,0.079 0.019,0.141 0.056,0.184c0.037,0.043 0.092,0.065 0.163,0.065c0.036,0 0.07,-0.006 0.101,-0.017c0.031,-0.012 0.062,-0.031 0.092,-0.056l0.042,0.102c-0.027,0.027 -0.062,0.048 -0.105,0.063c-0.042,0.015 -0.087,0.022 -0.134,0.022Z",
"fill": {
"rule": "nonzero"
},
"name": "path",
"type": "path"
}
],
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,32.7595,82.3466)",
"type": "group"
},
{
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,45.4169,82.3466)",
"type": "group"
},
{
"elements": [
{
"d": "M0.405,0.01c-0.073,0 -0.136,-0.015 -0.189,-0.044c-0.052,-0.03 -0.092,-0.072 -0.12,-0.126c-0.028,-0.055 -0.042,-0.119 -0.042,-0.193c-0,-0.074 0.014,-0.138 0.042,-0.192c0.028,-0.054 0.068,-0.096 0.12,-0.125c0.053,-0.03 0.116,-0.045 0.189,-0.045c0.047,0 0.092,0.007 0.134,0.022c0.043,0.015 0.078,0.036 0.105,0.063l-0.042,0.102c-0.03,-0.025 -0.061,-0.044 -0.092,-0.055c-0.031,-0.012 -0.065,-0.018 -0.101,-0.018c-0.071,0 -0.126,0.022 -0.163,0.065c-0.037,0.043 -0.056,0.104 -0.056,0.183c0,0.079 0.019,0.141 0.056,0.184c0.037,0.043 0.092,0.065 0.163,0.065c0.036,0 0.07,-0.006 0.101,-0.017c0.031,-0.012 0.062,-0.031 0.092,-0.056l0.042,0.102c-0.027,0.027 -0.062,0.048 -0.105,0.063c-0.042,0.015 -0.087,0.022 -0.134,0.022Z",
"fill": {
"rule": "nonzero"
},
"name": "path",
"type": "path"
}
],
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,32.7595,100.988)",
"type": "group"
},
{
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,45.4169,100.988)",
"type": "group"
},
{
"elements": [
{
"d": "M0.077,-0l0,-0.705l0.128,0l0,0.294l0.363,-0l0,-0.294l0.128,0l0,0.705l-0.128,-0l0,-0.304l-0.363,0l-0,0.304l-0.128,-0Z",
"fill": {
"rule": "nonzero"
},
"name": "path",
"type": "path"
}
],
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,32.7595,119.629)",
"type": "group"
},
{
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,47.1692,119.629)",
"type": "group"
}
],
"name": "group",
"transform": "matrix(0.654499,0,0,0.670554,7.32258,-12.0616)",
"type": "group"
}
],
"id": "Box",
"name": "Box",
"type": "group"
},
{
"elements": [
{
"elements": [
{
"cx": "16.574",
"cy": "45",
"fill": {
"opacity": "0"
},
"name": "circle",
"r": "5.625",
"stroke": {
"width": "0.75px"
},
"type": "circle"
},
{
"d": "M12.673,41.002l-6.229,5.897",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linecap": "round",
"width": "0.75px"
},
"type": "path"
},
{
"d": "M26.703,43.323l-6.301,5.832",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linecap": "round",
"width": "0.75px"
},
"type": "path"
}
],
"id": "Motor-Shape",
"name": "Motor-Shape",
"type": "group"
},
{
"elements": [
{
"name": "group",
"transform": "matrix(4.16667,0,0,4.16667,24.9201,55.5334)",
"type": "group"
},
{
"name": "text",
"style": {
"fontFamily": "\u0027ArialMT\u0027, \u0027Arial\u0027",
"fontSize": "4.167px"
},
"text": "330.4kW",
"type": "text",
"x": "8.477px",
"y": "55.533px"
},
{
"name": "group",
"transform": "matrix(4.16667,0,0,4.16667,24.5742,59.2834)",
"type": "group"
},
{
"name": "text",
"style": {
"fontFamily": "\u0027ArialMT\u0027, \u0027Arial\u0027",
"fontSize": "4.167px"
},
"text": "442 FLA",
"type": "text",
"x": "8.823px",
"y": "59.283px"
}
],
"id": "Text",
"name": "Text",
"type": "group"
}
],
"id": "Motor",
"name": "Motor",
"type": "group"
},
{
"id": "TagID-",
"name": "TagID-",
"transform": "matrix(4.16667,0,0,4.16667,42.2449,10)",
"type": "group"
},
{
"name": "text",
"style": {
"fontFamily": "\u0027Arial-BoldMT\u0027, \u0027Arial\u0027",
"fontSize": "10px",
"fontWeight": "700"
},
"type": "text",
"x": "20px",
"y": "10px"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"miterlimit": "1"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 53 83"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmBorder"
},
"position": {
"height": 98,
"width": 57,
"x": 1.76,
"y": 10.26
},
"propConfig": {
"props.style.outlineColor": {
"binding": {
"config": {
"path": "view.custom.alarmSeverity"
},
"transforms": [
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "var(--coolpurple)"
},
{
"input": 2,
"output": "var(--goldenyellow)"
},
{
"input": 3,
"output": "var(--sunsetorange)"
},
{
"input": 4,
"output": "var(--alarmred)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.style.outlineStyle": {
"binding": {
"config": {
"path": "view.custom.alarmSeverity"
},
"transforms": [
{
"code": "\tif value \u003e 0:\n\t\treturn \"solid\"\n\telse:\n\t\treturn \"none\"",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"outlineWidth": "3"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"height": 15,
"width": 15,
"x": 50.7482,
"y": 1.99823
},
"propConfig": {
"props.params.AlarmSeverity": {
"binding": {
"config": {
"path": "view.custom.alarmSeverity"
},
"type": "property"
}
}
},
"props": {
"params": {
"ack": false
},
"path": "Library/Alarms/Icons"
},
"type": "ia.display.view"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tpageId \u003d self.page.props.pageId\n\tsystem.perspective.print(\u0027pageId: {}\u0027.format(pageId))\n\t\n\ttagPath \u003d self.view.params.tagPath\n\tobjectName \u003d self.view.params.objectName\n\tutils.nav.openEQPopup(objectName, tagPath)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root"
},
"propConfig": {
"custom.alarmSeverity": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/AlarmSummary/ActiveAlarms"
},
"transforms": [
{
"code": "\treturn alarm.summary.calcMaxPriority(self.view.params.tagPath)",
"type": "script"
}
],
"type": "tag"
}
}
},
"props": {
"style": {
"classes": "containers/HoverOver",
"overflow": "visible"
}
},
"type": "ia.container.coord"
}
}

View File

@@ -0,0 +1,851 @@
{
"custom": {},
"params": {
"BoxColor": "--olGray",
"InputPower": 0,
"OutputPower": 0,
"proportion": "",
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/Breaker\n"
},
"propConfig": {
"params.BoxColor": {
"paramDirection": "input",
"persistent": true
},
"params.InputPower": {
"paramDirection": "input",
"persistent": true
},
"params.OutputPower": {
"binding": {
"config": {
"expression": "if({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),1,0)"
},
"type": "expr"
},
"paramDirection": "output",
"persistent": true
},
"params.proportion": {
"paramDirection": "output",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 200,
"width": 2468
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "General"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.elements[0].elements[0].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower},\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[1].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower},\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[2].fill": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower},\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[3].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower},\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[4].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[5].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[6].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[6].visibility": {
"binding": {
"config": {
"expression": "\r\nif(tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027visible\u0027,\u0027hidden\u0027)\r\n\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[7].stroke.paint": {
"binding": {
"config": {
"expression": "concat(\u0027var(\u0027,\r\nif({view.params.InputPower} \u0026\u0026 tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027--olRed\u0027,\u0027--olGreen\u0027)\r\n,\u0027)\u0027)\r\n"
},
"type": "expr"
}
},
"props.elements[0].elements[7].visibility": {
"binding": {
"config": {
"expression": "\r\nif(!tag((tostr({view.params.tagPath})+\u0027/OpenClosed\u0027)),\u0027visible\u0027,\u0027hidden\u0027)\r\n\r\n"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"elements": [
{
"d": "M3874.89,191.897c0,2.3 1.867,4.167 4.167,4.167c2.3,-0 4.167,-1.867 4.167,-4.167c-0,-2.3 -1.867,-4.167 -4.167,-4.167c-2.3,0 -4.167,1.867 -4.167,4.167Z",
"fill": {
"paint": "transparent"
},
"id": "Terminal18",
"name": "Terminal18",
"stroke": {
"miterlimit": "10",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M3879.05,187.73l-0,-0.838",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M3872.8,149.892c-0,-3.449 2.801,-6.25 6.25,-6.25c3.449,0 6.25,2.801 6.25,6.25c-0,3.45 -2.801,6.25 -6.25,6.25c-3.449,0 -6.25,-2.8 -6.25,-6.25Z",
"id": "In9",
"name": "In9",
"type": "path"
},
{
"d": "M3879.05,186.892l-0,-37",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M3883.22,247.063c-0,-2.3 -1.867,-4.167 -4.167,-4.167c-2.3,-0 -4.167,1.867 -4.167,4.167c0,2.299 1.867,4.166 4.167,4.166c2.3,0 4.167,-1.867 4.167,-4.166Z",
"fill": {
"paint": "transparent"
},
"id": "Terminal19",
"name": "Terminal19",
"stroke": {
"miterlimit": "10",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M3879.05,251.229l-0,0.839",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M3886.79,193.729c8.448,7.001 12.598,15.745 12.366,26.918c0.219,10.579 -3.56,19.678 -12.366,26.918",
"fill": {
"paint": "transparent"
},
"id": "Closed9",
"name": "Closed9",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
},
{
"d": "M3905.8,193.729c8.447,7.001 12.598,15.745 12.366,26.918c0.219,10.579 -3.561,19.678 -12.366,26.918",
"fill": {
"paint": "transparent"
},
"id": "Open9",
"name": "Open9",
"stroke": {
"linejoin": "round",
"miterlimit": "1.5",
"width": "4.17px"
},
"type": "path"
}
],
"id": "CB10",
"name": "CB10",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"miterlimit": "1"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 6663 296"
},
"type": "ia.shapes.svg"
},
{
"children": [
{
"meta": {
"name": "rectangle"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"props.elements[1].stroke.paint": {
"binding": {
"config": {
"expression": "case(\r\n\t{/root.custom.AlarmSeverity},\r\n\t1, \"var(--coolpurple)\",\r\n\t2, \"var(--goldenyellow)\",\r\n\t3, \"var(--sunsetorange)\",\r\n\t4, \"var(--alarmred)\",\r\n\t\"transparent\"\r\n)\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"fill": {
"opacity": "1",
"paint": "transparent"
},
"height": 58,
"id": "rect1",
"name": "rect1",
"stroke": {
"dasharray": "none",
"dashoffset": "0",
"opacity": "1",
"width": 1.5
},
"type": "rect",
"width": 26,
"x": 1430,
"y": 91
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmPurple Icon"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if({/root.custom.AlarmSeverity}!\u003d1,false,true)\r\n\r\n\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"elements": [
{
"elements": [
{
"d": "m 854.903,82.071 v 877.525 c 0,18.438 -14.969,33.407 -33.407,33.407 H 220.17 c -18.437,0 -33.407,-14.969 -33.407,-33.407 V 82.071 c 0,-18.438 14.97,-33.407 33.407,-33.407 h 601.326 c 18.438,0 33.407,14.969 33.407,33.407 z",
"fill": {
"paint": "#7166b7"
},
"id": "path1",
"name": "path1",
"stroke": {
"paint": "#000000",
"width": "33.33px"
},
"type": "path"
},
{
"elements": [
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path2",
"name": "path2",
"type": "path"
}
],
"id": "g2",
"name": "g2",
"transform": "matrix(845.675,0,0,845.675,420.621,942.427)",
"type": "group"
},
{
"id": "g3",
"name": "g3",
"transform": "matrix(845.675,0,0,845.675,621.046,942.427)",
"type": "group"
}
],
"id": "g4",
"name": "g4",
"transform": "matrix(1,0,0,0.805553,0,1.79345)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g5",
"name": "g5",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "matrix(0.02454845,0,0,0.02454819,62.214355,34.214484)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g7",
"name": "g7",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "translate(1381,43)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmYellow Icon"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if({/root.custom.AlarmSeverity}!\u003d2,false,true)\r\n\r\n\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"elements": [
{
"elements": [
{
"d": "m 476.192,128.475 c 9.301,-15.826 26.285,-25.544 44.641,-25.544 18.357,0 35.341,9.718 44.641,25.544 98.023,166.79 331.22,563.583 430.343,732.245 9.409,16.011 9.524,35.834 0.301,51.952 -9.223,16.119 -26.371,26.064 -44.942,26.064 -197.149,0 -663.536,0 -860.685,0 -18.571,0 -35.719,-9.945 -44.942,-26.064 C 36.326,896.554 36.44,876.731 45.85,860.72 144.973,692.058 378.17,295.265 476.192,128.475 Z",
"fill": {
"paint": "#f4b834"
},
"id": "path1-7",
"name": "path1-7",
"stroke": {
"paint": "#000000",
"width": "33.33px"
},
"type": "path"
},
{
"elements": [
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path2-8",
"name": "path2-8",
"type": "path"
}
],
"id": "g2-6",
"name": "g2-6",
"transform": "matrix(845.675,0,0,845.675,420.621,1006.62)",
"type": "group"
},
{
"id": "g3-7",
"name": "g3-7",
"transform": "matrix(845.675,0,0,845.675,621.046,1006.62)",
"type": "group"
}
],
"id": "g4-1",
"name": "g4-1",
"transform": "matrix(1,0,0,0.803347,0,14.4369)",
"type": "group"
}
],
"id": "g5-7",
"name": "g5-7",
"transform": "matrix(0.02405886,0,0,0.02405895,62.469344,34.469531)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g8",
"name": "g8",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "translate(1381,43)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmOrange Icon"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if({/root.custom.AlarmSeverity}!\u003d3,false,true)\r\n\r\n\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"elements": [
{
"elements": [
{
"d": "m 545.877,45.009 450.78,450.781 c 13.822,13.822 13.822,36.265 0,50.087 l -450.78,450.78 c -13.822,13.822 -36.265,13.822 -50.087,0 L 45.009,545.877 c -13.821,-13.822 -13.821,-36.265 0,-50.087 L 495.79,45.009 c 13.822,-13.821 36.265,-13.821 50.087,0 z",
"fill": {
"paint": "#de7c33"
},
"id": "path1-9",
"name": "path1-9",
"stroke": {
"paint": "#000000",
"width": "33.33px"
},
"type": "path"
},
{
"elements": [
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path2-9",
"name": "path2-9",
"type": "path"
}
],
"id": "g2-2",
"name": "g2-2",
"transform": "matrix(761.797,0,0,761.797,430.56,887.507)",
"type": "group"
},
{
"id": "g3-3",
"name": "g3-3",
"transform": "matrix(761.797,0,0,761.797,611.106,887.507)",
"type": "group"
}
],
"id": "g4-9",
"name": "g4-9",
"transform": "matrix(1,0,0,0.846556,0,-3.16266)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g6",
"name": "g6",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "matrix(0.02386836,0,0,0.02386836,62.568564,34.568564)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g9",
"name": "g9",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "translate(1381,43)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmRed Icon"
},
"position": {
"height": 1,
"width": 1
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if({/root.custom.AlarmSeverity}!\u003d4,false,true)\r\n\r\n\t"
},
"type": "expr"
}
}
},
"props": {
"elements": [
{
"id": "defs5",
"name": "defs5",
"type": "defs"
},
{
"elements": [
{
"cx": "75",
"cy": "47",
"fill": {
"paint": "#e22028"
},
"id": "circle1",
"name": "circle1",
"rx": "11.612939",
"ry": "11.612941",
"stroke": {
"paint": "#000000",
"width": "0.774118px"
},
"type": "ellipse"
},
{
"elements": [
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path1",
"name": "path1",
"type": "path"
}
],
"id": "g1",
"name": "g1",
"transform": "matrix(845.675,0,0,845.675,322.381,879.38)",
"type": "group"
},
{
"elements": [
{
"d": "M 0.088,-0.195 0.056,-0.705 H 0.181 L 0.15,-0.195 Z M 0.059,0 V -0.119 H 0.178 V 0 Z",
"fill": {
"paint": "#ffffff",
"rule": "nonzero"
},
"id": "path2",
"name": "path2",
"type": "path"
}
],
"id": "g2",
"name": "g2",
"transform": "matrix(845.675,0,0,845.675,522.806,879.38)",
"type": "group"
}
],
"id": "g4",
"name": "g4",
"transform": "matrix(0.02322588,0,0,0.02101536,62.903178,34.784214)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"id": "g10",
"name": "g10",
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"transform": "translate(1381,43)",
"type": "group"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"linecap": "round",
"linejoin": "round",
"miterlimit": "1.5"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 2469 200"
},
"type": "ia.shapes.svg"
}
],
"meta": {
"name": "Alarm block"
},
"position": {
"height": 1,
"width": 1
},
"props": {
"mode": "percent"
},
"type": "ia.container.coord"
}
],
"meta": {
"name": "Element"
},
"position": {
"grow": 1
},
"props": {
"mode": "percent",
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.coord"
}
],
"meta": {
"name": "root"
},
"propConfig": {
"custom.AlarmSeverity": {
"binding": {
"config": {
"expression": "tag(tostr({view.params.tagPath})+\u0027/AlarmSeverity\u0027)"
},
"type": "expr"
}
}
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,764 @@
{
"custom": {
"path": "/"
},
"params": {},
"propConfig": {
"custom.path": {
"binding": {
"config": {
"expression": "\u0027/\u0027"
},
"enabled": false,
"type": "expr"
},
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 51,
"width": 1094
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tmenuOpen \u003d \u0027material/menu_open\u0027\n\tmenuClosed \u003d \u0027material/menu\u0027\n\t\n\tpath \u003d self.props.path\n\tif path \u003d\u003d menuOpen:\n\t\tself.props.path \u003d menuClosed\n\t\tsystem.perspective.closeDock(\u0027mainNav\u0027)\n\telse:\n\t\tself.props.path \u003d menuOpen\n\t\tsystem.perspective.openDock(\u0027mainNav\u0027)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "NavMenu"
},
"position": {
"basis": "28px",
"shrink": 0
},
"propConfig": {
"props.path": {
"binding": {
"config": {
"expression": "\u0027material/menu_open\u0027"
},
"type": "expr"
}
},
"props.style.width": {
"binding": {
"config": {
"path": "this.position.basis"
},
"type": "property"
}
}
},
"props": {
"color": "currentcolor",
"style": {
"cursor": "pointer",
"margin-left": "20px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "FlexRepeater"
},
"position": {
"grow": 1
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"expression": "{view.custom.path}"
},
"transforms": [
{
"code": "\tinstances \u003d []\n\tpages \u003d self.view.custom.path.split(\"/\")[1:]\n\tfor i, label in enumerate(pages):\n\t\tif label !\u003d \"\":\n\t\t\tinstances.append({\n\t\t\t \"label\": label,\n\t\t\t \"showArrow\": True\n\t\t\t})\t\n\tif len(instances) \u003e 0:\n\t\tinstances[-1][\u0027showArrow\u0027] \u003d False\n\treturn instances",
"type": "script"
}
],
"type": "expr"
}
}
},
"props": {
"elementPosition": {
"basis": "auto",
"grow": 0,
"shrink": 0
},
"path": "Library/Layouts/Docked/Breadcrumb",
"useDefaultViewHeight": false,
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
},
{
"custom": {
"gtwys": [
"[Ignition_Common_IO_Gtwy]",
"[Ignition_SATB1_IO1_default]",
"[Ignition_SATB1_IO2_default]",
"[Ignition_SATB1_IO3_default]"
],
"paths": [
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL01/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL03/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL04/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL05/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL06/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL07/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL08/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL09/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL10/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL11/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL12/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL13/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL14/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL15/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL18/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL22/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL24/Delta",
"[Ignition_Common_IO_Gtwy]PLC/SATB1_PLCData_PNL60/Delta"
]
},
"meta": {
"name": "EmbeddedView"
},
"propConfig": {
"custom.paths": {
"binding": {
"config": {
"struct": {
"tagPaths": "{this.custom.gtwys}",
"time": "now(3000)"
},
"waitOnAll": false
},
"enabled": false,
"transforms": [
{
"code": "\toutput \u003d []\n\tpaths \u003d value[\u0027tagPaths\u0027]\n\tfor path in paths:\n\t\ttags \u003d system.tag.browse(path,{\"typeId\":\"Objects/Network/PLC_Data v2\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\t\tfor item in tags:\n\t\t\ttag \u003d str(item[\"fullPath\"]) + \"/Delta\"\n\t\t\toutput.append(tag)\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"position.display": {
"binding": {
"config": {
"struct": {
"hb": "now(3000)\r",
"paths": "{this.custom.paths}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\tvalues \u003d system.tag.readBlocking(value[\u0027paths\u0027])\n\tfor item in values:\n\t\tif item.value \u003e 150:\n\t\t\treturn True\n\treturn False",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"path": "Library/CommonObjects/PLC Healt",
"style": {
"padding": "10px"
},
"useDefaultViewWidth": true
},
"type": "ia.display.view"
},
{
"events": {
"component": {
"onRowDoubleClick": {
"config": {
"params": {},
"view": "Pages/Dev/F_Alarms/L1/Alarm Status"
},
"scope": "C",
"type": "nav"
}
}
},
"meta": {
"name": "Table"
},
"position": {
"basis": "650px",
"shrink": 0
},
"propConfig": {
"props.data": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[default]System/Top3Alarms"
},
"type": "tag"
}
}
},
"props": {
"columns": [
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "label",
"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": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "left",
"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": true,
"style": {
"classes": "",
"paddingLeft": 5
},
"toggleSwitch": {
"color": {
"selected": "",
"unselected": ""
}
},
"viewParams": {},
"viewPath": "",
"visible": true,
"width": 250
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "dispPath",
"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": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": ""
}
],
"enableHeader": false,
"pager": {
"bottom": false
},
"resizeMode": "fixed",
"rows": {
"height": 6,
"highlight": {
"enabled": false
},
"striped": {
"enabled": false
},
"style": {
"fontSize": 16
}
},
"selection": {
"enableRowSelection": false
},
"style": {
"marginBottom": "5px",
"marginTop": "5px",
"minHeight": "40px"
}
},
"type": "ia.display.table"
},
{
"meta": {
"name": "Help"
},
"position": {
"basis": "28px",
"display": false,
"shrink": 0
},
"propConfig": {
"props.style.width": {
"binding": {
"config": {
"path": "this.position.basis"
},
"type": "property"
}
}
},
"props": {
"color": "currentcolor",
"path": "material/help_outline",
"style": {
"cursor": "pointer"
}
},
"type": "ia.display.icon"
},
{
"children": [
{
"events": {
"dom": {
"onClick": [
{
"config": {},
"enabled": false,
"scope": "C",
"type": "login"
},
{
"config": {
"script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()"
},
"scope": "G",
"type": "script"
}
]
}
},
"meta": {
"name": "Icon"
},
"position": {
"basis": "28px",
"shrink": 0
},
"propConfig": {
"props.style.width": {
"binding": {
"config": {
"path": "this.position.basis"
},
"type": "property"
}
}
},
"props": {
"color": "currentcolor",
"path": "material/account_circle",
"style": {
"cursor": "pointer"
}
},
"type": "ia.display.icon"
},
{
"events": {
"dom": {
"onClick": [
{
"config": {},
"enabled": false,
"scope": "C",
"type": "login"
},
{
"config": {
"script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()"
},
"scope": "G",
"type": "script"
}
]
}
},
"meta": {
"contextMenu": {
"enabled": true,
"items": [
{
"children": [],
"icon": {
"color": "",
"path": "",
"style": {}
},
"link": {
"target": "self",
"url": "/Admin/UserSettings"
},
"message": {
"payload": {},
"scope": "page",
"type": ""
},
"method": {
"name": "",
"params": {}
},
"style": {
"classes": ""
},
"text": "Edit Preferences",
"type": "link"
}
]
},
"name": "Label"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{session.props.auth.authenticated}"
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"expression": "{session.props.auth.user.userName}"
},
"type": "expr"
}
}
},
"props": {
"style": {
"cursor": "pointer"
},
"textStyle": {
"fontWeight": "bold"
}
},
"type": "ia.display.label"
}
],
"meta": {
"contextMenu": {
"enabled": true
},
"name": "User"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"style": {
"gap": "5px",
"margin-left": "auto",
"margin-right": "20px"
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "Audio"
},
"position": {
"basis": "300px"
},
"props": {
"source": "/system/webdev/SDC_SAT_B1/alert.mp3"
},
"type": "ia.display.audio"
}
],
"custom": {
"alarmCounts": [
0,
0,
0,
0,
0,
0
],
"totalCount": 0
},
"events": {
"system": {
"onStartup": {
"config": {
"name": "stream-light"
},
"scope": "C",
"type": "theme"
}
}
},
"meta": {
"name": "root"
},
"propConfig": {
"custom.alarmCounts[0]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_Common_IO_Gtwy]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[1]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO1_default]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[2]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO2_default]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[3]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO3_default]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[4]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO4_default]Alarm Count"
},
"enabled": false,
"type": "tag"
}
},
"custom.alarmCounts[5]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "direct",
"tagPath": "[Ignition_SATB1_IO5_default]AlarmActiveCount"
},
"enabled": false,
"type": "tag"
}
},
"custom.totalCount": {
"binding": {
"config": {
"path": "this.custom.alarmCounts"
},
"enabled": false,
"transforms": [
{
"code": "\ttotal \u003d 0\n\tfor item in value:\n\t\ttotal +\u003d item\n\treturn total",
"type": "script"
}
],
"type": "property"
},
"onChange": {
"enabled": null,
"script": "\tif previousValue is not None and previousValue.value is not None:\n\t\t\n\t\tif currentValue.value \u003e previousValue.value:\n\t\t\tsound_component \u003d self.getChild(\"Audio\")\n\t\t\tsound_component.props.play \u003d False # Reset just in case\n\t\t\tsound_component.props.play \u003d True\n\t\t\t\n\t\t\t# Logger for debugging (check your Gateway or Browser logs)\n\t\t\tsystem.perspective.print(\"New Alarm Detected! Playing Sound.\")"
}
}
},
"props": {
"justify": "space-between",
"style": {
"backgroundColor": "#143663",
"color": "var(--navtree-color)",
"gap": "10px"
}
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "updateBreadcrumb",
"pageScope": true,
"script": "\tself.view.custom.path \u003d payload[\u0027target\u0027]",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,517 @@
{
"custom": {
"alarmSeverity": 1,
"colorHandler": {
"lines": "var(--olGray)"
}
},
"params": {
"inPower": true,
"objectName": "RTU01",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU01"
},
"propConfig": {
"custom.alarmSeverity": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"transforms": [
{
"code": "\treturn alarm.summary.calcMaxPriority(value)",
"type": "script"
}
],
"type": "property"
},
"persistent": true
},
"custom.colorHandler": {
"persistent": true
},
"custom.colorHandler.cables": {
"binding": {
"config": {
"path": "view.params.inPower"
},
"transforms": [
{
"fallback": "purple",
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": "var(--olGreen)"
},
{
"input": true,
"output": "var(--olRed)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"params.inPower": {
"paramDirection": "input",
"persistent": true
},
"params.objectName": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 110,
"width": 80
}
},
"root": {
"children": [
{
"meta": {
"name": "RTU"
},
"position": {
"height": 110,
"width": 80
},
"propConfig": {
"props.elements[0].elements[1].fill": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[0].elements[2].elements[0].fill.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[0].elements[2].elements[1].fill.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[0].elements[2].elements[2].fill.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[0].elements[2].elements[4].fill.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[1].elements[0].elements[0].stroke.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.cables"
},
"type": "property"
}
},
"props.elements[1].elements[0].elements[1].stroke.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.cables"
},
"type": "property"
}
},
"props.elements[1].elements[0].elements[2].stroke.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.cables"
},
"type": "property"
}
},
"props.elements[1].elements[1].elements[1].fill.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[1].elements[1].elements[3].fill.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
},
"props.elements[3].fill.paint": {
"binding": {
"config": {
"path": "view.custom.colorHandler.lines"
},
"type": "property"
}
}
},
"props": {
"elements": [
{
"elements": [
{
"fill": {
"opacity": "0"
},
"height": "67.5",
"id": "Enclosure",
"name": "Enclosure",
"type": "rect",
"width": "45",
"x": "3.75",
"y": "11.25"
},
{
"d": "M3.75,15.268l0,-4.018l5.357,0l0,0.75l-4.607,-0l0,3.268l-0.75,-0Zm12.857,-4.018l0,0.75l-3.214,0l-0,-0.75l3.214,0Zm15,0l0,0.75l-10.714,0l-0,-0.75l10.714,0Zm7.5,0l0,0.75l-3.214,0l-0,-0.75l3.214,0Zm9.643,4.018l-0.75,-0l0,-3.268l-4.607,0l-0,-0.75l5.357,0l0,4.018Zm0,5.625l-0.75,-0l0,-2.411l0.75,0l0,2.411Zm0,11.25l-0.75,-0l0,-8.036l0.75,0l0,8.036Zm0,5.625l-0.75,-0l0,-2.411l0.75,0l0,2.411Zm0,11.25l-0.75,-0l0,-8.036l0.75,0l0,8.036Zm0,5.625l-0.75,-0l0,-2.411l0.75,0l0,2.411Zm0,11.25l-0.75,-0l0,-8.036l0.75,0l0,8.036Zm0,5.625l-0.75,-0l0,-2.411l0.75,0l0,2.411Zm-5.357,7.232l-0,-0.75l4.607,0l0,-3.268l0.75,0l0,4.018l-5.357,0Zm-7.5,0l-0,-0.75l3.214,0l0,0.75l-3.214,0Zm-15,0l-0,-0.75l10.714,0l0,0.75l-10.714,0Zm-7.5,0l-0,-0.75l3.214,0l0,0.75l-3.214,0Zm-9.643,-4.018l0.75,0l-0,3.268l4.607,0l0,0.75l-5.357,0l0,-4.018Zm0,-5.625l0.75,0l0,2.411l-0.75,-0l0,-2.411Zm0,-11.25l0.75,0l0,8.036l-0.75,-0l0,-8.036Zm0,-5.625l0.75,0l0,2.411l-0.75,-0l0,-2.411Zm0,-11.25l0.75,0l0,8.036l-0.75,-0l0,-8.036Zm0,-5.625l0.75,0l0,2.411l-0.75,-0l0,-2.411Zm0,-11.25l0.75,0l0,8.036l-0.75,-0l0,-8.036Zm0,-5.625l0.75,0l0,2.411l-0.75,-0l0,-2.411Z",
"name": "path",
"type": "path"
},
{
"elements": [
{
"elements": [
{
"d": "M0.077,-0l0,-0.705l0.306,0c0.077,0 0.137,0.019 0.179,0.056c0.042,0.037 0.063,0.088 0.063,0.155c0,0.043 -0.01,0.081 -0.029,0.112c-0.019,0.031 -0.046,0.055 -0.082,0.072c-0.036,0.017 -0.08,0.025 -0.131,0.025l0.009,-0.015l0.033,-0c0.027,-0 0.051,0.007 0.071,0.02c0.021,0.013 0.039,0.034 0.054,0.063l0.118,0.217l-0.141,-0l-0.122,-0.225c-0.008,-0.015 -0.017,-0.026 -0.027,-0.034c-0.01,-0.009 -0.021,-0.015 -0.034,-0.018c-0.013,-0.003 -0.027,-0.005 -0.044,-0.005l-0.095,-0l0,0.282l-0.128,-0Zm0.128,-0.377l0.156,-0c0.046,-0 0.081,-0.009 0.104,-0.028c0.024,-0.019 0.036,-0.048 0.036,-0.086c0,-0.037 -0.012,-0.065 -0.036,-0.084c-0.023,-0.019 -0.058,-0.029 -0.104,-0.029l-0.156,0l0,0.227Z",
"fill": {
"rule": "nonzero"
},
"name": "path",
"type": "path"
}
],
"fill": {},
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,32.7595,63.7053)",
"type": "group"
},
{
"fill": {},
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,45.5474,63.7053)",
"type": "group"
},
{
"elements": [
{
"d": "M0.247,-0l0,-0.598l-0.242,0l-0,-0.107l0.612,0l0,0.107l-0.242,0l0,0.598l-0.128,-0Z",
"fill": {
"rule": "nonzero"
},
"name": "path",
"type": "path"
}
],
"fill": {},
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,32.7595,82.3466)",
"type": "group"
},
{
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,44.3357,82.3466)",
"type": "group"
},
{
"elements": [
{
"d": "M0.37,0.01c-0.097,0 -0.171,-0.025 -0.222,-0.075c-0.051,-0.051 -0.076,-0.125 -0.076,-0.224l0,-0.416l0.128,0l0,0.415c0,0.063 0.014,0.111 0.043,0.143c0.029,0.031 0.072,0.047 0.127,0.047c0.055,0 0.097,-0.016 0.126,-0.047c0.029,-0.032 0.043,-0.08 0.043,-0.143l0,-0.415l0.127,0l0,0.416c0,0.099 -0.025,0.173 -0.075,0.224c-0.05,0.05 -0.124,0.075 -0.221,0.075Z",
"fill": {
"rule": "nonzero"
},
"name": "path",
"type": "path"
}
],
"fill": {},
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,32.7595,100.988)",
"type": "group"
},
{
"name": "group",
"transform": "matrix(18.6413,0,0,18.6413,46.5168,100.988)",
"type": "group"
}
],
"id": "Name",
"name": "Name",
"transform": "matrix(0.654499,0,0,0.670554,15.7034,-6.33664)",
"type": "group"
}
],
"id": "Box",
"name": "Box",
"type": "group"
},
{
"elements": [
{
"elements": [
{
"cx": "22.5",
"cy": "45",
"fill": {
"opacity": "0"
},
"name": "circle",
"r": "5.625",
"stroke": {
"width": "0.75px"
},
"type": "circle"
},
{
"d": "M18.6,41.002l-6.229,5.897",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linecap": "round",
"width": "0.75px"
},
"type": "path"
},
{
"d": "M32.629,43.323l-6.3,5.832",
"fill": {
"paint": "transparent"
},
"name": "path",
"stroke": {
"linecap": "round",
"width": "0.75px"
},
"type": "path"
}
],
"id": "Motor1",
"name": "Motor1",
"type": "group"
},
{
"elements": [
{
"name": "group",
"transform": "matrix(4.16667,0,0,4.16667,31.2492,55.4948)",
"type": "group"
},
{
"fill": {},
"name": "text",
"style": {
"fontFamily": "\u0027ArialMT\u0027, \u0027Arial\u0027",
"fontSize": "4.167px"
},
"text": "245 KVA",
"type": "text",
"x": "15.111px",
"y": "55.495px"
},
{
"name": "group",
"transform": "matrix(4.16667,0,0,4.16667,30.8626,59.2448)",
"type": "group"
},
{
"fill": {},
"name": "text",
"style": {
"fontFamily": "\u0027ArialMT\u0027, \u0027Arial\u0027",
"fontSize": "4.167px"
},
"text": "297 FLA",
"type": "text",
"x": "15.111px",
"y": "59.245px"
}
],
"id": "Text",
"name": "Text",
"type": "group"
}
],
"id": "Motor",
"name": "Motor",
"type": "group"
},
{
"id": "TagID",
"name": "TagID",
"transform": "matrix(4.16667,0,0,4.16667,49.4275,9.24479)",
"type": "group"
},
{
"fill": {},
"name": "text",
"style": {
"fontFamily": "\u0027Arial-BoldMT\u0027, \u0027Arial\u0027",
"fontSize": "4.167px",
"fontWeight": "700"
},
"text": "RTU-01",
"type": "text",
"x": "34.842px",
"y": "9.245px"
}
],
"fill": {
"rule": "evenodd"
},
"stroke": {
"miterlimit": "1"
},
"style": {
"clipRule": "evenodd"
},
"viewBox": "0 0 60 83"
},
"type": "ia.shapes.svg"
},
{
"meta": {
"name": "AlarmBorder"
},
"position": {
"height": 94,
"width": 65,
"x": 2.76,
"y": 12.26
},
"propConfig": {
"props.style.outlineColor": {
"binding": {
"config": {
"path": "view.custom.alarmSeverity"
},
"transforms": [
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 1,
"output": "var(--coolpurple)"
},
{
"input": 2,
"output": "var(--goldenyellow)"
},
{
"input": 3,
"output": "var(--sunsetorange)"
},
{
"input": 4,
"output": "var(--alarmred)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.style.outlineStyle": {
"binding": {
"config": {
"path": "view.custom.alarmSeverity"
},
"transforms": [
{
"code": "\tif value \u003e 0:\n\t\treturn \"solid\"\n\telse:\n\t\treturn \"none\"",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"outlineWidth": "3"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "EmbeddedView"
},
"position": {
"height": 15,
"width": 15,
"x": 60.75,
"y": 5
},
"propConfig": {
"props.params.AlarmSeverity": {
"binding": {
"config": {
"path": "view.custom.alarmSeverity"
},
"type": "property"
}
}
},
"props": {
"params": {
"ack": false
},
"path": "Library/Alarms/Icons"
},
"type": "ia.display.view"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tpageId \u003d self.page.props.pageId\n\tsystem.perspective.print(\u0027pageId: {}\u0027.format(pageId))\n\t\n\ttagPath \u003d self.view.params.tagPath\n\tobjectName \u003d self.view.params.objectName\n\tutils.nav.openEQPopup(objectName, tagPath)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root"
},
"props": {
"style": {
"classes": "containers/HoverOver"
}
},
"type": "ia.container.coord"
}
}

View File

@@ -0,0 +1,956 @@
{
"custom": {
"airOvr": false,
"allTags": [
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Dehumidifier High Setpoint"
},
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Dehumidifier Low Setpoint"
},
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Economizer Enthalpy Enable SP"
},
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Economizer Control Setpoint"
},
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Supply Air Temp Override"
},
{
"dataType": "",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Emergency Override Alarm Delay Minutes"
},
{
"dataType": "Int4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Day of Week Enable"
},
{
"dataType": "Int4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Occupancy Mode Start Time"
},
{
"dataType": "Boolean",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Supply Air Temp Override En"
},
{
"dataType": "Int4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Unoccupancy Mode Start Time"
},
{
"dataType": "Int8",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Emergency Override Alarm Delay"
},
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"name": "Space Temperature Setpoint"
}
],
"weekDay": 254
},
"params": {
"auth": {
"almAck": true,
"almShelve": true,
"config": true,
"control": true
},
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02"
},
"propConfig": {
"custom.airOvr": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Config/Supply Air Temp Override En"
},
"type": "tag"
},
"persistent": true
},
"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
},
"custom.weekDay": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Config/Day of Week Enable"
},
"type": "tag"
},
"persistent": true
},
"params.auth": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "FlexRepeater"
},
"position": {
"grow": 1
},
"propConfig": {
"custom.SA_Ovr": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Config/Supply Air Temp Override"
},
"type": "tag"
}
},
"custom.SA_Ovr_En": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Config/Supply Air Temp Override EN"
},
"transforms": [
{
"code": "\tif value \u003d\u003d False:\n\t\tself.custom.SA_Ovr \u003d 0\n\treturn value",
"type": "script"
}
],
"type": "tag"
}
},
"props.instances": {
"binding": {
"config": {
"struct": {
"allTags": "{view.custom.allTags}",
"auth": "{view.params.auth.config}",
"tagPath": "{view.params.tagPath} + \"/Config\""
},
"waitOnAll": true
},
"enabled": false,
"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.instances[0].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.instances[10].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.instances[1].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.instances[2].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.instances[3].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.instances[4].enabled": {
"binding": {
"config": {
"struct": {
"airOv": "{view.custom.airOvr}",
"auth": "{view.params.auth.config}"
},
"waitOnAll": true
},
"transforms": [
{
"expression": "{value}[\"airOv\"] \u0026\u0026 {value}[\"auth\"]",
"type": "expression"
}
],
"type": "expr-struct"
}
},
"props.instances[5].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.instances[6].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"enabled": false,
"type": "property"
}
},
"props.instances[7].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.instances[8].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.instances[9].enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
}
},
"props": {
"alignContent": "flex-start",
"elementPosition": {
"basis": "50%",
"grow": 0
},
"instances": [
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"max": 100,
"min": 0,
"name": "Dehumidifier High Setpoint",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Dehumidifier High Setpoint"
},
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"max": 100,
"min": 0,
"name": "Dehumidifier Low Setpoint",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Dehumidifier Low Setpoint"
},
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"max": 35,
"min": 25,
"name": "Economizer Enthalpy Enable SP",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Economizer Enthalpy Enable SP"
},
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"max": 80,
"min": -30,
"name": "Economizer Enable Setpoint",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Economizer Enable Setpoint"
},
{
"dataType": "Float4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"max": 200,
"min": 0,
"name": "Supply Air Temp Override",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Supply Air Temp Override"
},
{
"dataType": "Int4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"max": 9999,
"min": 0,
"name": "Emergency Override Alarm Delay Minutes",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Emergency Override Alarm Delay Minutes",
"visible": true
},
{
"dataType": "Int4",
"enabled": true,
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"max": 120,
"min": 0,
"name": "Space Temperature Setpoint",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Space Temperature Setpoint"
},
{
"dataType": "Int4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"max": 9999,
"min": 0,
"name": "Occupancy Mode Start Time",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Occupancy Mode Start Time"
},
{
"dataType": "Boolean",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"max": 9999,
"min": -9999,
"name": "Supply Air Temp Override En",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Supply Air Temp Override En"
},
{
"dataType": "Int4",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"min": 0,
"name": "Unoccupancy Mode Start Time",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Unoccupancy Mode Start Time"
},
{
"dataType": "Int8",
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"min": 0,
"name": "Emergency Override Alarm Delay",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU02/Config/Emergency Override Alarm Delay"
}
],
"loading": {
"order": "with-parent"
},
"path": "Library/Framework/Tag ConfigV2",
"style": {
"gap": "10px 0",
"padding": "10px"
},
"useDefaultViewHeight": false,
"useDefaultViewWidth": false,
"wrap": "wrap"
},
"type": "ia.display.flex-repeater"
},
{
"meta": {
"name": "Label"
},
"props": {
"text": "Day of the Week Enable"
},
"type": "ia.display.label"
},
{
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tposition \u003d 1\n\tself.view.custom.weekDay \u003d self.view.custom.weekDay ^ (int(1) \u003c\u003c position)\n\t\n\t"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Monday Chbox"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.selected": {
"binding": {
"config": {
"path": "view.custom.weekDay"
},
"transforms": [
{
"expression": "getBit({value},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": false
},
{
"input": 1,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"text": "Monday"
},
"type": "ia.input.checkbox"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tposition \u003d 2\n\tself.view.custom.weekDay \u003d self.view.custom.weekDay ^ (int(1) \u003c\u003c position)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Tuesday Chbox"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.selected": {
"binding": {
"config": {
"path": "view.custom.weekDay"
},
"transforms": [
{
"expression": "getBit({value},2)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": false
},
{
"input": 1,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"text": "Tuesday"
},
"type": "ia.input.checkbox"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tposition \u003d 3\n\tself.view.custom.weekDay \u003d self.view.custom.weekDay ^ (int(1) \u003c\u003c position)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Wednesday Chbox"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.selected": {
"binding": {
"config": {
"path": "view.custom.weekDay"
},
"transforms": [
{
"expression": "getBit({value},3)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": false
},
{
"input": 1,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"text": "Wednesday"
},
"type": "ia.input.checkbox"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tposition \u003d 4\n\tself.view.custom.weekDay \u003d self.view.custom.weekDay ^ (int(1) \u003c\u003c position)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Thursday Chbox"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.selected": {
"binding": {
"config": {
"path": "view.custom.weekDay"
},
"transforms": [
{
"expression": "getBit({value},4)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": false
},
{
"input": 1,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"text": "Thursday"
},
"type": "ia.input.checkbox"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tposition \u003d 5\n\tself.view.custom.weekDay \u003d self.view.custom.weekDay ^ (int(1) \u003c\u003c position)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Friday Chbox"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.selected": {
"binding": {
"config": {
"path": "view.custom.weekDay"
},
"transforms": [
{
"expression": "getBit({value},5)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": false
},
{
"input": 1,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"text": "Friday"
},
"type": "ia.input.checkbox"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tposition \u003d 6\n\tself.view.custom.weekDay \u003d self.view.custom.weekDay ^ (int(1) \u003c\u003c position)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Saturday Chbox"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.selected": {
"binding": {
"config": {
"path": "view.custom.weekDay"
},
"transforms": [
{
"expression": "getBit({value},6)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": false
},
{
"input": 1,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"text": "Saturday"
},
"type": "ia.input.checkbox"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tposition \u003d 7\n\tself.view.custom.weekDay \u003d self.view.custom.weekDay ^ (int(1) \u003c\u003c position)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Sunday Chbox"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.config"
},
"type": "property"
}
},
"props.selected": {
"binding": {
"config": {
"path": "view.custom.weekDay"
},
"transforms": [
{
"expression": "getBit({value},7)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": false
},
{
"input": 1,
"output": true
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"text": "Sunday"
},
"type": "ia.input.checkbox"
}
],
"meta": {
"name": "FlexContainer"
},
"props": {
"alignContent": "center",
"alignItems": "center",
"justify": "space-evenly",
"style": {
"gap": "5px",
"padding": "5px"
},
"wrap": "wrap"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer_0"
},
"position": {
"basis": "100%"
},
"props": {
"direction": "column",
"style": {
"border": "1px solid var(--border)",
"gap": "10px 0",
"padding": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "containers/padded-container"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,726 @@
{
"custom": {
"FCU_tagPath": [],
"backupdata": [
"[Ignition_Common_IO_Gtwy]ER1185/SATB1_HS2_EL1185_FCU01",
"[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU02",
"[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU03",
"[Ignition_Common_IO_Gtwy]ER1160/SATB1_HS2_EL1160_FCU04",
"[Ignition_Common_IO_Gtwy]IDF1174/SATB1_HS2_IDF1174_FCU05",
"[Ignition_Common_IO_Gtwy]IDF1154/SATB1_HS2_IDF1154_FCU06",
"[Ignition_Common_IO_Gtwy]MDF1149/SATB1_HS2_MDF1149_FCU07",
"[Ignition_Common_IO_Gtwy]MDF1149/SATB1_HS2_MDF1149_FCU08",
"[Ignition_Common_IO_Gtwy]FS1285/SATB1_HS2_FS1285_FCU09",
"[Ignition_Common_IO_Gtwy]IDF1286/SATB1_HS2_IDF1286_FCU10",
"[Ignition_Common_IO_Gtwy]IDF1286/SATB1_HS2_IDF1286_FCU11",
"[Ignition_Common_IO_Gtwy]ER1287/SATB1_HS2_EL1287_FCU12",
"[Ignition_Common_IO_Gtwy]ER1284/SATB1_HS2_EL1284_FCU13",
"[Ignition_Common_IO_Gtwy]IDF1274/SATB1_HS2_IDF1274_FCU14",
"[Ignition_Common_IO_Gtwy]IDF1264/SATB1_HS2_IDF1264_FCU15",
"[Ignition_Common_IO_Gtwy]ER1128/SATB1_HS2_EL1128_FCU16",
"[Ignition_Common_IO_Gtwy]MR1125/SATB1_HS2_ME1125_FCU17",
"[Ignition_Common_IO_Gtwy]ER1229/SATB1_HS2_EL1229_FCU18",
"[Ignition_Common_IO_Gtwy]IDF1218/SATB1_HS2_IDF1218_FCU19",
"[Ignition_Common_IO_Gtwy]IDF1122/SATB1_HS2_IDF1122_FCU20",
"[Ignition_Common_IO_Gtwy]FS1232/SATB1_HS2_FS1232_FCU21",
"[Ignition_Common_IO_Gtwy]MR1132/SATB1_HS2_ME1132_FCU22",
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU23",
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU24",
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU25",
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU26",
"[Ignition_Common_IO_Gtwy]RM1219/SATB1_HS2_RM1219_FCU27",
"[Ignition_Common_IO_Gtwy]RM1193/SATB1_HS2_RM1193_FCU28",
"[Ignition_Common_IO_Gtwy]RM1234/SATB1_HS2_RM1234_FCU29"
],
"data": [
"[Ignition_Common_IO_Gtwy]ER1185/SATB1_HS2_EL1185_FCU01",
"[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU02",
"[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU03",
"[Ignition_Common_IO_Gtwy]ER1160/SATB1_HS2_EL1160_FCU04",
"[Ignition_Common_IO_Gtwy]IDF1174/SATB1_HS2_IDF1174_FCU05",
"[Ignition_Common_IO_Gtwy]IDF1154/SATB1_HS2_IDF1154_FCU06",
"[Ignition_Common_IO_Gtwy]MDF1149/SATB1_HS2_MDF1149_FCU07",
"[Ignition_Common_IO_Gtwy]MDF1149/SATB1_HS2_MDF1149_FCU08",
"[Ignition_Common_IO_Gtwy]FS1285/SATB1_HS2_FS1285_FCU09",
"[Ignition_Common_IO_Gtwy]IDF1286/SATB1_HS2_IDF1286_FCU10",
"[Ignition_Common_IO_Gtwy]IDF1286/SATB1_HS2_IDF1286_FCU11",
"[Ignition_Common_IO_Gtwy]ER1287/SATB1_HS2_EL1287_FCU12",
"[Ignition_Common_IO_Gtwy]ER1284/SATB1_HS2_EL1284_FCU13",
"[Ignition_Common_IO_Gtwy]IDF1274/SATB1_HS2_IDF1274_FCU14",
"[Ignition_Common_IO_Gtwy]IDF1264/SATB1_HS2_IDF1264_FCU15",
"[Ignition_Common_IO_Gtwy]ER1128/SATB1_HS2_EL1128_FCU16",
"[Ignition_Common_IO_Gtwy]MR1125/SATB1_HS2_ME1125_FCU17",
"[Ignition_Common_IO_Gtwy]ER1229/SATB1_HS2_EL1229_FCU18",
"[Ignition_Common_IO_Gtwy]IDF1218/SATB1_HS2_IDF1218_FCU19",
"[Ignition_Common_IO_Gtwy]IDF1122/SATB1_HS2_IDF1122_FCU20",
"[Ignition_Common_IO_Gtwy]FS1232/SATB1_HS2_FS1232_FCU21",
"[Ignition_Common_IO_Gtwy]MR1132/SATB1_HS2_ME1132_FCU22",
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU23",
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU24",
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU25",
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS2_RM1138_FCU26",
"[Ignition_Common_IO_Gtwy]RM1219/SATB1_HS2_RM1219_FCU27",
"[Ignition_Common_IO_Gtwy]RM1193/SATB1_HS2_RM1193_FCU28",
"[Ignition_Common_IO_Gtwy]RM1234/SATB1_HS2_RM1234_FCU29"
],
"selectedRoom": "MDF1187",
"tagPath": "[Ignition_Common_IO_Gtwy]"
},
"params": {},
"propConfig": {
"custom.FCU_tagPath": {
"binding": {
"config": {
"struct": {
"selected": "{view.custom.selectedRoom}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\tselected \u003d value[\"selected\"]\n\tpath \u003d str(self.view.custom.tagPath) + selected\n\ttags \u003d system.tag.browse(path,{\"typeId\":\"Objects/Air/FCU\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\toutput \u003d []\n\tfor item in tags:\n\t\toutput.append(item[\"fullPath\"])\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
},
"persistent": true
},
"custom.backupdata": {
"persistent": true
},
"custom.data": {
"persistent": true
},
"custom.selectedRoom": {
"persistent": true
},
"custom.tagPath": {
"persistent": true
}
},
"props": {
"defaultSize": {
"width": 1200
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "FlexRepeater"
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"path": "view.custom.FCU_tagPath"
},
"enabled": false,
"transforms": [
{
"code": "\toutput \u003d []\n\tfor item in value:\n\t\toutput.append({\"instanceStyle\":{\"classes\": \"\"},\n\t\t\t\t\t\t\"instancePosition\":{},\n\t\t\t\t\t\t\"embedded\": False,\n\t\t\t\t\t\t\"objectName\": \"FCU\",\n\t\t\t\t\t\t\"tagPath\": item})\n\treturn output",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"direction": "column",
"instances": [
{
"embedded": false,
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"objectName": "FCU",
"tagPath": "[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU02"
},
{
"embedded": false,
"instancePosition": {},
"instanceStyle": {
"classes": ""
},
"objectName": "FCU",
"tagPath": "[Ignition_Common_IO_Gtwy]MDF1187/SATB1_HS2_MDF1187_FCU03"
}
],
"path": "Library/Diagrams/HVAC/Dgrm_FCU",
"style": {
"overflow": "visible"
},
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
}
],
"meta": {
"name": "Diagram"
},
"position": {
"basis": "70%",
"grow": 1
},
"props": {
"alignContent": "center",
"alignItems": "center",
"direction": "column",
"justify": "center",
"style": {
"backgroundColor": "var(--container)"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Label"
},
"props": {
"text": "Second Floor"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "FirstFloor Percent"
},
"position": {
"basis": "15%",
"grow": 1
},
"props": {
"path": "Library/Widgets/Layouts/RTU_SecondFloor",
"style": {
"overflow": "visible"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Label_0"
},
"props": {
"text": "First Floor"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "FirstFloor Percent_0"
},
"position": {
"basis": "15%",
"grow": 1
},
"props": {
"path": "Library/Widgets/Layouts/RTU_FirstFloor",
"style": {
"overflow": "visible"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Label_1"
},
"props": {
"text": "List of devices"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onRowClick": {
"config": {
"script": "\tpayload \u003d {\"Room\":self.props.selection.data[0].Room}\n\tmessageType \u003d \"updateRoom\"\n\tsystem.perspective.sendMessage(messageType, payload)\n\tmessageType \u003d \"layout_01_Update\"\n\tsystem.perspective.sendMessage(messageType, payload)\n\tmessageType \u003d \"layout_02_Update\"\n\tsystem.perspective.sendMessage(messageType, payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Table"
},
"position": {
"basis": "55%"
},
"propConfig": {
"custom.selectedData": {
"binding": {
"config": {
"path": "this.props.selection.selectedRow"
},
"transforms": [
{
"code": "\tif value is None:\n\t\tvalue \u003d 0\n\ttagPath \u003d self.props.data[value][\"tagPath\"]\n\ttagPath \u003d tagPath.split(\"/\")\n\ttags \u003d system.tag.browse(tagPath[0],{\"typeId\":\"Objects/Air/FCU\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\treturn tags",
"type": "script"
}
],
"type": "property"
}
},
"props.data": {
"binding": {
"config": {
"struct": {
"paths": "{view.custom.data}",
"time": "now(3000)"
},
"waitOnAll": false
},
"overlayOptOut": true,
"transforms": [
{
"code": "\toutput \u003d []\n\tdata \u003d value[\"paths\"]\n\t\n\tAlarmSeverity \u003d \"\"\n\tfor item in data:\n\t\t\n\t\t\"\"\"\n\t\tAlmS \u003d alarm.summary.calcMaxPriority(item)\n\t\t\n\t\tif(AlmS \u003d\u003d 1):\n\t\t\tAlarmSeverity \u003d \"Controller\"\n\t\telif(AlmS \u003d\u003d 2):\n\t\t\tAlarmSeverity \u003d \"Info\"\n\t\telif(AlmS \u003d\u003d 3):\n\t\t\tAlarmSeverity \u003d \"Warning\"\n\t\telif(AlmS \u003d\u003d 4):\n\t\t\tAlarmSeverity \u003d \"Critical\"\n\t\telse:\n\t\t\tAlarmSeverity \u003d \" \"\n\t\t\"\"\"\n\t\tST \u003d system.tag.readBlocking(item + \"/Space Temperature\")[0].value\n\t\t#Name \u003d system.tag.readBlocking(item + \"/Meta/EqName\",1000)[0].value\n\t\t#Room \u003d system.tag.readBlocking(item + \"/Meta/Room\",1000)[0].value\n\t\tRoom \u003d item.split(\u0027/\u0027)[0].split(\u0027]\u0027)[1]\n\t\tName \u003d item.split(\u0027_\u0027)[6]\n\t\tpath \u003d item\n\t\toutput.append({ \"ST\": ST,\n\t\t\t\t\t\t\"Name\": Name,\n\t\t\t\t\t\t\"Room\": Room,\n\t\t\t\t\t\t\"AlarmSeverity\": AlarmSeverity,\n\t\t\t\t\t\t\"tagPath\": path})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"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": "left",
"style": {
"classes": ""
},
"title": "Name"
},
"justify": "auto",
"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": "flex grow"
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "Room",
"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": "left",
"style": {
"classes": ""
},
"title": ""
},
"justify": "auto",
"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": ""
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "ST",
"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": "left",
"style": {
"classes": ""
},
"title": "Space Temp"
},
"justify": "auto",
"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": ""
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "MM/DD/YYYY",
"editable": false,
"field": "AlarmSeverity",
"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": "left",
"style": {
"classes": ""
},
"title": "Alarm Severity"
},
"justify": "auto",
"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": ""
}
],
"filter": {
"enabled": true
}
},
"type": "ia.display.table"
}
],
"custom": {
"tagPath": "[Ignition_Common_IO_Gtwy]"
},
"meta": {
"name": "Location"
},
"position": {
"basis": "450px",
"grow": 1
},
"props": {
"direction": "column",
"justify": "space-evenly",
"style": {
"backgroundColor": "var(--container)",
"borderBottomLeftRadius": "var(--borderRadius)",
"borderBottomRightRadius": "var(--borderRadius)",
"borderTopLeftRadius": "var(--borderRadius)",
"borderTopRightRadius": "var(--borderRadius)",
"boxShadow": "var(--boxShadow2)",
"overflow": "visible",
"padding": 10
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"justify": "space-evenly",
"style": {
"backgroundColor": "var(--containerRoot)",
"overflow": "visible",
"padding": 15
}
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "updateRoom",
"pageScope": true,
"script": "\t# implement your handler here\n\tself.view.custom.selectedRoom \u003d payload[\"Room\"]",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,209 @@
{
"custom": {},
"params": {
"tagpath": "value",
"title": "value"
},
"propConfig": {
"params.tagpath": {
"paramDirection": "input",
"persistent": true
},
"params.title": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 111,
"width": 51
}
},
"root": {
"children": [
{
"meta": {
"name": "Title"
},
"position": {
"basis": "15%"
},
"props": {
"style": {
"fontSize": 12,
"textAlign": "center"
},
"text": "Dewpoint"
},
"type": "ia.display.label"
},
{
"children": [
{
"meta": {
"name": "MovingAnalogIndicator"
},
"position": {
"basis": "50%"
},
"propConfig": {
"props.processValue": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"DH": "{view.params.DH}",
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/OPC Tags/SATB1_DH{DH}_Dwpt"
},
"enabled": false,
"transforms": [
{
"code": "\tif value is None:\n\t\treturn 0\n\treturn value",
"type": "script"
},
{
"formatType": "numeric",
"formatValue": "###.##",
"type": "format"
}
],
"type": "tag"
}
}
},
"props": {
"desiredHigh": 65,
"desiredLow": 40,
"desiredRangeColor": "#4BC7D3",
"highAlarm": 90,
"highHighAlarm": null,
"highInterlock": null,
"label": {
"style": {
"fontSize": 30,
"fontWeight": "normal",
"overflow": "visible",
"textAlign": "left"
}
},
"lowAlarm": 10,
"lowInterlock": null,
"lowLowAlarm": null,
"processValue": 65,
"style": {
"overflow": "visible"
}
},
"type": "ia.display.moving-analog-indicator"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "80%"
},
"props": {
"justify": "center",
"style": {
"overflow": "visible"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Value"
},
"position": {
"basis": "50px"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"DH": "{view.params.DH}",
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/OPC Tags/SATB1_DH{DH}_Dwpt"
},
"transforms": [
{
"code": "\tif value is None:\n\t\treturn 0\n\treturn value",
"type": "script"
},
{
"formatType": "numeric",
"formatValue": "###.##",
"type": "format"
}
],
"type": "tag"
}
}
},
"props": {
"textStyle": {
"color": "--tagvalue-color",
"fontFamily": "inherit",
"fontSize": 12,
"textAlign": "end"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "EU"
},
"position": {
"basis": "50px"
},
"props": {
"text": "degF",
"textStyle": {
"color": "--units-color",
"fontFamily": "inherit",
"fontSize": 12
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "FlexContainer_0"
},
"position": {
"basis": "15%"
},
"props": {
"justify": "center",
"style": {
"gap": "5px",
"overflow": "visible"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"overflow": "visible"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,644 @@
{
"custom": {
"Temp": [
null,
null,
null
],
"gradient": [
null,
null,
null
],
"inMax": 5,
"inMin": -5,
"paths": [
null,
null,
null
]
},
"params": {
"Aisle": "TL200",
"SP": 65,
"embedded": true,
"tagPath": "[Ignition_Common_IO_Gtwy]RM1152/SATB1_RM1152_"
},
"propConfig": {
"custom.Temp": {
"persistent": true
},
"custom.Temp[0]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.custom.paths[0]}"
},
"tagPath": "{0}/Val"
},
"type": "tag"
}
},
"custom.Temp[1]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.custom.paths[1]}"
},
"tagPath": "{1}/Val"
},
"type": "tag"
}
},
"custom.Temp[2]": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"2": "{view.custom.paths[2]}"
},
"tagPath": "{2}/Val"
},
"type": "tag"
}
},
"custom.gradient": {
"persistent": true
},
"custom.gradient[0]": {
"binding": {
"config": {
"expression": "{view.custom.Temp[0]}-{view.params.SP}\r\n"
},
"transforms": [
{
"code": "\tif value\u003eself.custom.inMax: value \u003d 5\n\tif value\u003cself.custom.inMin: value \u003d -5\n\tnormalized \u003d (float(value) - self.custom.inMin)/(self.custom.inMax - self.custom.inMin)\n\treturn normalized",
"type": "script"
}
],
"type": "expr"
}
},
"custom.gradient[1]": {
"binding": {
"config": {
"expression": "{view.custom.Temp[1]}-{view.params.SP}\r\n"
},
"transforms": [
{
"code": "\tif value\u003eself.custom.inMax: value \u003d 10\n\tif value\u003cself.custom.inMin: value \u003d -10\n\tnormalized \u003d (float(value) - self.custom.inMin)/(self.custom.inMax - self.custom.inMin)\n\treturn normalized",
"type": "script"
}
],
"type": "expr"
}
},
"custom.gradient[2]": {
"binding": {
"config": {
"expression": "{view.custom.Temp[2]}-{view.params.SP}\r\n"
},
"transforms": [
{
"code": "\tif value\u003eself.custom.inMax: value \u003d 10\n\tif value\u003cself.custom.inMin: value \u003d -10\n\tnormalized \u003d (float(value) - self.custom.inMin)/(self.custom.inMax - self.custom.inMin)\n\treturn normalized",
"type": "script"
}
],
"type": "expr"
}
},
"custom.inMax": {
"persistent": true
},
"custom.inMin": {
"persistent": true
},
"custom.paths": {
"persistent": true
},
"custom.paths[0]": {
"binding": {
"config": {
"expression": "concat({view.params.tagPath},{view.params.Aisle},\"_TT04_C\")"
},
"type": "expr"
}
},
"custom.paths[1]": {
"binding": {
"config": {
"expression": "concat({view.params.tagPath},{view.params.Aisle},\"_TT05_C\")"
},
"type": "expr"
}
},
"custom.paths[2]": {
"binding": {
"config": {
"expression": "concat({view.params.tagPath},{view.params.Aisle},\"_TT06_C\")"
},
"type": "expr"
}
},
"params.Aisle": {
"paramDirection": "input",
"persistent": true
},
"params.SP": {
"paramDirection": "input",
"persistent": true
},
"params.embedded": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 350,
"width": 50
}
},
"root": {
"children": [
{
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tif(self.view.params.embedded \u003d\u003d True):\n\t\tpageId \u003d self.page.props.pageId\n\t\tsystem.perspective.print(\u0027pageId: {}\u0027.format(pageId))\n\t\n\t\ttagPath \u003d self.view.params.tagPath\n\t\tobjectName \u003d self.view.params.objectName\n\t\tutils.nav.openEQPopup(objectName, tagPath)\n\telse:\n\t\ttagPath \u003d self.view.params.tagPath\n\t\tobjectName \u003d self.view.params.objectName\n\t\tpayload\u003d{\n\t\t\t\u0027objectName\u0027: objectName,\n\t\t\t\u0027tagPath\u0027: tagPath,\n\t\t\t\u0027modal\u0027: False,\n\t\t\t\u0027resizable\u0027: True,\n\t\t\t\u0027draggable\u0027: True,\n\t\t\t\u0027position\u0027: {\n\t#\t\t\t\u0027left\u0027:\u00270\u0027,\n\t#\t\t\t\u0027top\u0027:\u00270\u0027,\n\t\t\t\u0027width\u0027: \u00271000px\u0027,\n\t\t\t\u0027height\u0027: \u0027800px\u0027\n\t\t\t}\n\t\t}\n\t\tutils.nav.eqPopupMsg(self, payload)"
},
"enabled": false,
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "uppterTT"
},
"position": {
"basis": "20px"
},
"propConfig": {
"props.params.EU": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.custom.paths[0]}"
},
"tagPath": "{0}/Config/Celcius To Farenheit"
},
"transforms": [
{
"fallback": "EU",
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": "°C"
},
{
"input": true,
"output": "°F"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
},
"props.params.embedded": {
"binding": {
"config": {
"path": "view.params.embedded"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"expression": "concat({view.params.tagPath},{view.params.Aisle},\"_TT04_C\")"
},
"type": "expr"
}
}
},
"props": {
"params": {
"objectName": "AnalogInRS485"
},
"path": "Library/CommonObjects/DH_Transmitter",
"style": {
"classes": "containers/HoverOver",
"overflow": "visible"
}
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tif(self.view.params.embedded \u003d\u003d True):\n\t\tpageId \u003d self.page.props.pageId\n\t\tsystem.perspective.print(\u0027pageId: {}\u0027.format(pageId))\n\t\n\t\ttagPath \u003d self.view.params.tagPath\n\t\tobjectName \u003d self.view.params.objectName\n\t\tutils.nav.openEQPopup(objectName, tagPath)\n\telse:\n\t\ttagPath \u003d self.view.params.tagPath\n\t\tobjectName \u003d self.view.params.objectName\n\t\tpayload\u003d{\n\t\t\t\u0027objectName\u0027: objectName,\n\t\t\t\u0027tagPath\u0027: tagPath,\n\t\t\t\u0027modal\u0027: False,\n\t\t\t\u0027resizable\u0027: True,\n\t\t\t\u0027draggable\u0027: True,\n\t\t\t\u0027position\u0027: {\n\t#\t\t\t\u0027left\u0027:\u00270\u0027,\n\t#\t\t\t\u0027top\u0027:\u00270\u0027,\n\t\t\t\u0027width\u0027: \u00271000px\u0027,\n\t\t\t\u0027height\u0027: \u0027800px\u0027\n\t\t\t}\n\t\t}\n\t\tutils.nav.eqPopupMsg(self, payload)"
},
"enabled": false,
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "upperHT"
},
"position": {
"basis": "20px"
},
"propConfig": {
"props.params.embedded": {
"binding": {
"config": {
"path": "view.params.embedded"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"expression": "concat({view.params.tagPath},{view.params.Aisle},\"_HT04_C\")"
},
"type": "expr"
}
}
},
"props": {
"params": {
"EU": "%",
"objectName": "AnalogInRS485"
},
"path": "Library/CommonObjects/DH_Transmitter",
"style": {
"classes": "containers/HoverOver",
"overflow": "visible"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "upperTransmitters"
},
"position": {
"basis": "20%"
},
"props": {
"direction": "column",
"justify": "center",
"style": {
"overflow": "visible"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tif(self.view.params.embedded \u003d\u003d True):\n\t\tpageId \u003d self.page.props.pageId\n\t\tsystem.perspective.print(\u0027pageId: {}\u0027.format(pageId))\n\t\n\t\ttagPath \u003d self.view.params.tagPath\n\t\tobjectName \u003d self.view.params.objectName\n\t\tutils.nav.openEQPopup(objectName, tagPath)\n\telse:\n\t\ttagPath \u003d self.view.params.tagPath\n\t\tobjectName \u003d self.view.params.objectName\n\t\tpayload\u003d{\n\t\t\t\u0027objectName\u0027: objectName,\n\t\t\t\u0027tagPath\u0027: tagPath,\n\t\t\t\u0027modal\u0027: False,\n\t\t\t\u0027resizable\u0027: True,\n\t\t\t\u0027draggable\u0027: True,\n\t\t\t\u0027position\u0027: {\n\t#\t\t\t\u0027left\u0027:\u00270\u0027,\n\t#\t\t\t\u0027top\u0027:\u00270\u0027,\n\t\t\t\u0027width\u0027: \u00271000px\u0027,\n\t\t\t\u0027height\u0027: \u0027800px\u0027\n\t\t\t}\n\t\t}\n\t\tutils.nav.eqPopupMsg(self, payload)"
},
"enabled": false,
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "midTT"
},
"position": {
"basis": "20px"
},
"propConfig": {
"props.params.EU": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.custom.paths[1]}"
},
"tagPath": "{0}/Config/Celcius To Farenheit"
},
"transforms": [
{
"fallback": "EU",
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": "°C"
},
{
"input": true,
"output": "°F"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
},
"props.params.embedded": {
"binding": {
"config": {
"path": "view.params.embedded"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"expression": "concat({view.params.tagPath},{view.params.Aisle},\"_TT05_C\")"
},
"type": "expr"
}
}
},
"props": {
"params": {
"objectName": "AnalogInRS485"
},
"path": "Library/CommonObjects/DH_Transmitter",
"style": {
"classes": "containers/HoverOver",
"overflow": "visible"
}
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tpageId \u003d self.page.props.pageId\n\tsystem.perspective.print(\u0027pageId: {}\u0027.format(pageId))\n\t\n\ttagPath \u003d self.view.params.tagPath\n\tobjectName \u003d self.view.params.objectName\n\tutils.nav.openEQPopup(objectName, tagPath)"
},
"enabled": false,
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "midHT"
},
"position": {
"basis": "20px"
},
"propConfig": {
"props.params.embedded": {
"binding": {
"config": {
"path": "view.params.embedded"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"expression": "concat({view.params.tagPath},{view.params.Aisle},\"_HT05_C\")"
},
"type": "expr"
}
}
},
"props": {
"params": {
"EU": "%",
"objectName": "AnalogInRS485"
},
"path": "Library/CommonObjects/DH_Transmitter",
"style": {
"classes": "containers/HoverOver",
"overflow": "visible"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "midTransmitters"
},
"position": {
"basis": "60%"
},
"props": {
"alignContent": "space-between",
"direction": "column",
"justify": "center",
"style": {
"overflow": "visible"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tpageId \u003d self.page.props.pageId\n\tsystem.perspective.print(\u0027pageId: {}\u0027.format(pageId))\n\t\n\ttagPath \u003d self.view.params.tagPath\n\tobjectName \u003d self.view.params.objectName\n\tutils.nav.openEQPopup(objectName, tagPath)"
},
"enabled": false,
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "lowerTT"
},
"position": {
"basis": "20px"
},
"propConfig": {
"props.params.EU": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.custom.paths[2]}"
},
"tagPath": "{0}/Config/Celcius To Farenheit"
},
"transforms": [
{
"fallback": "EU",
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": "°C"
},
{
"input": true,
"output": "°F"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
}
},
"props.params.embedded": {
"binding": {
"config": {
"path": "view.params.embedded"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"expression": "concat({view.params.tagPath},{view.params.Aisle},\"_TT06_C\")"
},
"type": "expr"
}
}
},
"props": {
"params": {
"objectName": "AnalogInRS485"
},
"path": "Library/CommonObjects/DH_Transmitter",
"style": {
"classes": "containers/HoverOver",
"overflow": "visible"
}
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tpageId \u003d self.page.props.pageId\n\tsystem.perspective.print(\u0027pageId: {}\u0027.format(pageId))\n\t\n\ttagPath \u003d self.view.params.tagPath\n\tobjectName \u003d self.view.params.objectName\n\tutils.nav.openEQPopup(objectName, tagPath)"
},
"enabled": false,
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "lowerHT"
},
"position": {
"basis": "20px"
},
"propConfig": {
"props.params.embedded": {
"binding": {
"config": {
"path": "view.params.embedded"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"expression": "concat({view.params.tagPath},{view.params.Aisle},\"_HT06_C\")"
},
"type": "expr"
}
}
},
"props": {
"params": {
"EU": "%",
"objectName": "AnalogInRS485"
},
"path": "Library/CommonObjects/DH_Transmitter",
"style": {
"classes": "containers/HoverOver",
"overflow": "visible"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "lowerTransmitters"
},
"position": {
"basis": "20%"
},
"props": {
"direction": "column",
"justify": "center",
"style": {
"overflow": "visible"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"propConfig": {
"props.style.backgroundImage": {
"binding": {
"config": {
"expression": "concat(\"linear-gradient(to bottom, rgba(00.0, 127.0,210.0, \",{view.custom.gradient[0]},\"), rgba(00.0, 127.0,210.0, \",{view.custom.gradient[1]},\"),rgba(00.0, 127.0,210.0, \",{view.custom.gradient[2]},\"))\")"
},
"type": "expr"
}
}
},
"props": {
"direction": "column",
"style": {
"overflow": "visible",
"paddingBottom": "2px",
"paddingLeft": "2px",
"paddingRight": "2px",
"paddingTop": "2px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,480 @@
{
"custom": {
"trendConfig": {}
},
"params": {
"selectedPens": [],
"tagPath": "[Ignition_Common_IO_Gtwy]Yard/SATB1_YARD_UT-M1/Source 1 Switch"
},
"propConfig": {
"custom.trendConfig": {
"persistent": true
},
"custom.trendConfig.allPens": {
"binding": {
"config": {
"struct": {
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"custom.trendConfig.selectedPens": {
"binding": {
"config": {
"path": "view.params.selectedPens"
},
"type": "property"
}
},
"params.selectedPens": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"width": 1200
}
},
"root": {
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "ToggleSwitch"
},
"position": {
"basis": "34px",
"shrink": 0
},
"props": {
"label": {
"text": "Table View"
}
},
"type": "ia.input.toggle-switch"
},
{
"meta": {
"name": "FlexRepeater"
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"struct": {
"allPens": "{view.custom.trendConfig.allPens}",
"selectedPens": "{view.custom.trendConfig.selectedPens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"direction": "column",
"elementPosition": {
"basis": "auto",
"grow": 0,
"shrink": 0
},
"loading": {
"order": "with-parent"
},
"path": "Library/Templates/Framework/Pen List",
"useDefaultViewHeight": false,
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
}
],
"meta": {
"name": "Pens Lists"
},
"position": {
"basis": "250px"
},
"props": {
"direction": "column",
"style": {
"border": "1px solid var(--border)",
"border-right": "none"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"domId": "CustomPowerChart",
"name": "Power Chart"
},
"position": {
"basis": "800px",
"grow": 1
},
"propConfig": {
"custom.pens": {
"binding": {
"config": {
"struct": {
"axes": "{this.props.axes}",
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
"type": "script"
},
{
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"position.display": {
"binding": {
"config": {
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
},
"type": "expr"
}
},
"props.axes": {
"binding": {
"config": {
"struct": {
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"props.config": {
"onChange": {
"enabled": null,
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
}
},
"props.pens": {
"binding": {
"config": {
"struct": {
"enabledPens": "{view.custom.trendConfig.selectedPens}",
"pens": "{this.custom.pens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"config": {
"endDate": {
"$": [
"ts",
0,
1731972292627
],
"$ts": 1730879940000
},
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
"responsiveDesignWidth": 100,
"startDate": {
"$": [
"ts",
0,
1731972292627
],
"$ts": 1730733759000
},
"unitOfTime": 2,
"visibility": {
"buttons": {
"showAnnotationButton": false,
"showSettingsButton": false,
"showTagBrowserButton": false
}
}
},
"interaction": {
"chartZoomLevel": 1,
"rangeZoomLevel": 1
},
"plots": [
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 2,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 1,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 1,
"style": {
"classes": ""
}
}
]
},
"type": "ia.chart.powerchart"
},
{
"children": [
{
"meta": {
"name": "Label",
"visible": false
},
"position": {
"basis": "200px"
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Power Chart.props.pens"
},
"transforms": [
{
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"color": "--neutral-80",
"fontSize": "14px",
"marginTop": "-143px",
"minHeight": "-143px"
},
"text": "Please select a tag."
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Pens Cont"
},
"position": {
"basis": "0px"
},
"props": {
"alignItems": "center",
"direction": "column",
"style": {
"overflow": "visible",
"zIndex": 0
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "TrendTable"
},
"position": {
"basis": "320px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Pens Lists/ToggleSwitch.props.selected"
},
"type": "property"
}
},
"props.params.historianSettings": {
"binding": {
"config": {
"path": "..../FlexContainer.custom.historianSettings"
},
"type": "property"
}
},
"props.params.selectedPens": {
"binding": {
"config": {
"path": "../Power Chart.props.pens"
},
"type": "property"
}
}
},
"props": {
"path": "Library/Templates/Framework/TrendTable"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "Chart Cont"
},
"position": {
"basis": "200px",
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"custom": {
"historianSettings": {
"dateFormat": "YYYY/MM/DD",
"endDate": {
"$": [
"ts",
192,
1747947747922
],
"$ts": 1730879940000
},
"export": {
"dateFormat": "None",
"timeFormat": "x"
},
"measureOfTime": "hours",
"mode": "realtime",
"penNamePathDepth": 1,
"pointCount": 300,
"rangeEndDate": null,
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
"rangeStartDate": null,
"refreshRate": 1000,
"responsiveDesignWidth": 100,
"startDate": {
"$": [
"ts",
192,
1747947747922
],
"$ts": 1730733759000
},
"tagBrowserStartPath": "",
"timeFormat": "h:mm A",
"unitOfTime": 2,
"visibility": {
"buttons": {
"showAnnotationButton": false,
"showFullscreenButton": true,
"showMoreButton": true,
"showPanZoomButton": true,
"showRangeBrushButton": true,
"showSettingsButton": false,
"showTagBrowserButton": false,
"showXTraceButton": true
},
"showDateRangeSelector": true,
"showPenControlDisplay": true,
"showTagBrowser": false
}
}
},
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "100%"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "containers/padded-container"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,416 @@
{
"custom": {
"allTags": [
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Apparent Power",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Current Avg",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Frequency",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Current A",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Current B",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Current C",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Current N",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Voltage AB",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Voltage AN",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Voltage Avg",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Voltage BC",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Voltage BN",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Voltage CA",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Voltage CN",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "KFactor A",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "KFactor B",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "KFactor C",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Power Factor",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Reactive Power",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Real Energy",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Real Power",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Sag Events",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Voltage THD A",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Voltage THD B",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Voltage THD C",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Voltage Unbalance",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "kW A",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "kW B",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "kW C",
"options": []
}
]
},
"params": {
"tagPath": "[Ignition_SATB1_IO1_default]GAL1261/SATB1_GAL1261_PDU_P1-2-2/PQM"
},
"propConfig": {
"custom.allTags": {
"binding": {
"config": {
"struct": {
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"enabled": false,
"transforms": [
{
"code": "\toutput \u003d []\n\t# Simulate fetching tag configurations and sorting by name\n\tnodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n\tfor item in nodes:\n\t if \u0027tags\u0027 in item:\n\t \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n\t \t#sortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027) if x.get(\u0027engUnit\u0027, \u0027misc\u0027) !\u003d \"\" else \u0027misc\u0027)\n for tagConfig in sortedTags:\n if str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n name \u003d tagConfig.get(\"name\", \"\")\n dataType \u003d tagConfig.get(\"dataType\", \"\")\n tagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n if dataType \u003d\u003d \u0027Boolean\u0027:\n \tdisplaySel \u003d 1\n else:\n \tdisplaySel \u003d 0\n instance \u003d {\n \"instanceStyle\": {\n \"classes\": \"\"\n },\n \"instancePosition\": 999,\n \"name\": name,\n \"dataType\": dataType,\n \"displaySelection\": displaySel,\n \"format\": \"0.0\",\n \"options\": []\n }\n output.append(instance)\n\t# Return or process the sorted output\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
},
"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}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\tallTags \u003d system.util.jsonDecode(system.util.jsonEncode(value[\u0027allTags\u0027]))\n\tfor tag in allTags:\n\t\ttagName \u003d tag[\"name\"]\n\t\ttag[\"tagPath\"] \u003d value[\"tagPath\"] + \"/\" +tagName\n\t\toutput.append(tag)\n\toutput_sorted \u003d sorted(output, key\u003dlambda item: item[\"instancePosition\"])\n\treturn output_sorted",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"alignContent": "flex-start",
"elementPosition": {
"basis": "50%",
"grow": 0
},
"loading": {
"order": "with-parent"
},
"path": "Library/Framework/Tag Info",
"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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,120 @@
{
"custom": {
"colorHandler": {
"auto": "#FF5101",
"manual": "#FF5101",
"none": "#FFFFFF"
}
},
"params": {
"Mode": 1,
"options": [
"Local",
"Remote"
]
},
"propConfig": {
"custom.colorHandler": {
"persistent": true
},
"params.Mode": {
"paramDirection": "input",
"persistent": true
},
"params.options": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 20,
"width": 60
}
},
"root": {
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "100%",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{view.params.Mode}\u003e0"
},
"enabled": false,
"type": "expr"
}
},
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "view.params.Mode"
},
"enabled": false,
"transforms": [
{
"code": "\tif value \u003c 0:\n\t\toutput \u003d self.view.custom.colorHandler.none\n\tif value \u003d\u003d 0:\n\t\toutput \u003d self.view.custom.colorHandler.manual\n\tif value \u003d\u003d 1:\n\t\toutput \u003d self.view.custom.colorHandler.auto\t\n\tif value \u003e 1:\n\t\toutput \u003d self.view.custom.colorHandler.none\n\t\n\n\treturn output",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.Mode"
},
"transforms": [
{
"code": "\tif value:\n\t\treturn self.view.params.options[1]\n\telse:\n\t\treturn self.view.params.options[0]",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"backgroundColor": "#DF5D00",
"borderBottomLeftRadius": "var(--borderRadius)",
"borderBottomRightRadius": "var(--borderRadius)",
"borderTopLeftRadius": "var(--borderRadius)",
"borderTopRightRadius": "var(--borderRadius)",
"paddingLeft": 5,
"paddingRight": 5
},
"textStyle": {
"color": "#FFFFFF",
"fontSize": 12,
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"borderBottomLeftRadius": "var(--borderRadius)",
"borderBottomRightRadius": "var(--borderRadius)",
"borderTopLeftRadius": "var(--borderRadius)",
"borderTopRightRadius": "var(--borderRadius)",
"boxShadow": "var(--boxShadow1)",
"overflow": "visible"
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

View File

@@ -0,0 +1,181 @@
{
"custom": {
"allTags": [
{
"dataType": "Float4",
"display": true,
"displaySelection": 0,
"instancePosition": 1,
"instanceStyle": {
"classes": ""
},
"name": "Amps A",
"numDecimals": 1,
"options": [],
"visible": true
},
{
"dataType": "Float4",
"display": true,
"displaySelection": 0,
"instancePosition": 3,
"instanceStyle": {
"classes": ""
},
"name": "Amps B",
"numDecimals": 1,
"options": [],
"visible": true
},
{
"dataType": "Float4",
"display": true,
"displaySelection": 0,
"instancePosition": 5,
"instanceStyle": {
"classes": ""
},
"name": "Amps C",
"numDecimals": 1,
"options": [],
"visible": true
},
{
"dataType": "Float4",
"display": true,
"displaySelection": 0,
"instancePosition": 2,
"instanceStyle": {
"classes": ""
},
"name": "Amps G",
"numDecimals": 4,
"options": [],
"visible": true
},
{
"dataType": "Int4",
"display": true,
"displaySelection": 1,
"instancePosition": 6,
"instanceStyle": {
"classes": ""
},
"name": "Breaker Status",
"numDecimals": 1,
"options": [
"Open",
"Closed"
],
"visible": true
},
{
"dataType": "Boolean",
"display": true,
"displaySelection": 1,
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Breaker Tripped",
"numDecimals": 1,
"options": [
"Not Tripped",
"Tripped"
],
"visible": true
}
]
},
"params": {
"tagPath": "[Ignition_Common_IO_Gtwy]ER1151/SATB1_MPR1151_HS1_FE2"
},
"propConfig": {
"custom.allTags": {
"binding": {
"config": {
"struct": {
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": false
},
"enabled": false,
"transforms": [
{
"code": "\toutput \u003d []\n\t# Simulate fetching tag configurations and sorting by name\n\tnodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n\tfor item in nodes:\n\t if \u0027tags\u0027 in item:\n\t \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n\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 for tagConfig in sortedTags:\n if str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n name \u003d tagConfig.get(\"name\", \"\")\n dataType \u003d tagConfig.get(\"dataType\", \"\")\n tagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n if dataType \u003d\u003d \u0027Boolean\u0027:\n \tdisplaySel \u003d 1\n else:\n \tdisplaySel \u003d 0\n if system.tag.read(tagPath).value \u003d\u003d None:\n \tdisplay \u003d False\n else:\n \tdisplay \u003d True\n instance \u003d {\n \"instanceStyle\": {\n \"classes\": \"\"\n },\n \"instancePosition\": 999,\n \"name\": name,\n \"dataType\": dataType,\n \"displaySelection\": displaySel,\n \"numDecimals\":1,\n \"options\": [],\n \"visible\": True,\n \"display\": display,\n }\n output.append(instance)\n\t# Return or process the sorted output\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
},
"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}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\tallTags \u003d system.util.jsonDecode(system.util.jsonEncode(value[\u0027allTags\u0027]))\n\tfor tag in allTags:\n\t\ttagName \u003d tag[\"name\"]\n\t\ttag[\"tagPath\"] \u003d value[\"tagPath\"] + \"/\" +tagName\n\t\toutput.append(tag)\n\toutput_sorted \u003d sorted(output, key\u003dlambda item: item[\"instancePosition\"])\n\treturn output_sorted",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"alignContent": "flex-start",
"elementPosition": {
"basis": "50%",
"grow": 0
},
"loading": {
"order": "with-parent"
},
"path": "Library/Framework/Tag Info",
"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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -0,0 +1,544 @@
{
"custom": {
"OCmd": {
"Occupied": null,
"sEND": null
},
"tagPaths": [
"[Ignition_Common_IO_Gtwy]RM1100/SATB1_HS1_RM1100_VAV13",
"[Ignition_Common_IO_Gtwy]RM1100/SATB1_HS1_RM1100_VAV14",
"[Ignition_Common_IO_Gtwy]RM1101/SATB1_HS1_RM1101_VAV17",
"[Ignition_Common_IO_Gtwy]RM1102/SATB1_HS1_RM1102_VAV15",
"[Ignition_Common_IO_Gtwy]RM1102-2/SATB1_HS1_RM1102-2_VAV16",
"[Ignition_Common_IO_Gtwy]RM1103/SATB1_HS1_RM1103_VAV09",
"[Ignition_Common_IO_Gtwy]RM1109/SATB1_HS1_RM1109_VAV06",
"[Ignition_Common_IO_Gtwy]RM1110/SATB1_HS1_RM1110_VAV04",
"[Ignition_Common_IO_Gtwy]RM1110/SATB1_HS1_RM1110_VAV05",
"[Ignition_Common_IO_Gtwy]RM1111/SATB1_HS1_RM1111_VAV11",
"[Ignition_Common_IO_Gtwy]RM1113/SATB1_HS1_RM1113_VAV08",
"[Ignition_Common_IO_Gtwy]RM1114/SATB1_HS1_RM1114_VAV07",
"[Ignition_Common_IO_Gtwy]RM1116/SATB1_HS1_RM1116_VAV01",
"[Ignition_Common_IO_Gtwy]RM1117/SATB1_HS1_RM1117_VAV02",
"[Ignition_Common_IO_Gtwy]RM1118/SATB1_HS1_RM1118_VAV03",
"[Ignition_Common_IO_Gtwy]RM1121/SATB1_HS1_RM1121_VAV19",
"[Ignition_Common_IO_Gtwy]RM1127/SATB1_HS1_RM1127_VAV22",
"[Ignition_Common_IO_Gtwy]RM1127/SATB1_HS1_RM1127_VAV23",
"[Ignition_Common_IO_Gtwy]RM1133/SATB1_HS1_RM1133_VAV25",
"[Ignition_Common_IO_Gtwy]RM1133-5/SATB1_HS1_RM1133-5_VAV18",
"[Ignition_Common_IO_Gtwy]RM1134/SATB1_HS1_RM1134_VAV20",
"[Ignition_Common_IO_Gtwy]RM1135/SATB1_HS1_RM1135_VAV21",
"[Ignition_Common_IO_Gtwy]RM1137/SATB1_HS1_RM1137_VAV12",
"[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS1_RM1138_VAV29",
"[Ignition_Common_IO_Gtwy]RM1139/SATB1_HS1_RM1139_VAV26",
"[Ignition_Common_IO_Gtwy]RM1139/SATB1_HS1_RM1139_VAV27",
"[Ignition_Common_IO_Gtwy]RM1139/SATB1_HS1_RM1139_VAV28",
"[Ignition_Common_IO_Gtwy]RM1141/SATB1_HS1_RM1141_VAV24",
"[Ignition_Common_IO_Gtwy]RM1153/SATB1_HS1_RM1153_VAV34",
"[Ignition_Common_IO_Gtwy]RM1190/SATB1_HS1_RM1190_VAV33",
"[Ignition_Common_IO_Gtwy]RM1192/SATB1_HS1_RM1192_VAV31",
"[Ignition_Common_IO_Gtwy]RM1194/SATB1_HS1_RM1194_VAV32"
]
},
"params": {
"auth": {
"almAck": true,
"almShelve": true,
"config": true,
"control": true
},
"tagPath": "[Ignition_Common_IO_Gtwy]VAV/SATB1_VAV_Master"
},
"propConfig": {
"custom.OCmd": {
"persistent": true
},
"custom.OCmd.Send": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control/OCmd_SendALL"
},
"type": "tag"
}
},
"custom.tagPaths": {
"binding": {
"config": {
"struct": {
"hb": "now(3000)"
},
"waitOnAll": true
},
"enabled": false,
"transforms": [
{
"code": "\tIO_Gateways \u003d [\"[Ignition_Common_IO_Gtwy]\"]\n\t\t\t\t\n\t#Change manually the gateway to search through\n\tpath \u003d IO_Gateways[0]\n\t\n\ttagType \u003d {\"tagType\":\"UdtInstance\"}\n\t#Look for this udt type\n\ttypeId \u003d \"Objects/Air/VAV v2\"\n\tdef recursive_browser(base_path, type_id):\n\t\tfound_udt_paths \u003d []\n\t\tbrowse_results \u003d system.tag.browse(base_path)\n\t\tfor item in browse_results:\n\t\t\titem_fullPath \u003d item.get(\u0027fullPath\u0027, \u0027N/A\u0027)\n\t\t\titem_tag_type \u003d item.get(\u0027tagType\u0027, \u0027N/A\u0027)\n\t\t\titem_type_id \u003d item.get(\u0027typeId\u0027, \u0027N/A\u0027)\n\t\t\t\n\t\t\tif str(item_type_id) \u003d\u003d type_id:\n\t\t\t\tfound_udt_paths.append(item_fullPath)\n\t\t\tif str(item_tag_type) \u003d\u003d \"Folder\":\n\t\t\t\tfound_udt_paths.extend(recursive_browser(item_fullPath, type_id))\n\t\treturn found_udt_paths\n\treturn recursive_browser(path, typeId)\n",
"type": "script"
}
],
"type": "expr-struct"
},
"persistent": true
},
"params.auth": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {},
"root": {
"children": [
{
"children": [
{
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.view.custom.OCmd.Send \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "AutoBtn"
},
"position": {
"basis": "100%"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
}
},
"props": {
"primary": false,
"text": "Send to all VAV"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "Row1"
},
"position": {
"basis": "50px"
},
"props": {
"style": {
"gap": "10px",
"overflow": "visible"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Left control Container"
},
"position": {
"basis": "50%"
},
"props": {
"direction": "column",
"style": {
"gap": "10px",
"overflow": "visible"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "50%"
},
"props": {
"text": "Occupied Temperature Setpoint",
"textStyle": {
"textAlign": "right"
}
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpaths \u003d self.view.custom.tagPaths\n\ttags \u003d []\n\tvalues \u003d []\n\tfor path in paths:\n\t\ttags.append(\"{}/Control/Occupied Temp Setpoint\".format(path))\n\t\tvalues.append(self.props.value)\n\tsystem.tag.writeBlocking(tags, values) "
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "NumericEntryField"
},
"position": {
"basis": "50%",
"grow": 1
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
},
"props.style.color": {
"binding": {
"config": {
"expression": "if({this.props.enabled}, \u0027var(--tagvalue-color)\u0027, \u0027\u0027)"
},
"type": "expr"
}
},
"props.value": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control/OCmd_OccTempSP"
},
"type": "tag"
}
}
},
"props": {
"inputBounds": {
"maximum": 104,
"minimum": 50
},
"style": {
"fontWeight": "bold",
"min-height": "30px"
}
},
"type": "ia.input.numeric-entry-field"
}
],
"meta": {
"name": "Row2"
},
"position": {
"basis": "58px"
},
"props": {
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "50%"
},
"props": {
"text": "Unoccupied Temperature Setpoint",
"textStyle": {
"textAlign": "right"
}
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tpaths \u003d self.view.custom.tagPaths\n\ttags \u003d []\n\tvalues \u003d []\n\tfor path in paths:\n\t\ttags.append(\"{}/Control/Unoccupied Temperature SP\".format(path))\n\t\tvalues.append(self.props.value)\n\tsystem.tag.writeBlocking(tags, values) "
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "NumericEntryField"
},
"position": {
"basis": "50%",
"grow": 1
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
},
"props.style.color": {
"binding": {
"config": {
"expression": "if({this.props.enabled}, \u0027var(--tagvalue-color)\u0027, \u0027\u0027)"
},
"type": "expr"
}
},
"props.value": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control/OCmd_UnOccModeTempSP"
},
"type": "tag"
}
}
},
"props": {
"inputBounds": {
"maximum": 82,
"minimum": 65
},
"style": {
"fontWeight": "bold",
"min-height": "30px"
}
},
"type": "ia.input.numeric-entry-field"
}
],
"meta": {
"name": "Row3"
},
"position": {
"basis": "58px"
},
"props": {
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "50%"
},
"props": {
"text": "Occupied Mode Start Hour",
"textStyle": {
"textAlign": "right"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "NumericEntryField"
},
"position": {
"basis": "50%",
"grow": 1
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
},
"props.style.color": {
"binding": {
"config": {
"expression": "if({this.props.enabled}, \u0027var(--tagvalue-color)\u0027, \u0027\u0027)"
},
"type": "expr"
}
},
"props.value": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control/OCmd_OccModeStartHR"
},
"type": "tag"
}
}
},
"props": {
"style": {
"fontWeight": "bold",
"min-height": "30px"
}
},
"type": "ia.input.numeric-entry-field"
}
],
"meta": {
"name": "Row5"
},
"position": {
"basis": "58px"
},
"props": {
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "50%"
},
"props": {
"text": "Unoccupied Mode Start Hour",
"textStyle": {
"textAlign": "right"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "NumericEntryField"
},
"position": {
"basis": "50%",
"grow": 1
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
},
"props.style.color": {
"binding": {
"config": {
"expression": "if({this.props.enabled}, \u0027var(--tagvalue-color)\u0027, \u0027\u0027)"
},
"type": "expr"
}
},
"props.value": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control/OCmd_UnOccModeStartHR"
},
"type": "tag"
}
}
},
"props": {
"style": {
"fontWeight": "bold",
"min-height": "30px"
}
},
"type": "ia.input.numeric-entry-field"
}
],
"meta": {
"name": "Row6"
},
"position": {
"basis": "58px"
},
"props": {
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Right control Container"
},
"position": {
"basis": "50%"
},
"props": {
"direction": "column",
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"style": {
"classes": "containers/padded-container",
"gap": "10px"
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

View File

@@ -0,0 +1,606 @@
{
"custom": {
"allTags": [
{
"dataType": "Boolean",
"displaySelection": 1,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery 1 Breaker",
"options": [
"Closed",
"Open"
]
},
{
"dataType": "Boolean",
"displaySelection": 1,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery 2 Breaker",
"options": [
"Closed",
"Open"
]
},
{
"dataType": "Boolean",
"displaySelection": 1,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery 3 Breaker",
"options": [
"Closed",
"Open"
]
},
{
"dataType": "Boolean",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery Charging",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery Current",
"options": []
},
{
"dataType": "Boolean",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery Discharging",
"options": []
},
{
"dataType": "Int4",
"displaySelection": 1,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery Operation Mode",
"options": [
"Initialize Operation",
"Off",
"Battery Operation",
"Normal Operation",
"Forced Static Bypass",
"Requested Static Bypass",
"Maintenance Bypass",
"Emergency Static Bypass",
"Inverter Standby",
"Static Bypass Standby",
"Battery Test",
"Inverter SPoT Mode Power Svaing Mode",
"Charger SPoT Mode",
"Battery Discharge SPoT Mode",
"ECOnversion",
"ECO Mode"
]
},
{
"dataType": "Boolean",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery Resting",
"options": []
},
{
"dataType": "Int8",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery Runtime minutes",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery Temperature",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Battery Voltage",
"options": []
},
{
"dataType": "Boolean",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Bypass Breaker Status",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Bypass Current A",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Bypass Current B",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Bypass Current C",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Bypass Voltage AB",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Bypass Voltage BC",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Bypass Voltage CA",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Bypass kW",
"options": []
},
{
"dataType": "Boolean",
"displaySelection": 1,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Breaker Status",
"options": [
"Closed",
"Open"
]
},
{
"dataType": "Int8",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Input Energy",
"options": []
},
{
"dataType": "Boolean",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Inverter Disabled",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Load Current A",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Load Current B",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Load Current C",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Load Voltage AB",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Load Voltage BC",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Load Voltage CA",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Load kW",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Main Current A",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Main Current B",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Main Current C",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Main Frequency",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Main Voltage AB",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Main Voltage BC",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Main Voltage CA",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Main kVA Total",
"options": []
},
{
"dataType": "Float4",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Main kW",
"options": []
},
{
"dataType": "Boolean",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Operating on Battery",
"options": []
},
{
"dataType": "Boolean",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Output Breaker Status",
"options": []
},
{
"dataType": "Int8",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Output Energy",
"options": []
},
{
"dataType": "Boolean",
"displaySelection": 1,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "Static Switch Input Breaker Status",
"options": [
"Closed",
"Open"
]
},
{
"dataType": "Boolean",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 999,
"instanceStyle": {
"classes": ""
},
"name": "System isolation Brekaer Status",
"options": []
}
]
},
"params": {
"tagPath": "[Ignition_Common_IO_Gtwy]ER1151/SATB1_HS1_UPS"
},
"propConfig": {
"custom.allTags": {
"binding": {
"config": {
"struct": {
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"enabled": false,
"transforms": [
{
"code": "\toutput \u003d []\n\t# Simulate fetching tag configurations and sorting by name\n\tnodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n\tfor item in nodes:\n\t if \u0027tags\u0027 in item:\n\t \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n\t \t#sortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027) if x.get(\u0027engUnit\u0027, \u0027misc\u0027) !\u003d \"\" else \u0027misc\u0027)\n for tagConfig in sortedTags:\n if str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n name \u003d tagConfig.get(\"name\", \"\")\n dataType \u003d tagConfig.get(\"dataType\", \"\")\n tagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n if dataType \u003d\u003d \u0027Boolean\u0027:\n \tdisplaySel \u003d 1\n else:\n \tdisplaySel \u003d 0\n instance \u003d {\n \"instanceStyle\": {\n \"classes\": \"\"\n },\n \"instancePosition\": 999,\n \"name\": name,\n \"dataType\": dataType,\n \"displaySelection\": displaySel,\n \"format\": \"0.0\",\n \"options\": []\n }\n output.append(instance)\n\t# Return or process the sorted output\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
},
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"width": 1200
}
},
"root": {
"children": [
{
"meta": {
"name": "FlexRepeater"
},
"position": {
"basis": "100%"
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"struct": {
"allTags": "{view.custom.allTags}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\tallTags \u003d system.util.jsonDecode(system.util.jsonEncode(value[\u0027allTags\u0027]))\n\tfor tag in allTags:\n\t\ttagName \u003d tag[\"name\"]\n\t\ttag[\"tagPath\"] \u003d value[\"tagPath\"] + \"/\" +tagName\n\t\toutput.append(tag)\n\toutput_sorted \u003d sorted(output, key\u003dlambda item: item[\"instancePosition\"])\n\treturn output_sorted",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"alignContent": "flex-start",
"elementPosition": {
"basis": "33%",
"grow": 0
},
"loading": {
"order": "with-parent"
},
"path": "Library/Framework/Tag Info",
"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"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,347 @@
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 500,
"width": 767
}
},
"root": {
"children": [
{
"meta": {
"name": "Sym_Chiller"
},
"position": {
"height": 0.3,
"width": 0.25,
"x": 0.0648,
"y": 0.054
},
"props": {
"params": {
"objectName": "Motor",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_CH37_MOTOR"
},
"path": "Library/Symbols/Mechanical/Sym_Chiller"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Sym_ValveC"
},
"position": {
"height": 0.164,
"width": 0.1493,
"x": 0.4062,
"y": 0.376
},
"props": {
"params": {
"Layout": 4,
"objectName": "value",
"tagPath": "[Ignition_Common_IO_Gtwy]DH1/SATB1_DH1260_FCV69"
},
"path": "Library/Symbols/Mechanical/Sym_ValveC"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Sym_ValveC_0"
},
"position": {
"height": 0.162,
"width": 0.1627,
"x": 0.4036,
"y": 0.641
},
"props": {
"params": {
"Layout": 4,
"objectName": "value",
"tagPath": "[Ignition_Common_IO_Gtwy]DH1/SATB1_DH1260_FCV69"
},
"path": "Library/Symbols/Mechanical/Sym_ValveC"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Sym_ValveM"
},
"position": {
"height": 0.218,
"width": 0.1707,
"x": 0.6507,
"y": 0.152
},
"props": {
"params": {
"Layout": true,
"objectName": "ValveM",
"tagPath": "[Ignition_Common_IO_Gtwy]/Roof/CV48"
},
"path": "Library/Symbols/Mechanical/Sym_ValveM"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Sym_TES"
},
"position": {
"height": 0.254,
"width": 0.1213,
"x": 0.6328,
"y": 0.453
},
"props": {
"params": {
"objectName": "TES",
"tagPath": "[Ignition_Common_IO_Gtwy]MPR1140/SATB1_DH5_Thermal_System"
},
"path": "Library/Symbols/Mechanical/Sym_TES"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Sym_CHWPump"
},
"position": {
"height": 0.178,
"width": 0.17,
"x": 0.1271,
"y": 0.486
},
"props": {
"params": {
"objectName": "VSD",
"tagPath": "[Ignition_Common_IO_Gtwy]MPR1140/SATB1_MPR1140_VFD13"
},
"path": "Library/Symbols/Mechanical/Sym_CHWPump",
"style": {
"overflow": "visible"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Label"
},
"position": {
"height": 0.086,
"rotate": {
"anchor": "-30% 25%"
},
"width": 0.0887,
"x": 0.8786,
"y": 0.23
},
"props": {
"text": "To CHWS Header"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_0"
},
"position": {
"height": 0.086,
"rotate": {
"anchor": "-30% 25%"
},
"width": 0.0939,
"x": 0.8787,
"y": 0.8578
},
"props": {
"text": "From CHWS Header"
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"mode": "percent",
"pipes": [
{
"appearance": "auto",
"end": "none",
"fill": "#7BCCCE",
"flanges": true,
"lineVariant": "solid",
"name": "pipe_0",
"origin": {
"connections": [
{
"connections": [
{
"x": 0.1726,
"y": 0.278
},
{
"connections": [],
"x": 0.6746,
"y": 0.278
}
],
"x": 0.4663,
"y": 0.278
}
],
"x": 0.4663,
"y": 0.432
},
"start": "none",
"stroke": "",
"visible": true,
"width": 5
},
{
"appearance": "simple",
"end": "none",
"fill": "#CE7B81",
"flanges": true,
"lineVariant": "solid",
"name": "pipe_2",
"origin": {
"connections": [
{
"connections": [
{
"x": 0.8688,
"y": 0.9114
},
{
"connections": [
{
"x": 0.1726,
"y": 0.564
}
],
"x": 0.1726,
"y": 0.9114
}
],
"x": 0.4651,
"y": 0.9114
}
],
"x": 0.4651,
"y": 0.744
},
"start": "none",
"stroke": "",
"visible": true,
"width": 5
},
{
"appearance": "simple",
"end": "none",
"fill": "#CE7B81",
"flanges": true,
"lineVariant": "solid",
"name": "pipe_2",
"origin": {
"connections": [
{
"x": 0.1726,
"y": 0.292
},
{
"x": 0.1726,
"y": 0.54
}
],
"x": 0.1726,
"y": 0.418
},
"start": "none",
"stroke": "",
"visible": true,
"width": 5
},
{
"appearance": "auto",
"end": "none",
"fill": "#B9CE7B",
"flanges": true,
"lineVariant": "solid",
"name": "pipe",
"origin": {
"connections": [
{
"connections": [
{
"x": 0.4663,
"y": 0.486
},
{
"x": 0.6746,
"y": 0.588
}
],
"x": 0.4663,
"y": 0.588
}
],
"x": 0.4663,
"y": 0.694
},
"start": "none",
"stroke": "",
"visible": true,
"width": 5
},
{
"appearance": "auto",
"end": "none",
"fill": "#7BCCCE",
"flanges": true,
"lineVariant": "solid",
"name": "pipe_1",
"origin": {
"connections": [
{
"connections": [
{
"connections": [
{
"x": 0.8688,
"y": 0.278
},
{
"connections": [],
"x": 0.7,
"y": 0.278
}
],
"x": 0.7876,
"y": 0.278
}
],
"x": 0.7876,
"y": 0.588
}
],
"x": 0.6895,
"y": 0.588
},
"start": "none",
"stroke": "",
"visible": true,
"width": 5
}
]
},
"type": "ia.container.coord"
}
}

View File

@@ -0,0 +1,323 @@
{
"custom": {
"Running": 1,
"Status": 1,
"alarm": 0,
"tag": "RTU"
},
"params": {
"objectName": "RTU",
"tagPath": "[Ignition_Common_IO_Gtwy]Roof/SATB1_RF_RTU01"
},
"propConfig": {
"custom.Running": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control Status"
},
"enabled": false,
"type": "tag"
},
"persistent": true
},
"custom.Status": {
"binding": {
"config": {
"expression": "if({view.custom.alarm}, 2, if({view.custom.Running},1,0))"
},
"type": "expr"
},
"persistent": true
},
"custom.alarm": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Alarms/General Alarm"
},
"enabled": false,
"type": "tag"
},
"persistent": true
},
"custom.tag": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Parameters.DeviceLabel"
},
"enabled": false,
"type": "tag"
},
"persistent": true
},
"params.objectName": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 50,
"width": 90
}
},
"root": {
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "30px"
},
"propConfig": {
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.Status"
},
"transforms": [
{
"fallback": "purple",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "var(--state-standby)"
},
{
"input": 1,
"output": "var(--state-running)"
},
{
"input": 2,
"output": "var(--state-faulted)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Meta/EqName"
},
"enabled": false,
"type": "tag"
}
},
"props.textStyle.color": {
"binding": {
"config": {
"path": "view.custom.Status"
},
"transforms": [
{
"fallback": "Red",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "Black"
},
{
"input": 1,
"output": "Black"
},
{
"input": 2,
"output": "White"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"alignVertical": "top",
"style": {
"borderTopLeftRadius": 5,
"borderTopRightRadius": 5,
"overflow": "visible",
"padding": "2px"
},
"text": "RTU",
"textStyle": {
"fontSize": 12,
"textAlign": "start"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Label_0"
},
"position": {
"basis": "30px"
},
"propConfig": {
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "view.custom.Status"
},
"transforms": [
{
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "var(--state-standby)"
},
{
"input": 1,
"output": "var(--state-running)"
},
{
"input": 2,
"output": "var(--state-faulted)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Supply Air Temperature"
},
"enabled": false,
"transforms": [
{
"formatType": "numeric",
"formatValue": "##.##",
"type": "format"
},
{
"expression": "{value} + \" degF\"",
"type": "expression"
}
],
"type": "tag"
}
},
"props.textStyle.color": {
"binding": {
"config": {
"path": "view.custom.Status"
},
"transforms": [
{
"fallback": "Red",
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": "Black"
},
{
"input": 1,
"output": "Black"
},
{
"input": 2,
"output": "White"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"borderBottomLeftRadius": 5,
"borderBottomRightRadius": 5,
"overflow": "visible",
"padding": "2px"
},
"text": "58.3 degF",
"textStyle": {
"fontSize": 12,
"textAlign": "end"
}
},
"type": "ia.display.label"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\ttagPath \u003d self.view.params.tagPath\n\tobjectName \u003d self.view.params.objectName\n\tpayload\u003d{\n\t\t\u0027objectName\u0027: objectName,\n\t\t\u0027tagPath\u0027: tagPath,\n\t\t\u0027modal\u0027: False,\n\t\t\u0027resizable\u0027: True,\n\t\t\u0027draggable\u0027: True,\n\t\t\u0027position\u0027: {\n#\t\t\t\u0027left\u0027:\u00270\u0027,\n#\t\t\t\u0027top\u0027:\u00270\u0027,\n\t\t\t\u0027width\u0027: \u00271000px\u0027,\n\t\t\t\u0027height\u0027: \u0027800px\u0027\n\t\t}\n\t}\n\tutils.nav.eqPopupMsg(self, payload)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"justify": "center",
"style": {
"borderBottomLeftRadius": 5,
"borderBottomRightRadius": 5,
"borderTopLeftRadius": 5,
"borderTopRightRadius": 5,
"boxShadow": "var(--boxShadow2)",
"classes": "containers/HoverOver",
"marginLeft": 2,
"overflow": "visible"
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,428 @@
{
"custom": {
"trendConfig": {}
},
"params": {
"selectedPens": [],
"tagPath": "[Ignition_Common_IO_Gtwy]RM1109/SATB1_HS1_RM1109_VAV06"
},
"propConfig": {
"custom.trendConfig": {
"persistent": true
},
"custom.trendConfig.allPens": {
"binding": {
"config": {
"struct": {
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"custom.trendConfig.selectedPens": {
"binding": {
"config": {
"path": "view.params.selectedPens"
},
"type": "property"
}
},
"params.selectedPens": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"width": 1200
}
},
"root": {
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "ToggleSwitch"
},
"position": {
"basis": "34px",
"shrink": 0
},
"props": {
"label": {
"text": "Table View"
}
},
"type": "ia.input.toggle-switch"
},
{
"meta": {
"name": "FlexRepeater"
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"struct": {
"allPens": "{view.custom.trendConfig.allPens}",
"selectedPens": "{view.custom.trendConfig.selectedPens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"direction": "column",
"elementPosition": {
"basis": "auto",
"grow": 0,
"shrink": 0
},
"loading": {
"order": "with-parent"
},
"path": "Library/Templates/Framework/Pen List",
"useDefaultViewHeight": false,
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
}
],
"meta": {
"name": "Pens Lists"
},
"position": {
"basis": "250px"
},
"props": {
"direction": "column",
"style": {
"border": "1px solid var(--border)",
"border-right": "none"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"domId": "CustomPowerChart",
"name": "Power Chart"
},
"position": {
"basis": "800px",
"grow": 1
},
"propConfig": {
"custom.pens": {
"binding": {
"config": {
"struct": {
"axes": "{this.props.axes}",
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
"type": "script"
},
{
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"position.display": {
"binding": {
"config": {
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
},
"type": "expr"
}
},
"props.axes": {
"binding": {
"config": {
"struct": {
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"props.config": {
"onChange": {
"enabled": null,
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
}
},
"props.pens": {
"binding": {
"config": {
"struct": {
"enabledPens": "{view.custom.trendConfig.selectedPens}",
"pens": "{this.custom.pens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"config": {
"endDate": {
"$": [
"ts",
0,
1731972292627
],
"$ts": 1730879940000
},
"rangeSelectorPen": "histprov:Ignition_Hist_SATB1_IO1_default:/tag:Datahall 1/Development/GEN 1/Amps A",
"responsiveDesignWidth": 100,
"startDate": {
"$": [
"ts",
0,
1731972292627
],
"$ts": 1730733759000
},
"unitOfTime": 2,
"visibility": {
"buttons": {
"showAnnotationButton": false,
"showSettingsButton": false,
"showTagBrowserButton": false
}
}
},
"interaction": {
"chartZoomLevel": 1,
"rangeZoomLevel": 1
},
"plots": [
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 3,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 2,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 1,
"style": {
"classes": ""
}
},
{
"color": "transparent",
"markers": [],
"relativeWeight": 1,
"style": {
"classes": ""
}
}
]
},
"type": "ia.chart.powerchart"
},
{
"children": [
{
"meta": {
"name": "Label",
"visible": false
},
"position": {
"basis": "200px"
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Power Chart.props.pens"
},
"transforms": [
{
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"color": "--neutral-80",
"fontSize": "14px",
"marginTop": "-143px",
"minHeight": "-143px"
},
"text": "Please select a tag."
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Pens Cont"
},
"position": {
"basis": "0px"
},
"props": {
"alignItems": "center",
"direction": "column",
"style": {
"overflow": "visible",
"zIndex": 0
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "TrendTable"
},
"position": {
"basis": "320px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Pens Lists/ToggleSwitch.props.selected"
},
"type": "property"
}
},
"props.params.historianSettings": {
"binding": {
"config": {
"path": "..../FlexContainer.custom.historianSettings"
},
"type": "property"
}
},
"props.params.selectedPens": {
"binding": {
"config": {
"path": "../Power Chart.props.pens"
},
"type": "property"
}
}
},
"props": {
"path": "Library/Templates/Framework/TrendTable"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "Chart Cont"
},
"position": {
"basis": "200px",
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "100%"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "containers/padded-container"
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -0,0 +1,79 @@
{
"custom": {},
"params": {
"inputs": {
"height": "100%",
"targetDetailedURL": "",
"targetURL": "/Oneline-HS1",
"width": "100%"
}
},
"propConfig": {
"params.inputs": {
"access": "PUBLIC",
"paramDirection": "input",
"persistent": true
},
"params.inputs.targetURL": {
"access": "PUBLIC"
}
},
"props": {
"defaultSize": {
"height": 1800,
"width": 2000
}
},
"root": {
"children": [
{
"meta": {
"name": "IFrame"
},
"position": {
"height": 5000,
"width": 5000
},
"propConfig": {
"props.src": {
"binding": {
"config": {
"struct": {
"address": "{session.props.gateway.address}",
"inputs": "{view.params.inputs}",
"pageId": "{page.props.pageId}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\tendpoint \u003d \u0027{gatewayAddress}/system/webdev/{projectName}/pan-zoom-iframe/html?gatewayAddress\u003d{gatewayAddress}\u0026projectName\u003d{projectName}\u0026targetURL\u003d{targetURL}\u0026targetDetailedURL\u003d{targetDetailedURL}\u0026height\u003d{height}\u0026width\u003d{width}\u0026pageId\u003d{pageId}\u0027\n\tif value[\u0027address\u0027] is None:\n\t\tgatewayAddress \u003d system.util.getGatewayAddress()\n\telse:\n\t\tgatewayAddress \u003d value[\u0027address\u0027]\n\tprops \u003d {\n\t\t\t \u0027gatewayAddress\u0027: gatewayAddress\n\t\t\t, \u0027projectName\u0027: system.util.getProjectName()\n\t\t\t, \u0027targetURL\u0027: value[\u0027inputs\u0027][\u0027targetURL\u0027]\n\t\t\t, \u0027targetDetailedURL\u0027 : value[\u0027inputs\u0027][\u0027targetDetailedURL\u0027]\n\t\t\t, \u0027height\u0027: str(value[\u0027inputs\u0027][\u0027height\u0027]).replace(\u0027%\u0027,\u0027%25\u0027)\n\t\t\t, \u0027width\u0027 : str(value[\u0027inputs\u0027][\u0027width\u0027]).replace(\u0027%\u0027,\u0027%25\u0027)\n\t\t\t, \u0027pageId\u0027 : str(value[\u0027pageId\u0027])\n\t}\n\treturn endpoint.format(**props)",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"allowFullScreen": true,
"style": {
"touch-action": "none"
}
},
"type": "ia.display.iframe"
}
],
"meta": {
"name": "root"
},
"props": {
"style": {
"backgroundColor": "--containerRoot",
"overflow": "hidden",
"touch-action": "none"
}
},
"type": "ia.container.coord"
}
}

View File

@@ -0,0 +1,214 @@
{
"pages": {
"/": {
"docks": {
"cornerPriority": "left-right",
"left": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "push",
"handle": "hide",
"iconUrl": "",
"id": "mainNav",
"modal": false,
"resizable": false,
"show": "visible",
"size": 220,
"viewParams": {},
"viewPath": "Library/Layouts/Docked/MainNav"
}
],
"top": [
{
"anchor": "fixed",
"autoBreakpoint": 480,
"content": "push",
"handle": "hide",
"iconUrl": "",
"id": "",
"modal": false,
"resizable": false,
"show": "visible",
"size": 80,
"viewParams": {},
"viewPath": "Library/Layouts/Docked/Header"
}
]
},
"title": "",
"viewPath": "Pages/Dashboards/Home"
},
"/CHW_System/:pageId": {
"title": "",
"viewPath": "Pages/Mechanical/CHW_System"
},
"/DH101/:pageId": {
"title": "",
"viewPath": "Pages/Datahall/DH101"
},
"/DH102/:pageId": {
"title": "",
"viewPath": "Pages/Datahall/DH102"
},
"/DH201/:pageId": {
"title": "",
"viewPath": "Pages/Datahall/DH201"
},
"/DH202/:pageId": {
"title": "",
"viewPath": "Pages/Datahall/DH203"
},
"/Oneline_DH101_P1/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH101_P1"
},
"/Oneline_DH101_P2/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH101_P2"
},
"/Oneline_DH101_P3/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH101_P3"
},
"/Oneline_DH101_P4/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH101_P4"
},
"/Oneline_DH101_P5/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH101_P5"
},
"/Oneline_DH102_P1/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH102_P1"
},
"/Oneline_DH102_P2/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH102_P2"
},
"/Oneline_DH102_P3/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH102_P3"
},
"/Oneline_DH102_P4/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH102_P4"
},
"/Oneline_DH102_P5/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH102_P5"
},
"/Oneline_DH201_P1/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH201_P1"
},
"/Oneline_DH201_P2/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH201_P2"
},
"/Oneline_DH201_P3/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH201_P3"
},
"/Oneline_DH201_P4/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH201_P4"
},
"/Oneline_DH201_P5/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH201_P5"
},
"/Oneline_DH202_P1/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH202_P1"
},
"/Oneline_DH202_P2/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH202_P2"
},
"/Oneline_DH202_P3/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH202_P3"
},
"/Oneline_DH202_P4/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH202_P4"
},
"/Oneline_DH202_P5/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH202_P5"
},
"/Oneline_DH203_P1/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH203_P1"
},
"/Oneline_DH203_P2/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH203_P2"
},
"/Oneline_DH203_P3/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH203_P3"
},
"/Oneline_DH203_P4/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH203_P4"
},
"/Oneline_DH203_P5/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_DH203_P5"
},
"/Oneline_HS1/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_HS1"
},
"/Oneline_HS2/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_HS2"
},
"/Oneline_M1/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_M1"
},
"/Oneline_M2/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_M2"
},
"/Oneline_M3/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_M3"
},
"/Oneline_M4/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_M4"
},
"/Oneline_M5/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_M5"
},
"/Oneline_M6/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_M6"
},
"/Oneline_M7/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_M7"
},
"/Oneline_M8/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_M8"
},
"/Oneline_SES/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_SES"
},
"/Oneline_UT/:pageId": {
"title": "",
"viewPath": "Pages/Electrical/Oneline_UT"
}
},
"sharedDocks": {
"cornerPriority": "top-bottom"
}
}

View File

@@ -0,0 +1,439 @@
{
"custom": {
"OCmd": {}
},
"params": {
"auth": {
"almAck": true,
"almShelve": true,
"config": true,
"control": true
},
"tagPath": "[Ignition_Common_IO_Gtwy]MPR1140/SATB1_CHW_TES01_MOV50"
},
"propConfig": {
"custom.OCmd": {
"persistent": true
},
"custom.OCmd.Mode": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control/ModeCMD"
},
"type": "tag"
}
},
"custom.OCmd.OOS": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control/OCmd_OOS"
},
"type": "tag"
}
},
"custom.OCmd.PosSP": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control/OCmd_PosSP"
},
"type": "tag"
}
},
"custom.OCmd.Reset": {
"binding": {
"config": {
"bidirectional": true,
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"tagPath": "{view.params.tagPath}"
},
"tagPath": "{tagPath}/Control/OCmd_Reset"
},
"type": "tag"
}
},
"params.auth": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {},
"root": {
"children": [
{
"children": [
{
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.view.custom.OCmd.Mode \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "OpenBtn"
},
"position": {
"basis": "50%"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
},
"props.primary": {
"binding": {
"config": {
"path": "view.custom.OCmd.Mode"
},
"type": "property"
}
}
},
"props": {
"text": "Auto"
},
"type": "ia.input.button"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.view.custom.OCmd.Mode \u003d True \u003d False"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "CloseBtn"
},
"position": {
"basis": "50%"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
},
"props.primary": {
"binding": {
"config": {
"path": "view.custom.OCmd.Mode"
},
"transforms": [
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": false,
"output": true
},
{
"input": true,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
}
},
"props": {
"text": "Manual"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "Row1"
},
"position": {
"basis": "50px"
},
"props": {
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.view.custom.OCmd.Reset \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Reset Btn"
},
"position": {
"basis": "50px"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
}
},
"props": {
"primary": false,
"text": "Reset"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "Left Column"
},
"position": {
"basis": "50%"
},
"props": {
"direction": "column",
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Description",
"tooltip": {
"width": "50%"
}
},
"position": {
"basis": "50%"
},
"props": {
"text": "Out of Service",
"textStyle": {
"textAlign": "right"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Val"
},
"position": {
"basis": "50%"
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
},
"props.selected": {
"binding": {
"config": {
"bidirectional": true,
"path": "view.custom.OCmd.OOS"
},
"type": "property"
}
}
},
"props": {
"text": ""
},
"type": "ia.input.checkbox"
}
],
"meta": {
"name": "OutOfService"
},
"position": {
"basis": "50px"
},
"props": {
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Description"
},
"position": {
"basis": "50%"
},
"props": {
"text": "Position Setpoint",
"textStyle": {
"textAlign": "right"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Val"
},
"position": {
"basis": "50%",
"grow": 1
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.params.auth.control"
},
"type": "property"
}
},
"props.style.color": {
"binding": {
"config": {
"path": "this.props.enabled"
},
"transforms": [
{
"fallback": "",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "var(--oltagvalue-color)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "property"
}
},
"props.value": {
"binding": {
"config": {
"bidirectional": true,
"path": "view.custom.OCmd.PosSP"
},
"type": "property"
}
}
},
"props": {
"inputBounds": {
"maximum": 100,
"minimum": 0
},
"style": {
"fontWeight": "bold",
"min-height": "30px"
}
},
"type": "ia.input.numeric-entry-field"
}
],
"meta": {
"name": "PositionSP"
},
"position": {
"basis": "50px"
},
"props": {
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Right Column"
},
"position": {
"basis": "50%"
},
"props": {
"direction": "column",
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"style": {
"classes": "containers/padded-container",
"gap": "10px"
}
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -0,0 +1,426 @@
{
"custom": {
"tabsConfig": {
"tabs": [
"Status",
"Control",
"Config",
"Trend",
"Meta",
"Wiki"
]
},
"trendConfig": {
"selectedPens": []
}
},
"params": {
"auth": {
"almAck": true,
"almShelve": true,
"config": true,
"control": true
},
"objectName": "VAV",
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/VAV"
},
"propConfig": {
"custom.tabsConfig": {
"persistent": true
},
"custom.tabsConfig.showConfig": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagPath}"
},
"tagPath": "{1}/Config"
},
"transforms": [
{
"expression": "coalesce({value},false) !\u003d false",
"type": "expression"
}
],
"type": "tag"
}
},
"custom.tabsConfig.showControl": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagPath}"
},
"tagPath": "{1}/Control"
},
"transforms": [
{
"expression": "coalesce({value},false) !\u003d false",
"type": "expression"
}
],
"type": "tag"
}
},
"custom.trendConfig": {
"persistent": true
},
"params.auth": {
"paramDirection": "input",
"persistent": true
},
"params.objectName": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "Status"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Info\u0027)"
},
"type": "expr"
}
}
},
"props": {
"loading": {
"order": "with-parent"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Trend"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.selectedPens": {
"binding": {
"config": {
"path": "view.custom.trendConfig.selectedPens"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Trends\u0027)"
},
"type": "expr"
}
}
},
"props": {
"loading": {
"order": "with-parent"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Config"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.auth": {
"binding": {
"config": {
"path": "view.params.auth"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Config\u0027)"
},
"type": "expr"
}
}
},
"props": {
"loading": {
"order": "with-parent"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Meta"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.auth": {
"binding": {
"config": {
"path": "view.params.auth"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Meta\u0027)"
},
"type": "expr"
}
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Wiki"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.auth": {
"binding": {
"config": {
"path": "view.params.auth"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
}
},
"props": {
"path": "Library/Framework/Tag Notes/View Notes"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "Control"
},
"propConfig": {
"position.tabIndex": {
"binding": {
"config": {
"expression": "{parent.props.tabs}"
},
"transforms": [
{
"code": "\treturn value.indexOf(self.meta.name)",
"type": "script"
}
],
"type": "expr"
}
},
"props.params.auth": {
"binding": {
"config": {
"path": "view.params.auth"
},
"type": "property"
}
},
"props.params.tagPath": {
"binding": {
"config": {
"path": "view.params.tagPath"
},
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"expression": "concat(\u0027Library/Templates/\u0027,{view.params.objectName},\u0027/Control\u0027)"
},
"type": "expr"
}
}
},
"props": {
"loading": {
"order": "with-parent"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "TabContainer"
},
"position": {
"basis": "300px",
"grow": 1
},
"propConfig": {
"props.tabs": {
"binding": {
"config": {
"expression": "{view.custom.tabsConfig}"
},
"transforms": [
{
"code": "\ttabs \u003d value[\u0027tabs\u0027]\n\tshowConfig \u003d value[\u0027showConfig\u0027]\n\tshowControl \u003d value[\u0027showControl\u0027]\n\tif not showConfig:\n\t\ttabs.pop(tabs.indexOf(\u0027Config\u0027))\n\tif not showControl:\n\t\ttabs.pop(tabs.indexOf(\u0027Control\u0027))\n\t\n\treturn tabs",
"type": "script"
}
],
"type": "expr"
}
}
},
"props": {
"contentStyle": {
"backgroundColor": "var(--container)"
}
},
"type": "ia.container.tab"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column"
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "enableDisablePen",
"pageScope": true,
"script": "\t# When a pen is selected or de-selected on the trends page, this handler is\n\t# responsible for appending or removing the pen name from the proper trend\n\t# config list.\n\t\n\tname \u003d payload[\u0027name\u0027]\n\tenabledOrDisabled \u003d payload[\u0027enabledOrDisabled\u0027]\n\tgroup \u003d payload[\u0027group\u0027]\n\t\n\tif enabledOrDisabled \u003d\u003d True:\n\t\tif name not in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].append(name)\n\telse:\n\t\tif name in self.view.custom.trendConfig[\u0027selectedPens\u0027]:\n\t\t\tself.view.custom.trendConfig[\u0027selectedPens\u0027].remove(name)",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.container.flex"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,12 @@
{
"base": {
"style": {
"borderBottomColor": "#003E69",
"borderBottomStyle": "solid",
"borderBottomWidth": "2px",
"color": "#E6EAEE",
"fontSize": "14px",
"lineHeight": "20px"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -0,0 +1,16 @@
{
"base": {
"style": {
"backgroundColor": "var(--container)",
"borderTopLeftRadius": "4px",
"borderTopRightRadius": "4px",
"borderBottomLeftRadius": "4px",
"borderBottomRightRadius": "4px",
"boxShadow": "var(--boxShadow2)",
"outlineColor": "var(--border)",
"outlineStyle": "solid",
"outlineWidth": "1px",
"overflow": "visible"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View File

@@ -0,0 +1,266 @@
{
"custom": {
"allTags": [
{
"dataType": "",
"displaySelection": 0,
"format": "0.##0",
"instancePosition": 3,
"instanceStyle": {
"classes": ""
},
"name": "Avg Cell Voltage",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 6,
"instanceStyle": {
"classes": ""
},
"name": "Current",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 8,
"instanceStyle": {
"classes": ""
},
"name": "Max Cell Temperature",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 11,
"instanceStyle": {
"classes": ""
},
"name": "Max Cell Temperature Fahrenheit",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 2,
"instanceStyle": {
"classes": ""
},
"name": "Max Cell Voltage",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 5,
"instanceStyle": {
"classes": ""
},
"name": "Max Cell Voltage Position",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 14,
"instanceStyle": {
"classes": ""
},
"name": "Max Cell temperature Position",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 7,
"instanceStyle": {
"classes": ""
},
"name": "Min Cell Temperature",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 10,
"instanceStyle": {
"classes": ""
},
"name": "Min Cell Temperature Fahrenheit",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 1,
"instanceStyle": {
"classes": ""
},
"name": "Min Cell Voltage",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 4,
"instanceStyle": {
"classes": ""
},
"name": "Min Cell Voltage Position",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 13,
"instanceStyle": {
"classes": ""
},
"name": "Min Cell temperature Position",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 9,
"instanceStyle": {
"classes": ""
},
"name": "Rack Alm Summary",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 12,
"instanceStyle": {
"classes": ""
},
"name": "Rack Charge Percent",
"options": []
},
{
"dataType": "",
"displaySelection": 0,
"format": "0.0",
"instancePosition": 15,
"instanceStyle": {
"classes": ""
},
"name": "Rack Health Percent",
"options": []
}
]
},
"params": {
"tagPath": "[Ignition_SATB1_IO1_default]ER1242/SATB1_ER1242_UPS-1/Batteries/Rack 5"
},
"propConfig": {
"custom.allTags": {
"binding": {
"config": {
"struct": {
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"enabled": false,
"transforms": [
{
"code": "\toutput \u003d []\n\t# Simulate fetching tag configurations and sorting by name\n\tnodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n\tfor item in nodes:\n\t if \u0027tags\u0027 in item:\n\t \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n\t \t#sortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027) if x.get(\u0027engUnit\u0027, \u0027misc\u0027) !\u003d \"\" else \u0027misc\u0027)\n for tagConfig in sortedTags:\n if str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n name \u003d tagConfig.get(\"name\", \"\")\n dataType \u003d tagConfig.get(\"dataType\", \"\")\n tagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n if dataType \u003d\u003d \u0027Boolean\u0027:\n \tdisplaySel \u003d 1\n else:\n \tdisplaySel \u003d 0\n instance \u003d {\n \"instanceStyle\": {\n \"classes\": \"\"\n },\n \"instancePosition\": 999,\n \"name\": name,\n \"dataType\": dataType,\n \"displaySelection\": displaySel,\n \"format\": \"0.0\",\n \"options\": []\n }\n output.append(instance)\n\t# Return or process the sorted output\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
},
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"width": 1200
}
},
"root": {
"children": [
{
"meta": {
"name": "FlexRepeater"
},
"position": {
"basis": "100%"
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"struct": {
"allTags": "{view.custom.allTags}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\tallTags \u003d system.util.jsonDecode(system.util.jsonEncode(value[\u0027allTags\u0027]))\n\tfor tag in allTags:\n\t\ttagName \u003d tag[\"name\"]\n\t\ttag[\"tagPath\"] \u003d value[\"tagPath\"] + \"/\" +tagName\n\t\toutput.append(tag)\n\toutput_sorted \u003d sorted(output, key\u003dlambda item: item[\"instancePosition\"])\n\treturn output_sorted",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"alignContent": "flex-start",
"elementPosition": {
"basis": "33%",
"grow": 0
},
"loading": {
"order": "with-parent"
},
"path": "Library/Framework/Tag Info",
"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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,14 @@
GWMap= {"172.17.19.32":"HMI1",
"172.17.19.33":"HMI1-Backup",
"172.17.19.41":"IO1",
"172.17.19.42":"IO2",
"172.17.19.43":"IO3",
"172.17.19.44":"IO4",
"172.17.19.45":"IO5",
"172.17.19.46":"IO6",
"172.17.19.49":"IO1-Backup",
}
def getGatewayStatus(ipAddr):
result = system.net.httpGet("http://"+ipAddr + ":8088/main/system/gwinfo")
return {k: v for k, v in [item.split("=") for item in [pair for pair in result.split(";") if pair]]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,105 @@
{
"custom": {
"allTags": []
},
"params": {
"auth": {
"almAck": true,
"almShelve": true,
"config": true,
"control": true
},
"tagPath": "[Ignition_SATB1_IO1_default]Datahall 1/Development/SEL-751 1"
},
"propConfig": {
"custom.allTags": {
"binding": {
"config": {
"struct": {
"tagPath": "{view.params.tagPath} + \"/Config\""
},
"waitOnAll": true
},
"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}",
"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\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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,430 @@
{
"custom": {
"trendConfig": {}
},
"params": {
"selectedPens": [],
"tagPath": "[Ignition_Common_IO_Gtwy]Yard/SATB1_YARD_DS-1A1"
},
"propConfig": {
"custom.trendConfig": {
"persistent": true
},
"custom.trendConfig.allPens": {
"binding": {
"config": {
"struct": {
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": " # Initialize a dictionary to store instances grouped by \u0027engUnit\u0027\n lists \u003d {}\n output \u003d []\n \n # Fetch tag configurations, including nested tags\n nodes \u003d system.tag.getConfiguration(value[\u0027tagPath\u0027], True)\n total \u003d 0\n for item in nodes:\n # Check if the item contains the \u0027tags\u0027 key\n if \u0027tags\u0027 in item:\n \ttotal \u003d len(item[\u0027tags\u0027])\n \tsortedTags \u003d sorted(item[\u0027tags\u0027], key\u003dlambda x: x[\u0027name\u0027])\n \tsortedTags \u003d sorted(sortedTags, key\u003dlambda x: x.get(\u0027engUnit\u0027, \u0027misc\u0027))\n \t\n \tfor i, tagConfig in enumerate(sortedTags):\n \t\tif str(tagConfig[\u0027tagType\u0027]) \u003d\u003d \u0027AtomicTag\u0027:\n\t\t\t\t\tisEnabled \u003d False\n\t\t\t\t\t# Get the engineering unit or default to \u0027Misc\u0027 if not available\n\t\t\t\t\tengUnit \u003d tagConfig.get(\"engUnit\", \"misc\")\n\t\t\t\t\tif engUnit \u003d\u003d \"\":\n\t\t\t\t\t engUnit \u003d \"misc\"\n\t\t\t\t\t\n\t\t\t\t\t# Initialize a list for the \u0027engUnit\u0027 if it hasn\u0027t been added\n\t\t\t\t\tif engUnit not in lists:\n\t\t\t\t\t lists[engUnit] \u003d []\n\t\t\t\t\t\n\t\t\t\t\t# Create tag instance details\n\t\t\t\t\tname \u003d tagConfig.get(\"name\", \"\")\n\t\t\t\t\ttagPath \u003d value[\u0027tagPath\u0027] + \u0027/\u0027 + name\n\t\t\t\t\tif name in value[\u0027pens\u0027]:\n\t\t\t\t\t\tisEnabled \u003d True\n\t\t\t\t\tinstance \u003d {\n\t\t\t\t\t \"instanceStyle\": {\n\t\t\t\t\t \"classes\": \"\"\n\t\t\t\t\t },\n\t\t\t\t\t \"instancePosition\": {},\n\t\t\t\t\t \"name\": name,\n\t\t\t\t\t \"tagPath\": tagPath,\n\t\t\t\t\t \"engUnit\": engUnit,\n\t\t\t\t\t \"color\": \u0027\u0027,\n\t\t\t\t\t \"enabled\": isEnabled\n\t\t\t\t\t}\n\t\t\t\t\tlists[engUnit].append(instance)\n\t\t\t\t\t\n # Return the sorted and grouped output\n for li in sorted(lists):\n \toutput.append({\n \t\t\u0027group\u0027: lists[li][0][\u0027engUnit\u0027],\n \t\t\u0027penList\u0027: lists[li]\n \t})\n return output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"custom.trendConfig.selectedPens": {
"binding": {
"config": {
"path": "view.params.selectedPens"
},
"type": "property"
}
},
"params.selectedPens": {
"paramDirection": "input",
"persistent": true
},
"params.tagPath": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"width": 1200
}
},
"root": {
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "ToggleSwitch"
},
"position": {
"basis": "34px",
"shrink": 0
},
"props": {
"label": {
"text": "Table View"
}
},
"type": "ia.input.toggle-switch"
},
{
"meta": {
"name": "FlexRepeater"
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"struct": {
"allPens": "{view.custom.trendConfig.allPens}",
"selectedPens": "{view.custom.trendConfig.selectedPens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\tallPens \u003d value[\u0027allPens\u0027]\n\tfor i in range(len(allPens)):\n\t\tpenGroup \u003d allPens[i].get(\u0027group\u0027, \u0027Misc\u0027)\n\t\tpenList \u003d allPens[i].get(\u0027penList\u0027, [])\n\t\tlistLength \u003d len(penList)\n\t\tnewPenList \u003d []\n\t\tfor i, pen in enumerate(penList):\n\t\t\tpen \u003d dict(pen)\n\t\t\tname \u003d pen[\u0027name\u0027]\n\t\t\tpen[\u0027color\u0027] \u003d utils.misc.getHexColorFromInt(i + 1, listLength)\n\t\t\tif name in value[\u0027selectedPens\u0027]:\n\t\t\t\tpen[\u0027enabled\u0027] \u003d True\n\t\t\tnewPenList.append(pen)\n\t\toutput.append({\n\t\t\t\u0027group\u0027: penGroup, \n\t\t\t\u0027penList\u0027: newPenList\n\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"direction": "column",
"elementPosition": {
"basis": "auto",
"grow": 0,
"shrink": 0
},
"loading": {
"order": "with-parent"
},
"path": "Library/Templates/Framework/Pen List",
"useDefaultViewHeight": false,
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
}
],
"meta": {
"name": "Pens Lists"
},
"position": {
"basis": "250px"
},
"props": {
"direction": "column",
"style": {
"border": "1px solid var(--border)",
"border-right": "none"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"domId": "CustomPowerChart",
"name": "Power Chart"
},
"position": {
"basis": "800px",
"grow": 1
},
"propConfig": {
"custom.pens": {
"binding": {
"config": {
"struct": {
"axes": "{this.props.axes}",
"pens": "{view.custom.trendConfig.selectedPens}",
"tagPath": "{view.params.tagPath}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t\n\tinfo \u003d value\n\ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\tdef find_characters(text, char_list):\n\t\tfound_characters \u003d {}\n\t\tfor char_to_find in char_list:\n\t\t\tif char_to_find in text:\n\t\t\t\tfound_characters[char_to_find] \u003d True\n\t\t\t\treturn found_characters\n\t\n\tsearch_text \u003d value[\u0027tagPath\u0027].split(\u0027]\u0027)[0].split(\u0027_\u0027)[2]\n\tcharacters_to_find \u003d [\u00271\u0027, \u00272\u0027, \u00273\u0027, \u00274\u0027, \u00275\u0027]\n\tfound \u003d find_characters(search_text, characters_to_find)\n\t\t\n\tif found:\n\t\tfor character in found:\n\t\t\tif character \u003d\u003d \"1\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io1\u0027\n\t\t\telif character \u003d\u003d \"2\":\n\t\t\t\ttagProvider \u003d \u0027ignition-satb1-io2\u0027\n\t\t\telif character \u003d\u003d \"3\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io3\u0027\n \t\t\telif character \u003d\u003d \"4\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io4\u0027\n \t\t\telif character \u003d\u003d \"5\":\n \t\t\t \ttagProvider \u003d \u0027ignition-satb1-io5\u0027\n\t\t\telse:\n\t\t\t \ttagProvider \u003d \u0027ignition-satb1-io6\u0027\n\treturn tagProvider",
"type": "script"
},
{
"code": "\toutput \u003d []\n\t\n\ttry:\n\t\tpensList \u003d self.parent.parent.getChild(\"Pens Lists\").getChild(\"FlexRepeater\").props.instances\n\t\tfor tagGroup in pensList:\n\t\t\tgroupName \u003d tagGroup[\u0027group\u0027]\n\t\t\tpenList \u003d tagGroup[\u0027penList\u0027]\n\t\t\tfor tag in penList:\n\t\t\t\taxis \u003d tag[\u0027engUnit\u0027]\n\t\t\t\tcolor \u003d tag[\u0027color\u0027]\n\t\t\t\tinstance \u003d {\n\t\t\t\t\"axis\": axis,\n\t\t\t\t\"data\": {\n\t\t\t\t\"aggregateMode\": \"default\",\n\t\t\t\t\"source\": \u0027histprov:Ignition_Hist:/drv:\u0027+ value +\u0027:default:/tag:\u0027 + tag[\u0027tagPath\u0027].split(\u0027]\u0027)[1].lower()\n\t\t\t\t},\n\t\t\t\t\"display\": {\n\t\t\t\t\"breakLine\": True,\n\t\t\t\t\"interpolation\": \"curveLinear\",\n\t\t\t\t\"radius\": 3,\n\t\t\t\t\"styles\": {\n\t\t\t\t \"highlighted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"muted\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.4\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.4,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"normal\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 0.8\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 0.8,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t },\n\t\t\t\t \"selected\": {\n\t\t\t\t \"fill\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"opacity\": 1\n\t\t\t\t },\n\t\t\t\t \"stroke\": {\n\t\t\t\t \"color\": color,\n\t\t\t\t \"dashArray\": 0,\n\t\t\t\t \"opacity\": 1,\n\t\t\t\t \"width\": 1\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"type\": \"line\"\n\t\t\t\t},\n\t\t\t\t\"enabled\": True,\n\t\t\t\t\"name\": tag[\u0027name\u0027],\n\t\t\t\t\"plot\": 1,\n\t\t\t\t\"selectable\": False,\n\t\t\t\t\"visible\": True\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput.append(instance)\n\texcept:\n\t\tpass\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"position.display": {
"binding": {
"config": {
"expression": "!{.../Pens Lists/ToggleSwitch.props.selected}"
},
"type": "expr"
}
},
"props.axes": {
"binding": {
"config": {
"struct": {
"tags": "{.../Pens Lists/FlexRepeater.props.instances}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\toutput \u003d []\n\taxes \u003d []\n\tfor i, engUnit in enumerate(value[\u0027tags\u0027]):\n#\t\tengUnit \u003d tagConfig[\u0027engUnit\u0027]\n\t\tif engUnit not in axes:\n\t\t\taxes.append(engUnit)\n\t\t\toutput.append({\n\t\t\t\t\"name\": engUnit,\n\t\t\t\t\"position\": \"left\",\n\t\t\t\t\"width\": 60,\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"dataFormat\": \"0,0.##\",\n\t\t\t\t\"range\": {\n\t\t\t\t\"auto\": True,\n\t\t\t\t\"min\": \"\",\n\t\t\t\t\"max\": \"\"\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\"text\": engUnit,\n\t\t\t\t\"offset\": 0,\n\t\t\t\t\"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"tick\": {\n\t\t\t\t\"color\": \"#757A7F\",\n\t\t\t\t\"count\": \"Auto\",\n\t\t\t\t\"label\": {\n\t\t\t\t \"format\": \"Auto\",\n\t\t\t\t \"font\": {\n\t\t\t\t \"color\": \"#757A7F\",\n\t\t\t\t \"size\": 10\n\t\t\t\t },\n\t\t\t\t \"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t }\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t \"classes\": \"\"\n\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"style\": {\n\t\t\t\t\"classes\": \"\"\n\t\t\t\t}\n\t\t\t})\n\treturn output",
"type": "script"
}
],
"type": "expr-struct"
}
},
"props.config": {
"onChange": {
"enabled": null,
"script": "\tconfig \u003d currentValue.value\n\t\n\tif config[\u0027mode\u0027].value \u003d\u003d \u0027historical\u0027:\n\t\tif previousValue !\u003d None:\n\t\t\tif previousValue.value !\u003d None:\n\n\t\t\t\ttry:\n\t\t\t\t\tstartDate \u003d config[\u0027startDate\u0027].value \n\t\t\t\t\tendDate \u003d config[\u0027endDate\u0027].value\n\t\t\t\texcept:\n\t\t\t\t\tstartDate \u003d system.date.now()\n\t\t\t\t\tendDate \u003d system.date.addDays(startDate, -1)\t\t\t\t\n\t\t\t\t\n\t\t\t\tdaysBetween \u003d system.date.daysBetween(startDate,endDate)\n\t\t\t\t\n\t\t\t\tif daysBetween \u003e 14:\n\t\t\t\t\toldStartDate \u003d previousValue.value[\u0027startDate\u0027].value\n\t\t\t\t\toldEndDate \u003d previousValue.value[\u0027endDate\u0027].value\n\t\t\t\t\t\n\t\t\t\t\tif oldStartDate \u003d\u003d startDate:\n\t\t\t\t\t\tself.props.config.startDate \u003d system.date.addDays(endDate,-14)\n\t\t\t\t\telse:\n\t\t\t\t\t\tself.props.config.endDate \u003d system.date.addDays(startDate,14)\n\telif config[\u0027mode\u0027].value \u003d\u003d \u0027realtime\u0027:\n\t\tunits \u003d config[\u0027measureOfTime\u0027].value\n\t\ttime \u003d config[\u0027unitOfTime\u0027].value\n\t\t\n\t\tif units \u003d\u003d \u0027seconds\u0027:\n\t\t\tif time \u003e 1209600:\n\t\t\t\tself.props.config.unitOfTime \u003d 1209600\n\t\telif units \u003d\u003d \u0027minutes\u0027:\n\t\t\tif time \u003e 20160:\n\t\t\t\tself.props.config.unitOfTime \u003d 20160\n\t\telif units \u003d\u003d \u0027hours\u0027:\n\t\t\tif time \u003e 336:\n\t\t\t\tself.props.config.unitOfTime \u003d 336\n\t\telif units \u003d\u003d \u0027days\u0027:\n\t\t\tif time \u003e 14:\n\t\t\t\tself.props.config.unitOfTime \u003d 14\n\t\telif units \u003d\u003d \u0027weeks\u0027:\n\t\t\tif time \u003e 2:\n\t\t\t\tself.props.config.unitOfTime \u003d 2\n\t\telse:\n\t\t\tself.props.config.unitOfTime \u003d 2\n\t\t\tself.props.config.measureOfTime \u003d \u0027weeks\u0027\n\thistSetting \u003d utils.helper.sanitize_tree(self.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings)\n#\tsystem.perspective.print(\"%s\"%histSetting)\n\thistSetting.update(utils.helper.sanitize_tree(self.props.config))\n\tself.parent.parent.parent.getChild(\"FlexContainer\").custom.historianSettings \u003d histSetting"
}
},
"props.pens": {
"binding": {
"config": {
"struct": {
"enabledPens": "{view.custom.trendConfig.selectedPens}",
"pens": "{this.custom.pens}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\t# Utilize the trendConfig.allPens to know which pens from the \u0027pens\u0027\n\t# custom property to append to the pensToReturn list.\n\t#histprov:MSSQL_Server:/drv:ignition-satb1-io6:default:/tag:yard/satb1_yard_ds-1b1/breaker open way 01\n\t\n\tcurrentPens \u003d self.props.pens\n\t\n\tpensToReturn \u003d []\n\t\n\tpens \u003d value[\u0027pens\u0027]\n\tenabledPens \u003d value[\u0027enabledPens\u0027]\n\t\n\tfor pen in pens:\n\t\tif pen.name in enabledPens:\n\t\t\thistoryPen \u003d ({\u0027axis\u0027:pen.axis,\u0027data\u0027:pen.data,\u0027display\u0027:pen.display,\n\t\t\t\u0027enabled\u0027:pen.enabled,\u0027name\u0027:pen.name,\u0027plot\u0027:pen.plot,\n\t\t\t\u0027selectable\u0027:pen.selectable,\u0027visible\u0027:pen.visible})\n\t\t\t\n\t\t\t# To retain visibility settings.\n\t\t\tfor currPen in currentPens:\n\t\t\t\tif pen.name \u003d\u003d currPen.name:\n\t\t\t\t\thistoryPen[\u0027visible\u0027] \u003d currPen.visible\n\t\t\t\t\t\n\t\t\tpensToReturn.append(historyPen)\n\t\t\t\n\treturn pensToReturn",
"type": "script"
}
],
"type": "expr-struct"
}
}
},
"props": {
"config": {
"endDate": {
"$": [
"ts",
0,
1744233841621
],
"$ts": 1744271940000
},
"rangeSelectorPen": "histprov:MSSQL_Server:/drv:ignition-satb1-io6:default:/tag:yard/satb1_yard_ds-1b1/breaker open way 01",
"responsiveDesignWidth": 100,
"startDate": {
"$": [
"ts",
0,
1744233827719
],
"$ts": 1744039359000
},
"unitOfTime": 2,
"visibility": {
"buttons": {
"showAnnotationButton": false,
"showSettingsButton": false,
"showTagBrowserButton": false
}
}
},
"interaction": {
"chartZoomLevel": 1,
"rangeZoomLevel": 1
}
},
"type": "ia.chart.powerchart"
},
{
"children": [
{
"meta": {
"name": "Label",
"visible": false
},
"position": {
"basis": "200px"
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Power Chart.props.pens"
},
"transforms": [
{
"code": "\t# If no pens are enabled, then show this label (informing the user to select a pen).\n\t\n\tfor pen in value:\n\t\tif pen.enabled \u003d\u003d True:\n\t\t\treturn False\n\treturn True",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"color": "--neutral-80",
"fontSize": "14px",
"marginTop": "-143px",
"minHeight": "-143px"
},
"text": "Please select a tag."
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Pens Cont"
},
"position": {
"basis": "0px"
},
"props": {
"alignItems": "center",
"direction": "column",
"style": {
"overflow": "visible",
"zIndex": 0
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "TrendTable"
},
"position": {
"basis": "320px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": ".../Pens Lists/ToggleSwitch.props.selected"
},
"type": "property"
}
},
"props.params.historianSettings": {
"binding": {
"config": {
"path": "..../FlexContainer.custom.historianSettings"
},
"type": "property"
}
},
"props.params.selectedPens": {
"binding": {
"config": {
"path": "../Power Chart.props.pens"
},
"type": "property"
}
}
},
"props": {
"path": "Library/Templates/Framework/TrendTable"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "Chart Cont"
},
"position": {
"basis": "200px",
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"custom": {
"historianSettings": {
"dateFormat": "YYYY/MM/DD",
"endDate": {
"$": [
"ts",
192,
1747947885209
],
"$ts": 1744271940000
},
"export": {
"dateFormat": "None",
"timeFormat": "x"
},
"measureOfTime": "hours",
"mode": "realtime",
"penNamePathDepth": 1,
"pointCount": 300,
"rangeEndDate": null,
"rangeSelectorPen": "histprov:MSSQL_Server:/drv:ignition-satb1-io6:default:/tag:yard/satb1_yard_ds-1b1/breaker open way 01",
"rangeStartDate": null,
"refreshRate": 1000,
"responsiveDesignWidth": 100,
"startDate": {
"$": [
"ts",
192,
1747947885209
],
"$ts": 1744039359000
},
"tagBrowserStartPath": "",
"timeFormat": "h:mm A",
"unitOfTime": 2,
"visibility": {
"buttons": {
"showAnnotationButton": false,
"showFullscreenButton": true,
"showMoreButton": true,
"showPanZoomButton": true,
"showRangeBrushButton": true,
"showSettingsButton": false,
"showTagBrowserButton": false,
"showXTraceButton": true
},
"showDateRangeSelector": true,
"showPenControlDisplay": true,
"showTagBrowser": false
}
}
},
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "100%"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "containers/padded-container"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,366 @@
{
"custom": {},
"params": {
"Tag": "STU",
"faulted": 8,
"running": 3,
"standby": 25
},
"propConfig": {
"params.Tag": {
"paramDirection": "input",
"persistent": true
},
"params.faulted": {
"paramDirection": "input",
"persistent": true
},
"params.running": {
"paramDirection": "input",
"persistent": true
},
"params.standby": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 119,
"width": 110
}
},
"root": {
"children": [
{
"meta": {
"name": "Group"
},
"propConfig": {
"position.height": {
"binding": {
"config": {
"path": "../PieChart.position.height"
},
"type": "property"
}
},
"position.width": {
"binding": {
"config": {
"path": "../PieChart.position.width"
},
"type": "property"
}
},
"position.x": {
"binding": {
"config": {
"path": "../PieChart.position.x"
},
"type": "property"
}
},
"position.y": {
"binding": {
"config": {
"path": "../PieChart.position.y"
},
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.Tag"
},
"type": "property"
}
}
},
"props": {
"textStyle": {
"fontSize": 12,
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "PieChart"
},
"position": {
"height": 0.8908,
"width": 1
},
"propConfig": {
"props.data[0].count": {
"binding": {
"config": {
"path": "view.params.running"
},
"type": "property"
}
},
"props.data[1].count": {
"binding": {
"config": {
"path": "view.params.standby"
},
"type": "property"
}
},
"props.data[2].count": {
"binding": {
"config": {
"path": "view.params.faulted"
},
"type": "property"
}
}
},
"props": {
"colors": [
"white",
"gray",
"red"
],
"cutoutRadius": 50,
"data": [
{
"category": "Running"
},
{
"category": "Standby"
},
{
"category": "Faulted"
}
],
"labels": {
"showName": false,
"showValue": false,
"wrap": {
"maxWidth": 500
}
},
"legend": {
"fontSize": 12
},
"sectionOutline": {
"color": "#F00404"
},
"showLabels": false,
"showLegend": false,
"style": {
"outlineColor": "#FF0012",
"outlineStyle": "none",
"outlineWidth": 2,
"overflow": "visible",
"paddingBottom": -5,
"paddingLeft": -5,
"paddingRight": -5,
"paddingTop": -5
},
"tooltipFormat": "{category} : {value.formatNumber(\u0027#\u0027)}",
"valueFormat": {
"showValueAsPercent": false
}
},
"type": "ia.chart.pie"
},
{
"children": [
{
"meta": {
"name": "Fault_lbl",
"tooltip": {
"enabled": true,
"text": "Faulted"
}
},
"position": {
"basis": "15px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "this.props.text"
},
"transforms": [
{
"code": "\tresponse \u003d False\n\tif(value\u003e0):\n\t\tresponse\u003dTrue\n\treturn response",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.faulted"
},
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": 12
},
"textStyle": {
"backgroundColor": "var(--state-faulted)",
"borderBottomLeftRadius": "3px",
"borderBottomRightRadius": "3px",
"borderTopLeftRadius": "3px",
"borderTopRightRadius": "3px",
"color": "White",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Standby_lbl",
"tooltip": {
"enabled": true,
"text": "Standby"
}
},
"position": {
"basis": "15px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "this.props.text"
},
"transforms": [
{
"code": "\tresponse \u003d False\n\tif(value\u003e0):\n\t\tresponse\u003dTrue\n\treturn response",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.standby"
},
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": 12
},
"textStyle": {
"backgroundColor": "var(--state-standby)",
"borderBottomLeftRadius": "3px",
"borderBottomRightRadius": "3px",
"borderTopLeftRadius": "3px",
"borderTopRightRadius": "3px",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Running_lbl",
"tooltip": {
"enabled": true,
"text": "Running"
}
},
"position": {
"basis": "15px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "this.props.text"
},
"transforms": [
{
"code": "\tresponse \u003d False\n\tif(value\u003e0):\n\t\tresponse\u003dTrue\n\treturn response",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.running"
},
"type": "property"
}
}
},
"props": {
"style": {
"backgroundColor": "var(--state-running)",
"borderBottomLeftRadius": 3,
"borderBottomRightRadius": 3,
"borderTopLeftRadius": 3,
"borderTopRightRadius": 3,
"fontSize": 12,
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"custom": {
"values": {
"running": 18
}
},
"meta": {
"name": "FlexContainer"
},
"position": {
"height": 0.2,
"width": 1,
"x": 0.0091,
"y": 0.8039
},
"props": {
"alignContent": "center",
"alignItems": "center",
"justify": "center",
"style": {
"gap": 5,
"paddingLeft": 15,
"paddingRight": 15
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"mode": "percent",
"style": {
"overflow": "visible"
}
},
"type": "ia.container.coord"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Some files were not shown because too many files have changed in this diff Show More