beautypg.com

Spectrum Brands MC.31XX User Manual

Page 94

background image

94

MC.31xx Manual

Setup synchronization for use with FIFO mode and equally clokked boards

Synchronization (Option)

(10) Start all of the trigger master boards
After having armed the synchronized boards, you must start all of the boards, that are defined as trigger masters.

For details on how to start the board in the different modes in standard mode (non FIFO) please refer to the according chapter earlier in this
manual.

If you use the synchronization OR with the starhub option it is important to start the board carrying the
starhub piggy-back module as last. Otherwise the trigger masters that are started first might detect trigger
events while other trigger masters haven’t even been started. Be sure that the pretrigger area of all other

trigger masters is filled at the moment when the pretrigger area of the star-hub board has been filled.

To find out what board is carrying the starhub piggy-back module you make use of the board’s feature registers as described in the chapter
about programming the board.

Example of starting the trigger master board

(11) Wait for the end of the measurement
After having started the last board, you will have to wait until the measurement is done. Depending if you use the board in standard (non
FIFO) mode interrupt driven or not, you can poll for the board’s status. Please refer to the relating chapter in this manual. It is necessary to
wait until each board returns the status SPC_READY before proceeding.

Example for polling for three synchronzed boards

(12) Read data from the on-board memory (acquisition boards only)
If one or more of the synchronized boards are used for recording data (transient recorder boards or digital I/O boards with one or more
channels set to input direction) you have to read out the data from the board’s on-board memory now. Please refer to the related chapter for
the standard (non FIFO) mode in this manual. If none of your synchronized boards is used for recording purposes you can ignore this step.

Example for data reading

(13) Restarting the board for another synchronized run
If you want to restart the synchronized boards with the same settings as before it is sufficient to repeat only the steps starting with (8). This
assumes that on generation boards the output data is not changed as well.

If you want to change the output data of generation boards you’ll have to restart the setup procedure starting with step (2).

If you even want to change any of the boards parameters you’ll have to restart the setup procedure from the first step on.

Setup synchronization for use with FIFO mode and equally clokked boards

Most of the steps are similar to the setup routine for standard synchronization mentioned before. In this passage only the differences between
the two modes are shown. Please have a look at the passage before to see the complete setup procedure. The following steps differ from
standard mode to FIFO mode. All steps that are not mentioned here are similar as described before.

(2) Allocate the FIFO software buffers
If you use the board in FIFO mode additional memory in the PC RAM is needed for software FIFO buffers. For details please refer to the
according chapter for the FIFO mode.

Register

Value

Direction

Description

SPC_COMMAND

0

r/w

Command register of the board

SPC_START

10

Starts the board with the current register settings.

SPC_STARTANDWAIT

11

Starts the board with the current register settings in the interrupt driven mode.

SpcSetParam (hDrv[2], SPC_COMMAND, SPC_START);

for (i = 0; i < 3; i++) // For all synchronized boards
do // The status is read out
{
SpcGetParam (hDrv[i], SPC_STATUS, &lStatus); // by polling for SPC_READY
}
while (lStatus != SPC_READY);
}
printf (“All boards have stopped“);

SpcGetData (hDrv[0], 0, 0, 1024, pData[0]);
SpcGetData (hDrv[1], 0, 0, 1024, pData[1]);
SpcGetData (hDrv[2], 0, 0, 1024, pData[2]);