|
| Home | Instruments | Science | Experiments | SiteMap |
Runs and sequences
Table of contents
- Runs
- Sequences
- Defining runs and sequences
- Starting and stopping runs and sequences
- sequence.prm and sequence.log files
Within the DCS control program you can define "runs" and "sequences". A sequence is a set of commands to be executed sequentially when the sequence is started. Arguably the most important of these commands is the command that performs a run.
Runs A run is a measurement using the data acquisition system. In its simplest form it works in the following way:
- The data memory is cleared.
- Data acquisition is initiated.
- At a later time data acquisition is stopped.
- The data are written to a file.
A run normally consists of several "cycles". (The description above applies to a run with a single cycle.) If there is more than one cycle the data are written to the file at the end of the first cycle. Data acquisition then resumes (without clearing the memory), and at the end of the next cycle the file is overwritten with the new data. This process continues until the end of the final cycle.
Having decided the length of a run it is necessary to decide how many cycles the run should comprise. The following remarks may help.
![]()
If a temperature controller is connected to the control computer and the "Rec Temp" box is checked , sample and control temperatures are recorded in the raw data file at the end of each cycle ![]()
If the "Check Stats" box is checked two tests are performed at the end of each cycle. The cycle is rejected if (a) the white beam monitor count rate is less than a specified value (e.g. because the reactor shut down) or (b) the fractional time that the choppers were out of phase exceeds a specified value. Note that the cycle is lost rather than remeasured so the run will still end at the expected time. ![]()
A small amount of time is required to write the data to disk at the end of each cycle. ![]()
Typical cycle times are from 5 to 30 minutes (300 to 1800 s). You may wish to discuss run times with your local contact.
Sequences As previously stated, a sequence is a set of commands.
List of commands that can be defined in a sequence
There are presently five types of command available within dcsgui:
- run buffer n
- To perform run number n
- chopctrl 7.5 20000 1 1 1 500
- To change the chopper parameters
- temperature set temperature set point value (K)
- To change the temperature controller set point.
- wait minutes number of minutes
- To wait a specified period of time.
- shutter colse
The command "shutter close" to close the local shutter. There are another set of commands that are not available using dcsgui but they can be typed in the sequence.prm file.
- wait seconds number of seconds
- A command such as "wait seconds 20" to wait a specified period of time.
- collimator up
- collimator down
- collimator oscillate start
- collimator oscillate stop
- collimator home
- The above commands control the motors associated with the radial collimator
- lookup file detectorfile [monitorfile]
- A command such as "lookup file detectorfile [monitorfile]"
to define the time lookup table or tables for data acquisition other than the one calculated when the incident wavelength is changed.
- motor move axis destination
- A command such as "motor move axis destination" to move the specified motor to the indicated target position.
Defining runs and sequences It is generally good practice to define your run buffer(s) first and then define your sequence.
To define a run buffer click the dcsgui Run button and select Setup.
![]()
In the upper part of the Run Setup window there is a list of 12 "run buffers" numbered from 0 to 11. To edit a run buffer double click on the buffer. The current values of the run buffer parame ters will appear in the lower part of the window:
![]()
- Enter a comment.
- Enter your name (or initials) and (optionally) those of your collaborators.
- Enter the number of cycles.
- Enter the cycle time (in seconds).
- Do not worry about T0 or Delta-T; they are not used.
- Check the "Rec Temp" box if a temperature controller is connected to the control computer and you wish to record sample and control temperatures at the end of each cycle.
- Leave the "Check Temp" box unchecked; it is not used.
- Check the "Check Stats" box if you wish to reject cycles that do not satisfy the checks described above. This box should NOT be checked if you are performing a background measurement with the local shutter closed.
- Once you are satisfied click the "Accept" button. To confirm that the parameters have been accepted examine the appropriate entry in the upper part of the window.
- Once you are satisfied click the "Accept" button. To confirm that the parameters have been accepted examine the appropriate entry in the upper part of the window.
- To close the Run Setup window click "Dismiss".
To define (or to edit) the sequence click Sequence and select Setup:
![]()
![]()
- The current sequence is displayed in the left part of the window. To remove all commands from the sequence click the Clear button.
- To delete a single entry in the sequence highlight the entry and then click the Delete button.
- To enter a command, having defined it as discussed below, (if necessary) move the cursor to the appropriate position in the left part of the window and then click the appropriate Insert button on the right side of the window.
- To define a "Run Buffer" command, edit the number of the buffer (to the left of the "Insert" button).
- To define the wavelength command parameters, click the "Edit" button and make the necessary changes as discussed above. Notice that the "Accept" button is disabled because its purpose is to change the current settings immediately rather than some time in the future.
- To define the "Temperature" and "Wait" commands, edit the appropriate parameter.
- At this stage the sequence "known" to the control computer has not been modified. To make it known click the "Apply" button.
- To close the Sequence Setup window click "Dismiss".
The current sequence is contained in an ascii file called sequence.prm in the dcs home directory /home/dcs. This file may be edited by the user but be sure to respect the necessary syntax.
The dryrun command may be used to check the syntax of the sequence file.
Starting and stopping runs and sequences To start a run, click Run, select Start and select the buffer that you wish to run.
To start a sequence click Sequence and select Start.
If you are doing a run and you want to stop it, click Run and select Stop. Choose how you want to stop the run.
If you are doing a sequence and you want to stop it, click Sequence and select Stop. Choose how you want to stop the run.
If you don't know whether you are running a run or a sequence click Status and select General.
To avoid this confusion it is recommended that you always perform sequences: a sequence can consist of a single run.
How to stop a run
There are three ways to stop a run or a sequence. In the case of a sequence we assume that the system is part way through a run cycle.
- Selecting "Now (Lose current cycle)" means that data acquisition will be stopped immediately and data accumulated during the current cycle will be discarded.
- Selecting "Now (Keep current cycle)" means that data acquisition will be stopped immediately and data from the current cycle will be retained.
- Selecting "Later (Finish current cycle)" means that data acquisition will continue until the end of the current cycle so that data from the completed cycle will be retained.
sequence.prm and sequence.log files
As previously stated, the current sequence is contained in an ascii file in the home directory called sequence.prm. As commands are read from this file they are removed from the file so that at any given time after the sequence has started the next command to be performed is the first command in the file. A file called sequence.log, in the home directory, lists the sequence commands that have been executed to date.
Go to NCNR home page | Go to DCS home page
Last modified 24-March-2003 by website owner: NCNR (attn: John Copley)