
Trigger modes and appendant registers
Force- and Enable trigger
(c) Spectrum Instrumentation GmbH
101
Example for setting up the software trigger:
Force- and Enable trigger
In addition to the software trigger (free run) it is also possible to force a trigger event by software while the board is waiting for a real physical
trigger event. The forcetrigger command will only have any effect, when the board is waiting for a trigger event. The command for forcing
a trigger event is shown in the table below.
Issuing the forcetrigger command will every time only generate one trigger event. If for example using Multiple Recording that will result in
only one segment being acquired by forcetrigger. After execution of the forcetrigger command the trigger engine will fall back to the trigger
mode that was originally programmed and will again wait for a trigger event.
The example shows, how to use the forcetrigger command:
It is also possible to enable (arm) or disable (disarm) the card’s whole triggerengine by software. By default the trigger engine is disabled.
The example shows, how to arm and disarm the card’s trigger engine properly:
Trigger delay
All of the Spectrum M2p series cards allow the user to program an
additional trigger delay. As shown in the trigger overview section,
this delay is the last element in the trigger chain. Therefore the user
does not have to care for the sources when programming the trigger
delay.
As shown in the overview the trigger delay is located after the star-
hub connection meaning that every M2p card being synchronized
can still have its own trigger delay programmed. The Star-Hub will
combine the original trigger events before the result is being delayed.
The delay is programmed in samples. The resulting time delay will
therefore be [Programmed Delay] / [Sampling Rate].
The following table shows the related register and the possible val
-
ues. A value of 0 disables the trigger delay.
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_ORMASK, SPC_TMASK_SOFTWARE); // Internal software trigger mode is used
Table 59: Spectrum API: command register and force trigger command
Register
Value
Direction
Description
SPC_M2CMD
100
write
Command register of the M2i/M3i/M4i/M4x/M2p series cards.
M2CMD_CARD_FORCETRIGGER
10h
Forces a trigger event if the hardware is still waiting for a trigger event.
spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_CARD_FORCETRIGGER); // Force trigger is used.
Table 60: Spectrum API: command register and trigger enable/disable command
Register
Value
Direction
Description
SPC_M2CMD
100
write
Command register of the M2i/M3i/M4i/M4x/M2p series cards.
M2CMD_CARD_ENABLETRIGGER
8h
Enables the trigger engine. Any trigger event will now be recognized.
M2CMD_CARD_DISABLETRIGGER
20h
Disables the trigger engine. No trigger events will be recognized, except force trigger.
spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_CARD_ENABLETRIGGER); // Trigger engine is armed.
...
spcm_dwSetParam_i32 (hDrv, SPC_M2CMD, M2CMD_CARD_DISABLETRIGGER); // Trigger engine is disarmed.
Table 61: Spectrum API: delay trigger software registers and programmable settings
Register
Value
Direction
Description
SPC_TRIG_AVAILDELAY
40800
read
Contains the maximum available delay as a decimal integer value.
SPC_TRIG_DELAY
40810
read/write
Defines the delay for the detected trigger events.
0
No additional delay will be added. The resulting internal delay is mentioned in the technical data section.
1…[4G -1] in steps of 1 (16 bit cards)
Defines the additional trigger delay in number of sample clocks. The trigger delay can be programmed up to
(4 GSamples - 1) = 4294967295. The stepsize is 1 samples for 16 bit cards.
Image 60: M2p trigger engine overview and delay trigger
Содержание M2p.59 Series
Страница 190: ......