Access to the Sequencer Page
- If the Sequencer button is not present on the Status Page, it may have been suppressed.
- As of summer 2018, the sequencer runs as a separate process and must be started before running a sequence via the command msequencer.
Features of the Sequencer Page
- The Sequencer Page takes its parameters from the /Sequencer ODB tree.
- Sequencer scripts can be loaded and run from the Sequencer Page.
- A visual editor is provided to edit scripts.
- If Edit-on-Sequence Parameters are defined, these will be displayed when a sequence is started.
- A progress display is provided showing the progress of a running script, and the last few Midas messages are also shown (Figure 5).
How to input and run a Sequencer Script
- A Sequencer Script is written using commands recognized by the Sequencer. See Sequencer Commands for the list of sequencer commands.
- Press the
Status Page to display the Sequencer Page.
- The first time the button is pressed, the Sequencer Page will appear as in Figure 1, where no load file has been specified.
- Load or create a script file
- Start the sequencer script
Create a Sequencer Script
A new sequencer script can be created using the visual editor by typing in Sequencer Commands, or by pasting in an example file (e.g. #Sequencer test file or one of MSL Example file or MSL Example file ) as in Figure 2.
The new script is then saved by pressing. You will be asked for a file name.
- The directory path where the sequencer files will be saved is set by the ODB parameter /Sequencer/State/Path.
Load an existing Sequencer Script
An existing sequencer script file can be loaded using visual editor to create one.as in Figure 3. If there is no existing file, use the
- The directory path where the sequencer looks for saved files is set by the ODB parameter /Sequencer/State/Path.
Edit a Sequencer Script
|Figure 1: Initial Sequencer page||Figure 2: Display and/or Edit a Sequencer script||Figure 3: Select a Sequencer file|
|Figure 4: Start a Sequencer script|
Start a Sequencer Script
After a sequencer script has been loaded, start the script by pressing the button.
If there are errors in the script that prevents the script from running, the line(s) in error will be highlighted (Figure 5). In this case, edit the script and fix the errors.
Once all errors are corrected and the script runs, the user will be asked to input any required parameters as in Figure 4 (in this case the number of runs, see test_seq.msl). If Edit-on-Sequence Parameters are defined, these will be displayed in addition to any required parameters. Note that Edit-on-start Parameters will not be displayed (parameters that change between runs should be set by the sequencer script).
When the sequencer is running, a visual status is displayed in the Progress window, and the current position in the sequence file is also highlighted (Figure 6).
The sequencer can be paused by pressing
The progress window will indicate when the sequencer is finished (Figure 8).
|Figure 5: There is an error in the script||Figure 6: Sequencer is running|
|Figure 7: Sequencer is paused||Figure 8: Sequencer is finished|
Sequencer test file
The following is the contents of the sequence file used for testing test_seq.msl in the example above.
COMMENT "This is a MSL test file" RUNDESCRIPTION "Test run" PARAM runs LOOP $runs TRANSITION START WAIT ODBvalue "/Equipment/FIFO_acq/Statistics/Events sent" >= 25 TRANSITION STOP WAIT seconds 5 ENDLOOP