92
M2i.60xx / M2i.60xx-exp Manual
Trigger masks
Trigger modes and appendant registers
The table below shows the relating register for the general OR mask and the possible constants that can be written to it.
The following example shows, how to setup the OR mask, for an external TTL trigger. As an example a simple edge detection has been
chosen. The explanation and a detailed description of the different trigger modes for the external TTL trigger inputs will be shown in the ded-
icated passage within this chapter.
The table below is showing the registers for the channel OR mask and the possible constants that can be written to it.
Please note that channel trigger sources are only available on data acquisition cards and not on pure generator
cards. If you have purchased an arbitary waveform generator or a pattern generator please just ignore this part.
The following example shows, how to setup the OR mask, for an external TTL trigger. As an example a simple edge detection has been
chosen. The explanation and a detailed description of the different trigger modes for the external TTL trigger inputs will be shown in the ded-
icated passage within this chapter.
Register
Value
Direction
Description
SPC_TRIG_AVAILORMASK
40400
read
Bitmask, in which all bits of the below mentioned sources for the OR mask are set, if available.
SPC_TRIG_ORMASK
40410
read/write
Defines the events included within the trigger OR mask of the card.
SPC_TMASK_NONE
0
No trigger source selected
SPC_TMASK_SOFTWARE
1h
Enables the software trigger for the OR mask. The card will trigger immediately after start.
SPC_TMASK_EXT0
2h
Enables the external trigger0 for the OR mask. The card will trigger when the programmed condition for this input is
valid.
SPC_TMASK_EXT1
4h
Enables the external trigger1 for the OR mask. This input is only available on digital cards. The card will trigger when
the programmed condition for this input is valid.
SPC_TMASK_XIO0
100h
Enables the extra TTL trigger 0 for the OR mask. On plain cards this input is only available if the option BaseXIO is
installed. As part of the digitizerNETBOX this input is available as connector Trigger B.
SPC_TMASK_XIO1
200h
Enables the extra TTL trigger 1 for the OR mask. This input is only available if the option BaseXIO is installed.
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_ORMASK, SPC_TMASK_EXT0); // Enable external trigger within the OR mask
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_EXT0_MODE, SPC_TM_POS); // Setting up external TTL trigger for rising edges
Register
Value
Direction
Description
SPC_TRIG_CH_AVAILORMASK0
40450
read
Bitmask, in which all bits of the below mentioned sources/channels (0…31) for the channel OR mask
are set, if available.
SPC_TRIG_CH_AVAILORMASK1
40451
read
Bitmask, in which all bits of the below mentioned sources/ channels (32…63) for the channel OR
mask are set, if available.
SPC_TRIG_CH_ORMASK0
40460
read/write
Includes the analog or digital channels (0…31) within the channel trigger OR mask of the card.
SPC_TRIG_CH_ORMASK1
40461
read/write
Includes the analog or digital channels (32…63) within the channel trigger OR mask of the card.
SPC_TMASK0_CH0
1h
Enables channel0 (channel32) for recognition within the channel OR mask.
SPC_TMASK0_CH1
2h
Enables channel1 (channel33) for recognition within the channel OR mask.
SPC_TMASK0_CH2
4h
Enables channel2 (channel34) for recognition within the channel OR mask.
SPC_TMASK0_CH3
8h
Enables channel3 (channel35) for recognition within the channel OR mask.
…
…
…
SPC_TMASK0_CH28
10000000h
Enables channel28 (channel60) for recognition within the channel OR mask.
SPC_TMASK0_CH29
20000000h
Enables channel29 (channel61 for recognition within the channel OR mask.
SPC_TMASK0_CH30
40000000h
Enables channel30 (channel62) for recognition within the channel OR mask.
SPC_TMASK0_CH31
80000000h
Enables channel31 (channel63) for recognition within the channel OR mask.
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_CH_ORMASK0, SPC_TMASK_CH0); // Enable channel0 trigger within the OR mask
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_EXT0_MODE, SPC_TM_POS); // Setting up external trigger for rising edges