GxDmmSetExternalTriggers

Purpose

Sets the external trigger configuration

Syntax

GxDmmSetExternalTriggers (nHandle, dwTriggerDirections, dwTriggerEdges, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle for a GX2065 board.
pdwTriggerDirections
DWORD
Sets the direction of all external triggers
pdwTriggerEdges
DWORD
Sets the trigger edge sensitivity for all external triggers
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The dwTriggerDirections is a 20 bit long field that determines the directionality of each external trigger. Each bit in the field represents the enable bit for a particular trigger and direction. A ‘1’ indicates enabled and a ‘0’ indicates disabled. By default all bits are set to ‘0’. The fields are described in the following table:

Bit Number
Description
0
PXI Line 0 Input Enable
1
PXI Line 1 Input Enable
2
PXI Line 2 Input Enable
3
PXI Line 3 Input Enable
4
PXI Line 4 Input Enable
5
PXI Line 5 Input Enable
6
PXI Line 6 Input Enable
7
PXI Line 7 Input Enable
8
PXI Line 0 Output Enable
9
PXI Line 1 Output Enable
10
PXI Line 2 Output Enable
11
PXI Line 3 Output Enable
12
PXI Line 4 Output Enable
13
PXI Line 5 Output Enable
14
PXI Line 6 Output Enable
15
PXI Line 7 Output Enable
16
STAR PXI Input Enable
17
STAR PXI Output Enable
18

DIN Connector Pin 1 -Trigger Input Enable

19

DIN Connector Pin 3 -Trigger Output Enable

dwTriggerDirections Bit Field

 

The dwTriggerEdges is an 11 bit long field that determines the edge sensitivity of each external trigger. Each bit in the field represents the edge selected to use for triggering. A ‘1’ indicates rising edge and a ‘0’ indicates falling edge. By default all bits are set to ‘0’. The fields are described in the following table:

Bit Number
Description
0
PXI Line 0 Edge Selection
1
PXI Line 1 Edge Selection
2
PXI Line 2 Edge Selection
3
PXI Line 3 Edge Selection
4
PXI Line 4 Edge Selection
5
PXI Line 5 Edge Selection
6
PXI Line 6 Edge Selection
7
PXI Line 7 Edge Selection
8
STAR PXI Edge Selection
9
DIN Connector Pin 1 - Trigger In Edge Selection - For Future use

dwTriggerEdges Bit Field

 

Example

The following example sets the trigger direction of PXI line 0 and PXI Line 1 and all edge sensitivities to Rising Edge:

 

SHORT nHandle, nStatus;

GxDmmSetExternalTriggers (nHandle, 0x3, 0x3FF, &nStatus);

 

See Also

GxDmmGetExternalTriggers, GxDmmSetTriggerMode, GxDmmGetTriggerMode, GxDmmReadArray, GxDmmGetReadArrayStatus,  GxDmmAbortReading, GxDmmSetRange, GxDmmGetRange, GxDmmSetFunction, GxDmmGetFunction, GxDmmGetErrorString