Trigger modes and appendant registers
Multi Purpose I/O Lines
(c) Spectrum GmbH
85
Example of asynchronous write and read. We write a high pulse on output X1 and wait for a high level answer on input X0:
Special behaviour of trigger output
As the driver of the M3i series is the same as the driver for the M2i series and some old software may rely on register structure of the M2i
card series there is a special compatible trigger output register that will work according to the M2i series style. It is not recommended to use
this register unless you’re writing software for both card series:
The SPC_TRIG_OUTPUT register overrides the multi purpose I/O settings done by SPCM_X0_MODE and SPCM_X1_MODE and vice versa.
Please do not use both methods in one program.
Special direct trigger output modes
The trigger output of the cards can be used to start external equipment. To cope requirements for different applications, all M3i cards support
different output modes.
„Standard“ Trigger Output
In this mode the output signal indicates the internal trigger
event after the trigger delay, and therefore the begin of post
trigger area. The trigger output and the recording can be de-
layed by programming the user trigger delay.
For details on the trigger delay, please see the related chapter
in this manual.
„Direct“ Trigger Output
In this mode the output signal indicates that the external fed
in trigger event (external or channel trigger) will lead to a re-
cording after a fix delay and the optional programmed trig-
ger delay. The start of the recording can be delayed by
programming the user trigger delay.
This can be useful when the trigger output is to be used to start
the device under test, whilst avoiding the need to record un-
needed data in the pre-trigger area.
For details on the trigger delay, please see the related chapter
in this manual.
Using the direct trigger output modes requires the following driver and firmware version depending on your
card. Please update your system to the newest versions to run these modes mode.
• Driver version V2.06 (or newer)
• Base Ctrl firmware version V6 (or newer)
• M3i.21xx cards : Modul Ctrl firmware version V1 (or newer)
• M3i.32xx cards : Modul Ctrl firmware version V6 (or newer)
• M3i.41xx cards : Modul Ctrl firmware version V6 (or newer)
spcm_dwSetParam_i32 (hDrv, SPCM_X0_MODE, SPCM_XMODE_ASYNCIN); // X0 set to asynchronous input
spcm_dwSetParam_i32 (hDrv, SPCM_X1_MODE, SPCM_XMODE_ASYNCOUT); // X1 set to asynchronous output
spcm_dwSetParam_i32 (hDrv, SPCM_XX_ASYNCIO, 0); // programming a high pulse on output
spcm_dwSetParam_i32 (hDrv, SPCM_XX_ASYNCIO, 2);
spcm_dwSetParam_i32 (hDrv, SPCM_XX_ASYNCIO, 0);
do {
spcm_dwGetParam_i32 (hDrv, SPCM_XX_ASYNCIO, &lAsyncIn); // read input in a loop
} while ((lAsyncIn & 1) == 0) // until X0 is going to high level
Register
Value
Direction
Description
SPC_TRIG_OUTPUT
40100
read/write
M2i style trigger output programming. Write a „1“ to enable X1 trigger output (SPCM_X1_MODE =
SPCM_XMODE_TRIGOUT) and X0 run state (SPCM_X0_MODE = SPCM_XMODE_RUNSTATE).
Write a „0“ to disable both outputs (SPCM_X0_MODE = SPCM_X1_MODE =
SPCM_XMODE_DISABLE)