{ "version": 1, "header_image": "", "allow_edit": false, "plugins": [], "panes": [ { "width": 1, "row": { "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1 }, "col": { "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1 }, "col_width": 6, "widgets": [ { "type": "html", "settings": { "html": "let clock = datasources[\"Clock\"][\"numeric_value\"]; // trick to trigger the update\nlet cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\ndocument.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML = \"\";\n\nvar title = \"\";\nif (datasources[\"gwhealth\"][\"gwstatus\"] == \"OK\") {\n\ttitle = \"Public Operations Screen\"; // Change this title. Try not to exceed the 30 chars\n}\nif (datasources[\"gwhealth\"][\"gwstatus\"] == \"KO\") {\n\ttitle = \"Public Operations Screen [Offline]\"; // Change this title. Try not to exceed the 30 chars\n}\n\nlet fontsize = Math.round((-0.66486486*title.length+66.67567568)*cols/4);\nlet lmargin = Math.round((0.43918919*title.length-4.05405405)+3.75*cols*cols-34.75*cols+79.75);\nlet width = 100-lmargin;\n\nvar text = `<div style=\\\"position: relative; margin-top: -15px; text-align: left;\\\">\n\t\t\t<div style=\\\"position: relative;\\\">\n\t\t\t\t<img src=\\\"../img/ess-logo.svg\\\" title=\\\"Designed by Emanuele Laface with p4p and Freeboard. Graphics by Dirk Nordt.\\\"></img>\n\t\t\t</div>\n<div class=\\\"tw-value\\\" style=\\\"font-size: `+String(fontsize)+`px; color:#ffffff !important; position: absolute; left: `+String(lmargin)+`%; width: `+String(width)+`%; height: 100%; justify-content: center; display: flex; align-items: center;\\\" title=\\\"Designed by Emanuele Laface with p4p and Freeboard. Graphics by Dirk Nordt.\\\">\n\t\t\t\t`+title+`\n\t\t\t</div>\n\t\t</div>`;\n\nif (cols == 1){\n text = \"<div style=\\\"position: static; margin-top: -15px;\\\"><img src=\\\"../img/ess-logo.svg\\\" title=\\\"Designed by Emanuele Laface with p4p and Freeboard. Graphics by Dirk Nordt.\\\"><div class=\\\"tw-value\\\" style=\\\"font-size: 30px; color:#ffffff !important; position: relative; bottom: 55px; left: 30px;\\\" title=\\\"Designed by Emanuele Laface with p4p and Freeboard. Graphics by Dirk Nordt.\\\"></div></img></div>\";\n document.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML = title;\n}\n\nreturn text;", "height": 2 } } ] }, { "title": "Permit table", "width": 1, "row": { "1": 7, "2": 7, "3": 7, "4": 7, "5": 7, "6": 7, "7": 11, "8": 11, "9": 11, "10": 11, "11": 11, "13": 11, "14": 11 }, "col": { "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 2, "8": 2, "9": 2, "10": 2, "11": 2, "13": 2, "14": 2 }, "col_width": 1, "widgets": [ { "type": "indicator", "settings": { "title": "", "value": "datasources[\"general\"][\"FBIS::beam_permit_ok\"][\"value\"][\"index\"]", "on_text": "FBIS Global Permit", "off_text": "FBIS Global Permit" } }, { "type": "indicator", "settings": { "value": "datasources[\"general\"][\"BPROD:Ops:BState\"][\"value\"][\"index\"]", "on_text": "OP Beam Requested", "off_text": "OP Beam Requested" } }, { "type": "text_widget", "settings": { "title": "PSS1 Mode of Operation", "size": "regular", "value": "return datasources[\"general\"][\"AccPSS:PSS-Area-1:PSSMode\"][\"value\"][\"choices\"][datasources[\"general\"][\"AccPSS:PSS-Area-1:PSSMode\"][\"value\"][\"index\"]];", "animate": true } } ] }, { "title": "Ion Source", "width": 1, "row": { "1": 15, "2": 7, "3": 7, "4": 7, "5": 7, "6": 7, "7": 7, "8": 7, "9": 7, "10": 7, "11": 7, "12": 7, "14": 7, "15": 7 }, "col": { "1": 1, "2": 2, "3": 2, "4": 2, "5": 2, "6": 2, "7": 1, "8": 1, "9": 1, "10": 1, "11": 1, "12": 1, "14": 1, "15": 1 }, "col_width": 1, "widgets": [ { "type": "indicator", "settings": { "value": "datasources[\"source\"][\"ISrc-CS:ISS-Magtr-01:MwRdy\"][\"value\"][\"index\"]", "on_text": "Magnetron On", "off_text": "Magnetron Off" } }, { "type": "text_widget", "settings": { "title": "Power", "size": "regular", "value": "datasources[\"source\"][\"ISrc-CS:ISS-Magtr-01:PulsHLvl-S\"][\"value\"]", "animate": true, "units": "W" } }, { "type": "indicator", "settings": { "title": "High Voltage Platform", "value": "datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Pwr-R\"][\"value\"][\"index\"]\n", "on_text": "String(datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Vol-R\"][\"value\"].toFixed(0))+\" \"+datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Vol-R\"][\"display\"][\"units\"]", "off_text": "String(datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Vol-R\"][\"value\"].toFixed(0))+\" \"+datasources[\"source\"][\"ISrc-CS:ISS-HVPS-01:Vol-R\"][\"display\"][\"units\"]" } }, { "type": "text_widget", "settings": { "title": "Beam Current", "size": "regular", "value": "datasources[\"beamcurr\"][\"ISrc-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"].toFixed(1);", "animate": true, "units": "mA" } } ] }, { "title": "Control Room", "width": 1, "row": { "1": 31, "2": 15, "3": 7, "4": 7, "5": 7, "6": 7, "7": 7, "8": 7, "9": 7, "10": 7, "11": 7, "12": 7, "13": 7, "14": 7, "15": 7 }, "col": { "1": 1, "2": 1, "3": 3, "4": 4, "5": 5, "6": 6, "7": 1, "8": 1, "9": 1, "10": 1, "11": 1, "12": 1, "13": 1, "14": 1, "15": 1 }, "col_width": 1, "widgets": [ { "type": "text_widget", "settings": { "title": "Shift ID", "size": "regular", "value": "datasources[\"general\"][\"NSO:Ops:SID\"][\"value\"]", "animate": false } }, { "type": "text_widget", "settings": { "size": "regular", "value": "datasources[\"Clock\"][\"numeric_value\"];\n\nvar elements = document.getElementsByClassName('tw-value');\n\nfor (var i = 0; i < elements.length; i++) {\n var element = elements[i];\n if (element.innerHTML == datasources[\"general\"][\"NSO:Ops:Msg\"][\"value\"]) {\n element.style.fontSize = \"18px\";\n }\n}\n\nreturn datasources[\"general\"][\"NSO:Ops:Msg\"][\"value\"];", "animate": true } }, { "type": "indicator", "settings": { "value": "if (datasources[\"general\"][\"NSO:Ops:ESSSystemPermit\"][\"value\"][\"index\"] == 1) {\n return 1;\n}\nelse {\n return 0;\n}", "on_text": "Beam Authorization", "off_text": "Beam Authorization" } }, { "type": "indicator", "settings": { "value": "datasources[\"general\"][\"NSO:Ops:ESSSystemPermit\"][\"value\"][\"index\"]", "on_text": "System Permit", "off_text": "System Permit" } } ] }, { "title": "Beam Production Table", "width": 1, "row": { "1": 41, "2": 17, "3": 15, "4": 7, "5": 7, "6": 7, "7": 13, "8": 13, "9": 13, "10": 13, "11": 13, "12": 13, "14": 13, "16": 13 }, "col": { "1": 1, "2": 2, "3": 1, "4": 3, "5": 3, "6": 3, "7": 1, "8": 1, "9": 1, "10": 1, "11": 1, "12": 1, "14": 1, "16": 1 }, "col_width": 1, "widgets": [ { "type": "text_widget", "settings": { "title": "Frequency", "size": "regular", "value": "datasources[\"beamprod\"][\"TD-M:Ctrl-SCE-1:NepEvtBPulseStFreq-I\"][\"value\"].toFixed(1)", "animate": true, "units": "Hz" } }, { "type": "text_widget", "settings": { "title": "ISrc Pulse Length", "size": "regular", "value": "datasources[\"beamprod\"][\"BPROD:Ops:BSourcePL-RB\"][\"value\"]", "animate": true, "units": "µs" } }, { "type": "text_widget", "settings": { "title": "LEBT Pulse Length", "size": "regular", "value": "datasources[\"beamprod\"][\"BPROD:Ops:BLebtPL-RB\"][\"value\"]", "animate": true, "units": "µs" } }, { "type": "text_widget", "settings": { "title": "MEBT Pulse Length", "size": "regular", "value": "datasources[\"beamprod\"][\"BPROD:Ops:BeamPL-RB\"][\"value\"]", "animate": true, "units": "µs" } } ] }, { "title": "Beam", "width": 1, "row": { "1": 25, "2": 25, "3": 17, "4": 15, "5": 7, "6": 7, "9": 17, "10": 17, "11": 17, "12": 17, "14": 17, "15": 17 }, "col": { "1": 1, "2": 1, "3": 3, "4": 1, "5": 4, "6": 4, "9": 2, "10": 2, "11": 2, "12": 2, "14": 2, "15": 2 }, "col_width": 1, "widgets": [ { "type": "text_widget", "settings": { "title": "Theoretical Energy", "size": "regular", "value": "switch(datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"][\"index\"]) {\n case 0: // IsRC\n return \"0 MeV\";\n break;\n case 1: // LEBT\n\t\treturn \"0.075 MeV\";\n break;\n\tcase 2: // MEBT\n return \"3.6 MeV\"\n\t\t//return String(datasources[\"general\"][\"PBI-FBPM01::Energy-R\"][\"value\"].toFixed(2))+\" MeV\";\n break;\n\tcase 3: // DTL 2\n\t\treturn \"39.6 MeV\";\n break;\n\tcase 4: // DTL 4\n\t\treturn \"73.8 MeV\";\n break;\n default:\n return \"N/A\";\n}", "animate": true } }, { "type": "text_widget", "settings": { "title": "Theoretical Power", "size": "regular", "value": "let frequency = datasources[\"beamprod\"][\"TD-M:Ctrl-SCE-1:NepEvtBPulseStFreq-I\"][\"value\"];\nlet lebtchopper = datasources[\"beamprod\"][\"BPROD:Ops:BLebtPL-RB\"][\"value\"];\nlet mebtchopper = datasources[\"beamprod\"][\"BPROD:Ops:BeamPL-RB\"][\"value\"];\nlet lebtcurr = datasources[\"beamcurr\"][\"LEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"];\nlet mebtcurr = datasources[\"beamcurr\"][\"MEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"];\n//let dtl4curr = datasources[\"beamcurr\"][\"DTL-040:PBI-BCM-001:FlatTopCurrentR\"][\"value\"];\nlet dtl4curr = datasources[\"beamcurr\"][\"DTL-040:PBI-FC-001:STAT3-MeanValueR\"][\"value\"];\nvar energy = 0;\nvar power = 0;\n\nswitch(datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"][\"index\"]) {\n case 0: // IsRC\n return 0;\n break;\n case 1: // LEBT\n energy = 75e3;\n power = lebtcurr*1e-3*lebtchopper*1e-6*frequency*energy;\n\t\treturn power.toFixed(2);\n break; \n\tcase 2: // MEBT\n energy = 3.6e6;\n\t\tpower = mebtcurr*1e-3*mebtchopper*1e-6*frequency*energy;\n return power.toFixed(2);\n break;\n\tcase 3: // DTL 2\n\t\treturn \"N/A\";\n break;\n\tcase 4: // DTL 4\n energy = 73.8e6;\n\t\tpower = dtl4curr*1e-3*mebtchopper*1e-6*frequency*energy;\n\t\treturn power.toFixed(2);\n break;\n default:\n return \"N/A\";\n}", "animate": true, "units": "W" } } ] }, { "title": "Beam Mode", "width": 1, "row": { "1": 51, "2": 27, "3": 15, "4": 17, "5": 13, "6": 7, "7": 21, "8": 21, "9": 21, "10": 21, "11": 21, "12": 21, "15": 21, "16": 21 }, "col": { "1": 1, "2": 2, "3": 2, "4": 2, "5": 4, "6": 5, "7": 3, "8": 3, "9": 3, "10": 3, "11": 3, "12": 3, "15": 3, "16": 3 }, "col_width": 1, "widgets": [ { "type": "text_widget", "settings": { "size": "regular", "value": "datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BMod-Sel\"][\"value\"][\"choices\"][datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BMod-Sel\"][\"value\"][\"index\"]]\n", "animate": true } }, { "type": "text_widget", "settings": { "title": "Destination", "size": "regular", "value": "datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"][\"choices\"][datasources[\"general\"][\"TD-M:Ctrl-SCE-1:BDest-Sel\"][\"value\"][\"index\"]]", "animate": true } } ] }, { "title": "Beam Current", "width": 1, "row": { "1": 57, "2": 33, "3": 25, "4": 23, "5": 19, "6": 17, "9": 17, "11": 17 }, "col": { "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "9": 1, "11": 1 }, "col_width": 6, "widgets": [ { "type": "flot_extended_plugin", "settings": { "plot_type": "bar", "legend": true, "height": 6, "value": "let bcmdataset = [//[0, Math.max(0,datasources[\"beamcurr\"][\"ISrc-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"])],\n [2, Math.max(1e-6,datasources[\"beamcurr\"][\"LEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"])],\n [3, Math.max(0.0,datasources[\"beamcurr\"][\"RFQ-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"])],\n [4, Math.max(0.0,datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"])],\n [6, Math.max(0.0,datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-002:FlatTopCurrentR\"][\"value\"])],\n [7, Math.max(0.0,datasources[\"beamcurr\"][\"DTL-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"])],\n [8, Math.max(0.0,datasources[\"beamcurr\"][\"DTL-020:PBI-BCM-001:FlatTopCurrentR\"][\"value\"])],\n [9, Math.max(0.0,datasources[\"beamcurr\"][\"DTL-030:PBI-BCM-001:FlatTopCurrentR\"][\"value\"])],\n [10, Math.max(0.0,datasources[\"beamcurr\"][\"DTL-040:PBI-BCM-001:FlatTopCurrentR\"][\"value\"])]];\n\nlet fcdataset = [[1, Math.max(0.0,datasources[\"beamcurr\"][\"LEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"])],\n [5, Math.max(0.0,datasources[\"beamcurr\"][\"MEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"])],\n [11, Math.max(0.0,datasources[\"beamcurr\"][\"DTL-040:PBI-FC-001:STAT3-MeanValueR\"][\"value\"])]];\n\nlet data = [{data: bcmdataset, color: \"lime\"},\n {data: fcdataset, color: \"yellow\"}];\nreturn data\n", "xticks": "let clock = datasources[\"Clock\"][\"numeric_value\"]; // trick to trigger the update\nlet cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');\n\nvar xticks = [[0, \"Ion Source<br>BCM\"],\n [1, \"LEBT<br>FC\"],\n [2, \"LEBT<br>BCM\"],\n [3, \"RFQ<br>BCM\"],\n [4, \"MEBT<br>BCM 1\"],\n [5, \"MEBT<br>FC\"],\n [6, \"MEBT<br>BCM 2\"],\n [7, \"DTL 1<br>BCM\"],\n [8, \"DTL 2<br>BCM\"],\n [9, \"DTL 3<br>BCM\"],\n [10, \"DTL 4<br>BCM\"],\n [11, \"DTL 4<br>FC\"]];\n\nif (cols == 1) {\n xticks = [[0, \"ISrc<br>BCM\"],\n [1, \"<br><br>LEBT<br>FC\"],\n [2, \"LEBT<br>BCM\"],\n [3, \"<br><br>RFQ<br>BCM\"],\n [4, \"MEBT<br>BCM 1\"],\n [5, \"<br><br>MEBT<br>FC\"],\n [6, \"MEBT<br>BCM 2\"],\n [7, \"<br><br>DTL 1<br>BCM\"],\n [8, \"DTL 2<br>BCM\"],\n [9, \"<br><br>DTL 3<br>BCM\"],\n [10, \"DTL 4<br>BCM\"],\n [11, \"<br><br>DTL 4<br>FC\"]];\n};\n\nif (cols == 2) {\n xticks = [[0, \"ISrc<br>BCM\"],\n [1, \"LEBT<br>FC\"],\n [2, \"LEBT<br>BCM\"],\n [3, \"RFQ<br>BCM\"],\n [4, \"MEBT<br>BCM 1\"],\n [5, \"MEBT<br>FC\"],\n [6, \"MEBT<br>BCM 2\"],\n [7, \"DTL 1<br>BCM\"],\n [8, \"DTL 2<br>BCM\"],\n [9, \"DTL 3<br>BCM\"],\n [10, \"DTL 4<br>BCM\"],\n [11, \"DTL 4<br>FC\"]];\n};\n\nreturn xticks;", "yticks": "let maxcurr = Math.max(//datasources[\"beamcurr\"][\"ISrc-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"LEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"],\n datasources[\"beamcurr\"][\"LEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"RFQ-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"MEBT-010:PBI-FC-001:STAT3-MeanValueR\"][\"value\"],\n datasources[\"beamcurr\"][\"MEBT-010:PBI-BCM-002:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-010:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-020:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-030:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-040:PBI-BCM-001:FlatTopCurrentR\"][\"value\"],\n datasources[\"beamcurr\"][\"DTL-040:PBI-FC-001:STAT3-MeanValueR\"][\"value\"],1);\n\n\nlet step=maxcurr/10;\nvar yticks=[];\nfor (i=0; i<=maxcurr+step; i+=step) {\n yticks.push([i,i.toFixed(1).toString()]);\n}\n\nyticks[yticks.length-1] = [yticks[yticks.length-1][0],\"[mA]\"];\n\nreturn yticks;\n", "points": false, "zoom": "xy" } } ] } ], "datasources": [ { "name": "general", "type": "JSON", "settings": { "url": "/data/api/v2/pvget/AccPSS:PSS-Area-1:PSSMode,BPROD:Ops:BState,NSO:Ops:SID,NSO:Ops:Msg,NSO:Ops:BeamAuthorization,NSO:Ops:ESSSystemPermit,FBIS::beam_permit_ok,PBI-FBPM01::Energy-R,TD-M:Ctrl-SCE-1:ScTable-RB,TD-M:Ctrl-SCE-1:BState-Sts,TD-M:Ctrl-SCE-1:BMod-Sel,TD-M:Ctrl-SCE-1:BDest-Sel", "use_thingproxy": false, "refresh": 10, "method": "GET", "name": "general" } }, { "name": "Clock", "type": "clock", "settings": { "refresh": 1, "name": "Clock" } }, { "name": "source", "type": "JSON", "settings": { "url": "/data/api/v2/pvget/ISrc-CS:ISS-Magtr-01:MwRdy,ISrc-CS:ISS-Magtr-01:PulsHLvl-S,ISrc-CS:ISS-HVPS-01:Pwr-R,ISrc-CS:ISS-HVPS-01:Vol-R", "use_thingproxy": true, "refresh": 10, "method": "GET", "name": "source" } }, { "name": "beamprod", "type": "JSON", "settings": { "url": "/data/api/v2/pvget/TD-M:Ctrl-SCE-1:NepEvtBPulseStFreq-I,BPROD:Ops:BSourcePL-RB,BPROD:Ops:BLebtPL-RB,BPROD:Ops:BeamPL-RB", "use_thingproxy": true, "refresh": 10, "method": "GET" } }, { "name": "beamcurr", "type": "JSON", "settings": { "url": "/data/api/v2/pvget/ISrc-010:PBI-BCM-001:FlatTopCurrentR,LEBT-010:PBI-FC-001:STAT3-MeanValueR,LEBT-010:PBI-BCM-001:FlatTopCurrentR,RFQ-010:PBI-BCM-001:FlatTopCurrentR,MEBT-010:PBI-BCM-001:FlatTopCurrentR,MEBT-010:PBI-FC-001:STAT3-MeanValueR,MEBT-010:PBI-BCM-002:FlatTopCurrentR,DTL-010:PBI-BCM-001:FlatTopCurrentR,DTL-020:PBI-BCM-001:FlatTopCurrentR,DTL-030:PBI-BCM-001:FlatTopCurrentR,DTL-040:PBI-BCM-001:FlatTopCurrentR,DTL-040:PBI-FC-001:STAT3-MeanValueR", "use_thingproxy": true, "refresh": 10, "method": "GET" } }, { "name": "gwhealth", "type": "JSON", "settings": { "url": "/data/-/gwhealth/NSO:Ops:SID", "use_thingproxy": true, "refresh": 10, "method": "GET" } } ], "columns": 6 }