608 lines
16 KiB
Plaintext
608 lines
16 KiB
Plaintext
{
|
|
"custom": {
|
|
"color": "#C2C2C2",
|
|
"priority": "No Active Alarms",
|
|
"state": "Closed"
|
|
},
|
|
"params": {
|
|
"forceFaultStatus": null,
|
|
"tagProps": [
|
|
"System/MCM01/Station/EPC/UL1_3_EPC1",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value",
|
|
"value"
|
|
]
|
|
},
|
|
"propConfig": {
|
|
"custom.color": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"0": "{view.params.tagProps[0]}",
|
|
"fc": "{session.custom.fc}"
|
|
},
|
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"fallback": "#000000",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": 0,
|
|
"output": "#C2C2C2"
|
|
},
|
|
{
|
|
"input": 1,
|
|
"output": "#FF0000"
|
|
},
|
|
{
|
|
"input": 2,
|
|
"output": "#FFA500"
|
|
},
|
|
{
|
|
"input": 3,
|
|
"output": "#0008FF"
|
|
},
|
|
{
|
|
"input": 4,
|
|
"output": "#00FF00"
|
|
},
|
|
{
|
|
"input": 5,
|
|
"output": "#FFF700"
|
|
},
|
|
{
|
|
"input": 6,
|
|
"output": "#87CEEB"
|
|
},
|
|
{
|
|
"input": 7,
|
|
"output": "#90EE90"
|
|
},
|
|
{
|
|
"input": 8,
|
|
"output": "#964B00"
|
|
},
|
|
{
|
|
"input": 9,
|
|
"output": "#FFFFFF"
|
|
},
|
|
{
|
|
"input": 10,
|
|
"output": "#000000"
|
|
},
|
|
{
|
|
"input": 11,
|
|
"output": "#8B0000"
|
|
},
|
|
{
|
|
"input": 12,
|
|
"output": "#808080"
|
|
},
|
|
{
|
|
"input": 13,
|
|
"output": "#8B8000"
|
|
},
|
|
{
|
|
"input": 14,
|
|
"output": "#006400"
|
|
},
|
|
{
|
|
"input": 15,
|
|
"output": "#FFFFC5"
|
|
},
|
|
{
|
|
"input": 16,
|
|
"output": "#00008B"
|
|
},
|
|
{
|
|
"input": 17,
|
|
"output": "#FF7276"
|
|
},
|
|
{
|
|
"input": 18,
|
|
"output": "#556B2F"
|
|
},
|
|
{
|
|
"input": 19,
|
|
"output": "#B43434"
|
|
},
|
|
{
|
|
"input": 20,
|
|
"output": "#4682B4"
|
|
},
|
|
{
|
|
"input": 21,
|
|
"output": "#FFD700"
|
|
}
|
|
],
|
|
"outputType": "color",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.priority": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"0": "{view.params.tagProps[0]}",
|
|
"fc": "{session.custom.fc}"
|
|
},
|
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"fallback": null,
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": 0,
|
|
"output": "No Active Alarms"
|
|
},
|
|
{
|
|
"input": 1,
|
|
"output": "High"
|
|
},
|
|
{
|
|
"input": 2,
|
|
"output": "Medium"
|
|
},
|
|
{
|
|
"input": 3,
|
|
"output": "Low"
|
|
},
|
|
{
|
|
"input": 4,
|
|
"output": "Diagnostic"
|
|
}
|
|
],
|
|
"outputType": "scalar",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.state": {
|
|
"binding": {
|
|
"config": {
|
|
"fallbackDelay": 2.5,
|
|
"mode": "indirect",
|
|
"references": {
|
|
"0": "{view.params.tagProps[0]}",
|
|
"fc": "{session.custom.fc}"
|
|
},
|
|
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"fallback": "Unknown",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": 0,
|
|
"output": "Closed"
|
|
},
|
|
{
|
|
"input": 1,
|
|
"output": "Actuated"
|
|
},
|
|
{
|
|
"input": 2,
|
|
"output": "Communication Faulted"
|
|
},
|
|
{
|
|
"input": 3,
|
|
"output": "Conveyor Running In Maintenance Mode"
|
|
},
|
|
{
|
|
"input": 4,
|
|
"output": "Disabled"
|
|
},
|
|
{
|
|
"input": 5,
|
|
"output": "Disconnected"
|
|
},
|
|
{
|
|
"input": 6,
|
|
"output": "Stopped"
|
|
},
|
|
{
|
|
"input": 7,
|
|
"output": "Enabled Not Running"
|
|
},
|
|
{
|
|
"input": 8,
|
|
"output": "Encoder Fault"
|
|
},
|
|
{
|
|
"input": 9,
|
|
"output": "Energy Management"
|
|
},
|
|
{
|
|
"input": 10,
|
|
"output": "ESTOP Was Actuated"
|
|
},
|
|
{
|
|
"input": 11,
|
|
"output": "EStopped"
|
|
},
|
|
{
|
|
"input": 12,
|
|
"output": "EStopped Locally"
|
|
},
|
|
{
|
|
"input": 13,
|
|
"output": "Extended Faulted"
|
|
},
|
|
{
|
|
"input": 14,
|
|
"output": "Full"
|
|
},
|
|
{
|
|
"input": 15,
|
|
"output": "Gaylord Start Pressed"
|
|
},
|
|
{
|
|
"input": 16,
|
|
"output": "Jam Fault"
|
|
},
|
|
{
|
|
"input": 17,
|
|
"output": "Jammed"
|
|
},
|
|
{
|
|
"input": 18,
|
|
"output": "Loading Allowed"
|
|
},
|
|
{
|
|
"input": 19,
|
|
"output": "Loading Not Allowed"
|
|
},
|
|
{
|
|
"input": 20,
|
|
"output": "Low Air Pressure Fault Was Present"
|
|
},
|
|
{
|
|
"input": 21,
|
|
"output": "Maintenance Mode"
|
|
},
|
|
{
|
|
"input": 22,
|
|
"output": "Conveyor Stopped In Maintenance Mode"
|
|
},
|
|
{
|
|
"input": 23,
|
|
"output": "Motor Faulted"
|
|
},
|
|
{
|
|
"input": 24,
|
|
"output": "Motor Was Faulted"
|
|
},
|
|
{
|
|
"input": 25,
|
|
"output": "Normal"
|
|
},
|
|
{
|
|
"input": 26,
|
|
"output": "Off Inactive"
|
|
},
|
|
{
|
|
"input": 27,
|
|
"output": "Open"
|
|
},
|
|
{
|
|
"input": 28,
|
|
"output": "PLC Ready To Run"
|
|
},
|
|
{
|
|
"input": 29,
|
|
"output": "Package Release Pressed"
|
|
},
|
|
{
|
|
"input": 30,
|
|
"output": "Power Branch Was Faulted"
|
|
},
|
|
{
|
|
"input": 31,
|
|
"output": "Pressed"
|
|
},
|
|
{
|
|
"input": 32,
|
|
"output": "Ready To Receive"
|
|
},
|
|
{
|
|
"input": 33,
|
|
"output": "Running"
|
|
},
|
|
{
|
|
"input": 34,
|
|
"output": "Started"
|
|
},
|
|
{
|
|
"input": 35,
|
|
"output": "Stopped"
|
|
},
|
|
{
|
|
"input": 36,
|
|
"output": "System Started"
|
|
},
|
|
{
|
|
"input": 37,
|
|
"output": "Unknown"
|
|
},
|
|
{
|
|
"input": 38,
|
|
"output": "VFD Fault"
|
|
},
|
|
{
|
|
"input": 39,
|
|
"output": "Conveyor Running In Power Saving Mode"
|
|
},
|
|
{
|
|
"input": 40,
|
|
"output": "Conveyor Jogging In Maintenance Mode"
|
|
},
|
|
{
|
|
"input": 41,
|
|
"output": "VFD Reset Required"
|
|
},
|
|
{
|
|
"input": 42,
|
|
"output": "Jam Reset Push Button Pressed"
|
|
},
|
|
{
|
|
"input": 43,
|
|
"output": "Start Push Button Pressed"
|
|
},
|
|
{
|
|
"input": 44,
|
|
"output": "Stop Push Button Pressed"
|
|
},
|
|
{
|
|
"input": 45,
|
|
"output": "No Container"
|
|
},
|
|
{
|
|
"input": 46,
|
|
"output": "Ready To Be Enabled"
|
|
},
|
|
{
|
|
"input": 47,
|
|
"output": "Half Full"
|
|
},
|
|
{
|
|
"input": 48,
|
|
"output": "Enabled"
|
|
}
|
|
],
|
|
"outputType": "scalar",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "tag"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"params.forceFaultStatus": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.tagProps": {
|
|
"paramDirection": "inout",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {
|
|
"defaultSize": {
|
|
"height": 38,
|
|
"width": 25
|
|
}
|
|
},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "PullChord_Part2"
|
|
},
|
|
"position": {
|
|
"height": 1,
|
|
"width": 1,
|
|
"x": 0.0015,
|
|
"y": 0.0005
|
|
},
|
|
"propConfig": {
|
|
"props.elements[1].fill.paint": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "if({view.custom.state} \u003d \"Closed\", \"#000000\", {view.custom.color})"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.elements[2].visibility": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "if(\r\n {view.custom.color} \u003d \"#FF0000\" \u0026\u0026 \r\n {parent.meta.visible},\r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"props.elements[3].visibility": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "if(\r\n {view.custom.color} \u003d \"#00FF00\" \u0026\u0026 \r\n {parent.meta.visible} || {view.custom.state} \u003d \"Closed\",\r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"elements": [
|
|
{
|
|
"d": "M 0.01621377,0.01595147 H 25.93719 V 41.138171 H 0.01621377 Z",
|
|
"fill": {
|
|
"paint": "#AAAAAA"
|
|
},
|
|
"name": "path",
|
|
"stroke": {
|
|
"paint": "#000000",
|
|
"width": 1
|
|
},
|
|
"type": "path"
|
|
},
|
|
{
|
|
"d": "m 20.752995,30.343588 a 7.2578735,7.1963887 0 0 1 -7.257873,7.196389 7.2578735,7.1963887 0 0 1 -7.2578736,-7.196389 7.2578735,7.1963887 0 0 1 7.2578736,-7.196389 7.2578735,7.1963887 0 0 1 7.257873,7.196389 z",
|
|
"fill": {},
|
|
"name": "path",
|
|
"stroke": {
|
|
"paint": "#000000",
|
|
"width": 1
|
|
},
|
|
"type": "path"
|
|
},
|
|
{
|
|
"d": "m 13.785537,6.4238337 -7.0747349,-3.1261989 -0.985,1.7060701 6.2447349,4.563801 z",
|
|
"fill": {
|
|
"paint": "#0000FF"
|
|
},
|
|
"name": "path",
|
|
"stroke": {
|
|
"paint": "#000000",
|
|
"width": 1
|
|
},
|
|
"type": "path"
|
|
},
|
|
{
|
|
"d": "m 12.141737,10.447495 -5.3573679,5.578853 1.2662916,1.509108 6.4243953,-4.30722 z",
|
|
"fill": {
|
|
"paint": "#0000FF"
|
|
},
|
|
"name": "path",
|
|
"stroke": {
|
|
"paint": "#000000",
|
|
"width": 1
|
|
},
|
|
"type": "path"
|
|
},
|
|
{
|
|
"d": "m 21.18,10 a 5,5 0 0 1 -5,5 5,5 0 0 1 -5,-5 5,5 0 0 1 5,-5 5,5 0 0 1 5,5 z",
|
|
"fill": {
|
|
"paint": "#0000FF"
|
|
},
|
|
"name": "path",
|
|
"stroke": {
|
|
"paint": "#000000",
|
|
"width": 1
|
|
},
|
|
"type": "path"
|
|
}
|
|
],
|
|
"viewBox": "-0.5 -0.5 27 42"
|
|
},
|
|
"type": "ia.shapes.svg"
|
|
}
|
|
],
|
|
"events": {
|
|
"dom": {
|
|
"onClick": {
|
|
"config": {
|
|
"script": "\tsystem.perspective.openDock(\u0027Docked-East-EPC\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
|
|
},
|
|
"scope": "G",
|
|
"type": "script"
|
|
},
|
|
"onMouseEnter": {
|
|
"config": {
|
|
"script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message"
|
|
},
|
|
"scope": "G",
|
|
"type": "script"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"name": "root",
|
|
"tooltip": {
|
|
"enabled": true,
|
|
"location": "top-left",
|
|
"style": {}
|
|
}
|
|
},
|
|
"propConfig": {
|
|
"meta.tooltip.style.classes": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "{view.custom.priority}"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"fallback": "Alarms-Styles/NoAlarm",
|
|
"inputType": "scalar",
|
|
"mappings": [
|
|
{
|
|
"input": "High",
|
|
"output": "Alarms-Styles/High"
|
|
}
|
|
],
|
|
"outputType": "style-list",
|
|
"type": "map"
|
|
}
|
|
],
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"meta.tooltip.text": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
},
|
|
"meta.visible": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "session.custom.alarm_filter.show_safety"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"aspectRatio": "25:38",
|
|
"mode": "percent",
|
|
"style": {
|
|
"cursor": "pointer"
|
|
}
|
|
},
|
|
"type": "ia.container.coord"
|
|
}
|
|
} |