96
M2i.60xx / M2i.60xx-exp Manual
External TTL trigger
Trigger modes and appendant registers
If you choose an external trigger mode the SPC_TRIGGEROUT register will be overwritten and the trigger connector will be used as an input
any ways.
As the trigger connector is used as an input, you can decide whether the input is 50 Ohm terminated or not. If you enable the termination,
please make sure, that your trigger source is capable to deliver the needed current. Please check carefully whether the source is able to fulfil
the trigger input specification given in the technical data section. If termination is disabled, the input is at high impedance.
The following short example shows how to set up the board for external positive edge TTL trigger. The trigger input is 50 Ohm terminated.
The different modes for external TTL trigger are to be detailed described in the next few passages.
Edge and level triggers
Positive (rising) edge TTL trigger
This mode is for detecting the rising edges of an external TTL sig-
nal. The board will trigger on the first rising edge that is detected
after starting the board. The next triggerevent will then be detect-
ed, if the actual recording/replay has finished and the board is
armed and waiting for a trigger again.
This mode can be combined with the pulse strech feature to detect
pulses that are shorter than the sample period.
Example on how to set up the board for positive TTL trigger:
HIGH level TTL trigger
This mode is for detecting the HIGH levels of an external TTL sig-
nal. The board will trigger on the first HIGH level that is detected
after starting the board. If this condition is fulfilled when the board
is started, a trigger event will be detected.
The next triggerevent will then be detected, if the actual record-
ing/replay has finished and the board is armed and waiting for
a trigger again.
Register
Value
Direction
Description
SPC_TRIG_OUTPUT
40100
read/write
Enables the trigger output if internal trigger is detected
X
If external trigger modes are used, this register will have no effect.
Register
Value
Direction
Description
SPC_TRIG_TERM
40110
read/write
A „1“ sets the 50 Ohm termination, if the trigger connector is used as an input for external trigger sig-
nals. A „0“ sets the high impedance termination
spcm_dwSetParam_i32 (hDrv,SPC_TRIG_EXT0_MODE, SPC_TM_POS ); // Setting up external TTL
// trigger to detect rising edges
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_TERM, 1 ); // Enables the 50 Ohm input termination
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_ORMASK, SPC_TMASK_EXT0); // and enable it within the OR mask
Register
Value
Direction
Description
SPC_TRIG_EXT0_MODE
40510
read/write
Sets the external trigger mode for the board.
SPC_TM_POS
1h
Sets the trigger mode for external TTL trigger to detect positive edges.
SPC_TM_POS |
SPC_TM_PULSESTRETCH
10000001h
Sets the trigger mode for external TTL trigger to stretch and detect HIGH pulses.
spcm_dwSetParam_i32 (hDrv, SPC_TRIG_EXT0_MODE, SPC_TM_POS);// Set up ext. TTL trigger to detect positive edges
Register
Value
Direction
Description
SPC_TRIG_EXT0_MODE
40510
read/write
Sets the external trigger mode for the board.
SPC_TM_HIGH
8h
Sets the trigger mode for external TTL trigger to detect HIGH levels.