![]() | ![]() | ![]() | Setting up a scaler display | ![]() |
In order to monitor channel rates it is useful to setup a display of scaler channels. Note that there are many scaler display programs at the NSCL. This subsection describes the setup of the NSCL standard scaler display. This section applies to versions of the NSCL DAQ system after 7.4 (approximate release scheduled for January 2005). Prior to this version, the NSCL scaler display program is available as contributed software.
This is done by
The NSCL scaler display program allows you to organizes scalers into display groupings called pages. Each page has a short and a long title. Each line in a page can be single scaler channel a ratio of scaler channels or a blank line. The configuration file must:
Scaler definition files are Tcl scripts. The order which channel definitions, page definitions and page layout commands is not important so long as no scaler is placed in a page before the page or the scaler channel itself have been defined.
For the sake of this tutorial. We will assume that the first 8 channels of our scaler are free running, and the second are inhibited when the computer is busy, while the final 16 channels are not used. We will choose some rather arbitrary names for the channels (channel0, channel1 ... channel8, channel0.live, channel2.live ... channel8.live).
We will create two pages of scaler data. The first page will display ratios of channels 0 through 7 with the corresponding .live channel. The second page will display channels 0 through 8 with a blank line between channel 3 and 4.
First we can use some TCL scripting to make it simpler to define our channels:
# # Define the scaler channels set freechan 0 set livechan 8 set channels {channel0 channel1 channel2 channel3 channel4 channel5 channel6 channel7} foreach channel $channels { channel $channel $freechan channel $channel.live $livechan incr freechan incr livechan }
Scaler channels are given names using the channel command. The parameters of the channel command are the name of the channel and the index in the final scaler vector in which the scaler channel lives.
Pages are defined using the page command:
# Define the pages: page Ratios {Ratios between live and free running channels} page Rates {Rates of free running channels}
The parameters to the page command are a short name for the page, which labels the tab that selects the page for display and a long page title that appears at the top of the page to document the page contents.
Page layout is done using the display_single, display_ratio and blank commands:
# Layout page 1: foreach channel $channels { display_ratio Ratios $channel.live $channel } # Layout page 2: a bit more painful. display_single Rates channel0 display_single Rates channel1 display_single Rates channel2 display_single Rates channel3 blank Rates display_single Rates channel4 display_single Rates channel5 display_single Rates channel6 display_single Rates channel7
The first parameter of all of the layout commands is the short name of the page it applies to. All layout procedes from top to bottom. The display_ratio command accepts an additional pair of arguments that are the name of the numberator and denominator channels. The display_single command only requires a single scaler channel, and the blank command does not require an additional parameters.
To run the scaler display system, assuming the bin directory of the DAQ distribution is in your path:
ScalerDisplay config_file
Where config_file is the name of the configuration file to use to layou the display. The ScalerDisplay script takes care of killing off and starting sclclinet processes as needed.
![]() | ![]() | ![]() | Setting up a scaler display | ![]() |