BNMR: Custom Status page: Difference between revisions
m (25 revisions imported) |
m (Bsmith moved page DaqWiki:BNMR: Custom Status page to BNMR: Custom Status page without leaving a redirect) |
(No difference)
|
Revision as of 12:24, 25 April 2022
Links
Introduction
When the webserver is used to connect to a MIDAS experiment, the standard MIDAS Status page is shown, unless it has been replaced by a Custom Status page. This is the case for the bnmr and bnqr experiments. A custom page written specifically for the bnmr and bnqr experiments replaces the standard MIDAS Status page. It is called the Custom Status page.
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.
Custom Status Page
The custom status page allows users to enter experimental parameters easily, including changing Experimental Modes and run type. A 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.
Example 1: BNMR Custom Status Page
- Figure 1 BNMR Custom Status Page (Run Stopped)
Example 2: BNQR Custom Status Page
- Figure 2 BNQR Custom Status Page (Run Stopped)
Example 3: BNQR Custom Status Page (Running)
Features of the Custom Status Page
The Custom Status Page provides status information specific to the bnmr or bnqr experiments. The option of reverting to the MIDAS standard status page is provided via the ToggleStatusPage button.
Command and Page Buttons
- Figure 3 Command and Page Buttons and Page Update Information
File:Bnmr top buttons.png
In the middle of the top line on the Custom Status page (Figure 1) are found the standard Menu buttons to stop and start runs or to display
different MIDAS pages (Figure 3). These standard buttons appear on most MIDAS pages (see MIDAS Status page for more information).
Below these buttons are buttons specific to the bnmr and bnqr experiment. Some are customscript buttons, that is, a script is run when the button is pressed. Others switch to a different custom page. More buttons appear when a run is in progress (Figure 4).
- Figure 4 BNQR Page Buttons for Type 1 Run in progress
The actions of these buttons are described in Table 1.
Button | Action |
---|---|
Autorun |
toggles Autoruns on or off |
rf_config | runs client rf_config to test the validity of the input parameters without actually starting a run |
ToggleStatusPage | 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 CustomStatus 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. |
RunParams | gives access to the Custom Parameter page. |
ShowWindows |
button displays the help information on displaying the frontend and other client consoles. |
RerefThresholds |
This button is present when a run is in progress and thresholds are enabled. Pressing this button calls the perlscript reref.pl which causes a rereference of the thresholds. |
ResetCampLog |
This button is present when a Type 1 run is in progress. Pressing this button causes the CAMP logging to be reset (see perlscript at_start_run.pl. |
ResetEpicsLog |
This button is present when a Type 1 run is in progress. Pressing this button causes the EPICS logging to be reset (see perlscript at_start_run.pl.
|
Page Update Information
The page update information is also visible in Figure 3. 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 Page update link at the left (Figure 3). The minimum time is 5s.
The relevant ODB data are read asynchronously using the MIDAS mjson rpc client library each time a full or partial reload is done. The times of the last full and partial reloads and ODB data last read are also shown in Figure 3.
Countdown
A countdown to the next full reload is also visible. If the page is set to update every 10 sec, the Countdown will count down from 6 to 1, when a full page reload will occur.
Progress
The Progress display is a numerical progress flag. This indicates the progress of reading the data from the ODB, and can be used for debugging. It works on a timer, updating every half a second. The Progress Code numbers/colours are explained in Table 2. The functions whose names begin with "mjsonrpc" refer to MIDAS mjson rpc functions. All other functions are found in the Javascript source code /home/bn[mq]r/online/custom/cs_functions.js. If the progress code is shown in black, the callback has been received or the function is finished. Between updates, the same black code number would fill the progress line. Instead, the colour is alternated between black and grey.
- Table 2 Progress Code
Progress Code |
Colour | spacer | Explanation |
---|---|---|---|
0 | 0 | spacer | Initialize routine |
1 | 1 | spacer | Waiting for a callback from mjsonrpc_db_get_values (called by functions read_data or enable_autorun or async_odbset) |
1 | spacer | Got the callback from mjsonrpc_db_get_values | |
2 | 2 | spacer | In function assign_data |
2 | spacer | Function assign_data done | |
3 | 3 | spacer | In the callback from write_last_message |
3 | spacer | Function write_last_message done | |
4 | 4 | spacer | In function load_partial |
4 | spacer | Function load_partial done | |
5 | 5 | spacer | In function load_all |
5 | spacer | Function load_all done | |
6 | 6 | spacer | In function update |
6 | spacer | Function update done | |
7 | 7 | spacer | Waiting for callback from mjsonrpc_db_paste (write to ODB) |
7 | spacer | Got callback from mjsonrpc_db_paste (write to ODB) |
Status Line
The Status lines on the Custom Status Page show the status of the run and some of the important settings (Figure 4).
- Figure 4 Status lines from the BNQR Custom Status Page
File:Bnqr status lines.png
The first line shows the selected Experimental (PPG) Mode. This changes when the mode is changed by pressing one of the
[#Select PPG and Run Mode|PPG Mode buttons]. The run number (Table 3) is shown in different colours for a test or real run (see BNMR: Run numbering). The [#Select PPG and Run Mode|Run Mode buttons] are used to switch between test and real runs.
Table 3: Run number | spacer | Table 4: Run State | spacer | Table 5: In Transition | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
spacer |
|
spacer |
|
The run state is shown in different colours depending on the run state (Table 4).
An orange box (Table 5) is present on the Status Line when the run is in transition. This normally occurs when the run is being started or stopped. If the run is stuck in transition, an alarm message may appear.
The time the run started is shown and, if running, the run duration, otherwise the time the run stopped.
The next line shows the Status, which may show an information message. Below this is a line showing the directory of the saved files.
Next are a number of boxes showing important settings (Table 6). Most are provided with a checkbox so the user can change the values from the custom status page.
- Table 6 Status values
ODB Key | Value TRUE | Value FALSE | Checkbox |
---|---|---|---|
Enable dual channel mode | Single channel mode | Dual channel mode | yes |
Alarm system active | Alarms Active | Alarms Active | yes |
Enable all hel checks | Helicity Check | Helicty Check | yes |
Enable helicity flipping | Helicity Flip | Helicity Flip | no |
Enable epics switch checks | Single/Dual Mode Switch Check |
Single/Dual Mode Switch Check |
yes |
- NOTE
- When real data is being taken (i.e. the run mode is set to real ), this line should
look similar to Figure 4, i.e. all checks are enabled.
Logging/Threshold/Helicity
- Figure V Line showing Logging Thresholds and Helicity
File:Bnqr logging line running.png
Last Midas Message
The last message from the MIDAS message system is displayed on this line. More messages can be seen on the Message Page.
Frontend Scalers
- Figure S BNQR Frontend scalers for a Type 1f run
File:Bnqr fescalers running.png
- Figure T BNMR Frontend scalers for a Type 2 run
Histogram Stats
- Figure R Histogram statistics for Type 1 run on BNQR
File:Bnqr histostats running.png
- Figure Q Histogram statistics for Type 2 run on BNMR
File:Bnmr histostats type2.png
Selection of PPG Mode and Run Mode
The line on the Custom Status Page containing the PPG Mode and Run Mode buttons is shown in Figure 5. These buttons are visible only when the run is stopped.
- Figure C PPG Mode and Run Mode switch buttons
File:Bnqr select mode line.png
. The user selects the desired PPG Mode by pressing one of the PPG Mode buttons. The PPG Mode buttons are customscript buttons which call the perlscript change_mode.pl. The perlscript may take a few seconds to run, so the buttons are hidden, and a message (Figure D) is displayed to prevent the impatient user from clicking more buttons. After a short time, the PPG Mode will change to the selected mode and the PPG Mode buttons will reappear.
- Figure D PPG Mode changing
File:Bnmr ppg mode changing.png
This line also contains the Run Mode buttons TEST and REAL. The buttons are only visible when the run is stopped.
The coloured (non-grey) button indicates whether the run mode is currently set to TEST or REAL.
The Run Mode buttons are customscript buttons which call the perlscripts real_run.pl or test_run.pl The perlscript may take a few seconds to run, so a message is displayed to prevent the impatient user from clicking more buttons. For example, if the run type is REAL as in Figure C, and the TEST button is pressed, a message will appear (Figure E), then the run type will change to TEST (Figure F).
Figure E Run Mode is changing | spacer | Figure F Run Mode has changed |
---|---|---|
File:Bnmr run mode changing1.png |
spacer | File:Bnmr run mode changing.png |
When a run is in progress, the PPG Mode and Run Mode buttons are replaced by
- Type 2 Runs
TOGGLE see Figure MISSING.
- Type 1 runs
- Toggle is not supported (Figure N).
- Figure N PPG and Run Mode selection line when Type 1 Run in Progress
File:Bnqr run mode running.png
- Autorunning
- this line is hidden
Review Run Params
- Figure U Review Run Parameters
File:Bnqr review run params.png
Alarm Banner
- Figure X Alarm banner showing helicity mismatch for BNMR
Autoruns
- Figure P Control buttons with autorun selected
- Figure O Autorun acquiring data
Programming Information
See Custom Pages.