BNMR: Custom Status page: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
en>Suz
mNo edit summary
No edit summary
 
(20 intermediate revisions by 2 users not shown)
Line 2: Line 2:
== Links ==
== Links ==
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[BNMR]]
* [[BNMR: Custom pages|BNMR/BNQR Custom pages]]
* [[BNMR: Experimental Modes|Experimental Modes]]
* [[BNMR: Custom Status page|Custom Status page]]
* [[BNMR: Getting Started|Getting Started]]
* [[BNMR: Custom Settings page|Custom Settings page]]
* [[BNMR: Custom Parameters page|Custom Parameters page]]
* [[BNMR: Custom Logging page|Custom Logging page]]
* [[BNMR#Nomenclature|Nomenclature]]
* [[BNMR: Custom Modes page|Custom Modes page]]
* [[BNMR: Custom Expert page|Custom Expert page]]
</div>


</div>
== Introduction ==
== Introduction ==
The default [https://midas.triumf.ca/MidasWiki/index.php/Status_Page MIDAS Status page] has been replaced by a custom status page for the  {{bnmqr|join=and}} experiments. Note that the MIDAS client [https://midas.triumf.ca/MidasWiki/index.php/Mhttpd mhttpd] must be running for the webserver to be available. To connect to the Custom Status page, see  [[BNMR: Getting Started|Getting Started]].
The standard [https://midas.triumf.ca/MidasWiki/index.php/Status_Page MIDAS Status page] is not very useful for {{bnmqr|join=and}}, so it has been replaced by a custom version for these experiments.
 
Note that the MIDAS client [https://midas.triumf.ca/MidasWiki/index.php/Mhttpd mhttpd] must be running for the webserver to be available. To connect to the Custom Status page, see  [[BNMR: Getting Started|Getting Started]].


== Custom Status Page ==
The custom status page allows the user to
The custom status page allows users to enter experimental parameters easily, including changing  [[BNMR: Experimental Modes|Experimental Modes]] and [[BNMR: Run numbering|run type]]. A [[BNMR: Custom Parameters page|Custom Parameter page]] accessed from the custom status page allows users to enter run parameters easily.  The custom status page for {{bnmr}} and {{bnqr}} experiments is shown in Figures 1 and 2 respectively.
* view the current state of the run, including scan status, histogram counts, EPICS values and CAMP values
<gallery>
* change which experimental mode is being used
Image:Bnmr_status_stopped.png|Figure 1:<br> BNMR Custom Status Page (Run Stopped)
* change whether a run is "real" or "test" data
Image:Bnqr_status_stopped.png|Figure 2:<br>BNQR Custom Status Page (Run Stopped)
* change/view the helicity and beam settings
</gallery><br clear=all>
* enable/disable the alarm system
'''Click a thumbnail to enlarge'''
* force neutral beam checks to be re-referenced


== Implementation ==


== Features of the Custom Status Page ==
We force Midas to use our custom status page by deleting the file <code>$MIDASSYS/resources/status.html</code> with a symlink to <code>bnxr_common/custom/status.html</code> from the bnmr repository.
The Custom Status Page provides status information specific to the {{bnmqr|join=or}} experiments. The option of reverting to the MIDAS standard status page is provided via the ToggleStatusPage button.


=== Command and Page Buttons ===
The page uses [https://daq00.triumf.ca/MidasWiki/index.php/Mjsonrpc Midas JRPC] calls to talk to:
* the <code>mode_changer.py</code> program for changing modes and changing between real/test runs
* the <code>rf_calculator_fe.py</code> program for visualizing the PPG and PSM settings as plots


[[Image:Bnqr_top_buttons2.png|Figure 3 Command and Page Buttons]]
The page uses standard [https://daq00.triumf.ca/MidasWiki/index.php/Custom_Page Midas custom page] tools for editing ODB settings. An ODB hotlink is used for the neutral beam re-referencing.
<br clear=all>
In the middle of the top line on the Custom Status page are found the standard [https://midas.triumf.ca/MidasWiki/index.php/Status_Page#Menu_Buttons Menu buttons] to stop and start runs or to display
different MIDAS pages. These standard buttons appear on most MIDAS pages (see [https://midas.triumf.ca/MidasWiki/index.php/Status_Page MIDAS Status page] for more information).


Below these buttons are buttons specific to the {{bnmqr|join=and}} experiment. Some are [[BNMR: Perlscripts#Customscripts|customscript buttons]], that is, a script is run when the button is pressed. Others switch to a different custom page. The actions of these buttons are described in Table 1.
== Example screenshot ==


{|  style="text-align: left; width: 100%; background-color: rgb(255, 255, 255);" border="3" cellpadding="2" cellspacing="2"
[[Image:Custom_status.png|left|thumb|800px|Figure 1:Status page during Mode 1f with run stopped]]
|+ Table 1: Custom Buttons
|-
! Button !! Action
|-
| {{Button|name=Autorun}}
| toggles [[BNMR: Autoruns|Autoruns]] on or off
|-
| <span style="color: brown; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;
padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">rf_config</span>
| runs client <span style="color:green;  font-style:italic; ">rf_config</span> to test the validity of the input parameters without actually starting a run<br>
|-
| <span style="color: brown; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;
padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">ToggleStatusPage</span>
| runs a perlscript causing the status page to revert to the standard Midas Status Page. After pressing this button, a popup window with a message "Now refresh page" will appear. After refreshing the page, the MIDAS status page will appear.  From this page, the CustomStatus page can be reached by clicking on the custom button  <span style="color: #444444; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;
padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">CustomStatus</span> button. This will show the Custom status page as a regular Custom page. A message can be seen at the top of the custom page in this case "Using alias link "CustomStatus&" from Midas Main Status Page".  To revert to running this page as the Custom Status Page, press the button once more and refresh the page.
|
| <span style="color: blue; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;
padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">RunParams</span>
|gives access to the Custom Parameter page.
|-
|
<span style="color: green; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;
padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">ShowWindows</span>
|button opens the page shown in Figure 4.
|}
<br><br>
;Figure 4: Client windows page
[[Image:Show_client_windows_page.png|left|thumb]]
<br clear=all>
<br clear=all>


 
[[Category:BNMR]] [[Category:Webserver]]
=== Page Update Information ===
The page update information is also visible in Figure 1. The custom status page updates completely with a full page reload every minute. In between, it updates the information using innerHTML. This is called a partial reload. The time between partial reloads can be set by the user by clicking on the link  "Page update 10 sec (min 5s)"  (Figure 1). This minimum time is 5s.  The ODB data is read each time a partial reload is done. The times of the last ODB data read, last full reload etc are also shown in Figure 1. A countdown to the next full reload is also visible.
 
 
 
== Programming Information ==
The custom status page is a [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page MIDAS Custom Page] written for the  {{bnmqr|join=and}} experiments.
It is written in HTML and Javascript and uses the  MIDAS [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#Access_the_ODB_using_mjson-rpc_asynchronous_functions asynchronous functions] to access the ODB.
 
[[BNMR: Keys in /Custom ODB tree|Keys in /Custom ODB tree]] define the paths of the files containing external stylesheets, html and javascript code used by the  {{bnmqr|join=and}} experiments. The files are the same for both experiments.

Latest revision as of 10:50, 2 May 2022

Links

Introduction

The standard MIDAS Status page is not very useful for bnmr and bnqr, so it has been replaced by a custom version for these experiments.

Note that the MIDAS client mhttpd must be running for the webserver to be available. To connect to the Custom Status page, see Getting Started.

The custom status page allows the user to

  • view the current state of the run, including scan status, histogram counts, EPICS values and CAMP values
  • change which experimental mode is being used
  • change whether a run is "real" or "test" data
  • change/view the helicity and beam settings
  • enable/disable the alarm system
  • force neutral beam checks to be re-referenced

Implementation

We force Midas to use our custom status page by deleting the file $MIDASSYS/resources/status.html with a symlink to bnxr_common/custom/status.html from the bnmr repository.

The page uses Midas JRPC calls to talk to:

  • the mode_changer.py program for changing modes and changing between real/test runs
  • the rf_calculator_fe.py program for visualizing the PPG and PSM settings as plots

The page uses standard Midas custom page tools for editing ODB settings. An ODB hotlink is used for the neutral beam re-referencing.

Example screenshot

Figure 1:Status page during Mode 1f with run stopped