High rate acquisition

From MCEWiki
Revision as of 06:15, 3 May 2008 by 66.180.187.2 (talk) (Timing parameters)

This document discusses the acquisition of multiplexed data at rates up to ~20 kHz. This is different from 50 MHz Raw-mode readout .

Timing parameters

The frequency of internal MCE frames, i.e. the multiplexing rate, is determined by the parameters "num_rows" and "row_len". The MCE switches rows at a rate of 50 MHz / row_len, so the effective sampling rate for a given row is

f_sam = 50 MHz / num_rows / row_len

The parameters "num_rows" and "row_len" are present on all MCE hardware cards. When writing these parameters, write to the "sys" card, e.g. "wb sys num_rows 8". When reading the value it is ok to just use the clock card value, i.e. "rb cc num_rows".

The parameter "data_rate" determines how often an internal data frame is sent to the readout PC and written to disk. This parameter is an integer indicating how many internal frames to process before outputting a frame to the PC. The output frame rate is thus

f_out = f_sam / data_rate

Readout parameters

Regardless of how many rows are being multiplexed, it is possible to configure a different set of rows to be output. The advantage of this is that by sending less data to the readout PC, the readout frame rate can be increased.

The parameters that determine the form of the output data are "num_rows_reported" and "readout_row_index". The "num_rows_reported" parameter, which lives on the clock card, determines the number of rows of data which should be returned to the readout PC. The readout_row_index parameter, which lives on each readout card, determines the row offset into the frame data at which readout should begin.

For example, to return frames containing only data from row 5, one could set "wb cc num_rows_reported 1" and "wb rca readout_row_index 5". In normal configuration, num_rows_reported should be equal to num_rows and readout_row_index should be equal to 0.

Through-put limitations

Bandwidth limitations are most easily expressed in terms of MB/s. The current limits on data throughput from the MCE are in the neighbourhood of 4 MB/s.

Readout rate limitations
num_rows row_len columns num_rows_reported frame_size (bytes) f_sam (kHz) Maximum f_out (kHz)
33 100 32 33 4400 15.15 1.4
...


Scripting support

The MAS script mce_fast_acq is provided to perform fast acquisition and then return the system to its previous state. The assumption of the script is that the user would like to do high rate readout on a system whose timing parameters have already been configured.

Script usage is (r179):

 mce_fast_acq  n_frames rc [ data_rate [ rows_reported ] ]

Example: report 2 rows of every 4th 15.15 kHz frame for 1 second.

 mce_fast_acq  3800 1 4 2

The data_rate and rows_reported parameters are optional; check your system for the default values. The readout_row_index parameter must be issued separately (this should be corrected).


Failure Recovery

Too-fast acquisition (not yet supported...) may result in the confusion of MAS/MCE. The typical symptom is that the fast acquisition does not exit in a timely manner. The best way to fix this is to open 'mce_cmd -i' (in a separate window) and issue the following commands:

mce_reset
dsp_reset
fakestop