Mode Multiple Replay
Trigger Modes
(c) Spectrum GmbH
99
Mode Multiple Replay
The Multiple Replay mode allows the generation of data blocks with multi-
ple trigger events without restarting the hardware.
The on-board memory will be divided into several segments of the same
size. On each trigger event one segment of data will be replayed.
As this mode is totally controlled in hardware there is a very small re-arm
time from end of one segment until the trigger detection is enabled again.
You’ll find that re-arm time in the technical data section of this manual.
The following table shows the register for defining the structure of the segments to be replayed with each trigger event.
Trigger Modes
When using Multiple Recording all of the card’s trigger modes can be used except the software trigger. For detailed information on the avail-
able trigger modes, please take a look at the relating chapter earlier in this manual.
Programming examples
The following example shows how to set up the card for Multiple Replay in standard mode.
The following example shows how to set up the card for Multiple Replay in FIFO mode.
Replay modes
Standard Mode
With every detected trigger event one data block is replayed. The length of one multiple replay segment is set by the value of the segment
size register SPC_SEGMENTSIZE. The total amount of samples to be replayed is defined by the memsize register.
Memsize must be set to a a multiple of the segment size. The table below shows the register for enabling Multiple Recording. For detailed
information on how to setup and start the standard replay mode please refer to the according chapter earlier in this manual.
The total number of samples to be replayed from the on-board memory in standard mode is defined by the SPC_MEMSIZE register. When
using the SPC_LOOPS parameter one can further program whether all segments should be replayed once or continuously or whether a ded-
icated number of segments should be replayed
Register
Value
Direction
Description
SPC_SEGMENTSIZE
10010
read/write
Size of one Multiple Replay segment: the total number of samples to be replayed after detection of
one trigger event including the time recorded before the trigger (pre trigger).
spcm_dwSetParam_i32 (hDrv, SPC_CARDMODE, SPC_REP_STD_MULTI); // Enables Standard Multiple Replay
spcm_dwSetParam_i32 (hDrv, SPC_SEGMENTSIZE, 1024); // Set the segment size to 1024 samples
spcm_dwSetParam_i32 (hDrv, SPC_MEMSIZE, 4096); // Set the total memsize for recording to 4096 samples
// so that actually four segments will be replayed
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_EXT0_MODE, SPC_TM_POS); // Set triggermode to ext. TTL mode (rising edge)
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_ORMASK, SPC_TMASK_EXT0); // and enable it within the trigger OR-mask
spcm_dwSetParam_i32 (hDrv, SPC_CARDMODE, SPC_REP_FIFO_MULTI); // Enables FIFO Multiple Replay
spcm_dwSetParam_i32 (hDrv, SPC_SEGMENTSIZE, 2048); // Set the segment size to 2048 samples
pcm_dwSetParam_i32 (hDrv, SPC_LOOPS 256); // 256 segments will be replayed
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_EXT0_MODE, SPC_TM_NEG); // Set triggermode to ext. TTL mode (falling edge)
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_ORMASK, SPC_TMASK_EXT0); // and enable it within the trigger OR-mask
Register
Value
Direction
Description
SPC_CARDMODE
9500
read/write
Defines the used operating mode
SPC_REP_STD_MULTI
200h
Enables Multiple Replay for standard replay.
Register
Value
Direction
Description
SPC_MEMSIZE
10000
read/write
Defines the total number of samples to be replayed.
SPC_LOOPS
10020
read/write
When writing a 1 the complete memory is replayed once, when writing a zero the replay continues
from the beginning forever. When writing a number >1 this number of segments is replayed until the
card stops automatically.