161 lines
5.1 KiB
Plaintext
161 lines
5.1 KiB
Plaintext
{
|
|
"custom": {
|
|
"data": null,
|
|
"type": "Chillers",
|
|
"values": null
|
|
},
|
|
"params": {
|
|
"LLS_tagPath": "[Ignition_Common_IO_Gtwy]CHWS/Chiller_LLS",
|
|
"tagPath": "[Ignition_Common_IO_Gtwy]Roof"
|
|
},
|
|
"propConfig": {
|
|
"custom.data": {
|
|
"binding": {
|
|
"config": {
|
|
"struct": {
|
|
"hb": "now(5000)",
|
|
"tagpath": "{view.params.tagPath}"
|
|
},
|
|
"waitOnAll": true
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\ttagPaths \u003d []\n\tfor i in range(0, 48):\n\t\tCH_Name \u003d \"/SATB1_RF_CH{:02d}_SYSTEM\".format(i+1)\n\t\tMTR_Name \u003d \"/SATB1_RF_CH{:02d}_MOTOR\".format(i+1)\n\t\ttagPaths.append(value[\u0027tagpath\u0027] + CH_Name + \"/Control/Mode\")\n\t\ttagPaths.append(value[\u0027tagpath\u0027] + CH_Name + \"/System HOA\")\n\t\ttagPaths.append(value[\u0027tagpath\u0027] + MTR_Name + \"/Status Running\")\n\tdata \u003d system.tag.readBlocking(tagPaths)\n\t\n\tidx \u003d 0\n\toutput \u003d []\n\tfor i in range(0, 48):\n\t\tchiller \u003d {}\n\t\tCH_Name \u003d \"/SATB1_RF_CH{:02d}_SYSTEM\".format(i+1)\n\t\tchiller[\u0027Mode\u0027] \u003d data[idx]\n\t\tchiller[\u0027HOA\u0027] \u003d data[idx+1]\n\t\tchiller[\u0027Faulted\u0027] \u003d alarm.summary.calcMaxPriority(value[\u0027tagpath\u0027] + CH_Name)\n\t\tchiller[\u0027Running\u0027] \u003d data[idx+2]\n\t\tidx +\u003d 3\n\t\toutput.append(chiller)\n\t\t\n\treturn output",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr-struct"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.type": {
|
|
"persistent": true
|
|
},
|
|
"custom.values": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.data"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\toutput \u003d {}\n\tcountRunning \u003d 0\n\tcountStandby \u003d 0\n\tcountFaulted \u003d 0\n\tcountManual \u003d 0\n\tfor i in range(len(value)):\n\t\tif value[i][\u0027Faulted\u0027] \u003e 0:\n\t\t\tcountFaulted +\u003d1\n\t\t\tcontinue\n\t\telif value[i][\u0027Mode\u0027] \u003d\u003d False:\n\t\t\tcountManual +\u003d1\n\t\t\tcontinue\n\t\telif value[i][\u0027Running\u0027]:\n\t\t\tcountRunning +\u003d1\n\t\t\tcontinue\n\t\telse:\n\t\t\tcountStandby +\u003d1\n\toutput[\"Running\"] \u003d countRunning\n\toutput[\"Standby\"] \u003d countStandby\n\toutput[\"Faulted\"] \u003d countFaulted\n\toutput[\"Manual\"] \u003d countManual\n\treturn output",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"params.LLS_tagPath": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.tagPath": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 101,
|
|
"width": 399
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "FlexRepeater"
|
|
},
|
|
"position": {
|
|
"height": 1,
|
|
"width": 1
|
|
},
|
|
"propConfig": {
|
|
"props.instances[0].value": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.values.Running"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.instances[1].value": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.values.Standby"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.instances[2].value": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.values.Faulted"
|
|
},
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.instances[3].value": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.custom.values.Manual"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"instances": [
|
|
{
|
|
"instancePosition": {},
|
|
"instanceStyle": {
|
|
"classes": ""
|
|
},
|
|
"title": "Running"
|
|
},
|
|
{
|
|
"instancePosition": {},
|
|
"instanceStyle": {
|
|
"classes": ""
|
|
},
|
|
"title": "Standby"
|
|
},
|
|
{
|
|
"instancePosition": {},
|
|
"instanceStyle": {
|
|
"classes": ""
|
|
},
|
|
"title": "Faulted"
|
|
},
|
|
{
|
|
"instancePosition": {},
|
|
"instanceStyle": {
|
|
"classes": ""
|
|
},
|
|
"title": "Manual"
|
|
}
|
|
],
|
|
"path": "Library/Widgets/Mechanical/Wdg_CH_Count",
|
|
"style": {
|
|
"gap": "15px",
|
|
"padding": "15px"
|
|
},
|
|
"useDefaultViewHeight": false,
|
|
"useDefaultViewWidth": false
|
|
},
|
|
"type": "ia.display.flex-repeater"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"props": {
|
|
"mode": "percent",
|
|
"style": {
|
|
"overflow": "visible"
|
|
}
|
|
},
|
|
"type": "ia.container.coord"
|
|
}
|
|
} |