GtDio6xTrigConfigGetRunTrigger

Applies To

GX5296, GX5961, GX5964, File

Purpose

Returns the run trigger settings.

Syntax

GtDio6xTrigConfigGetRunTrigger (nHandle, pnTriggerSource, pbInvertTriggerSource, pnLevelOrEdge, pnStatus)

Parameters

Name
Type
Comments

nHandle

SHORT

Session identifier:

     Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization.

     File handle is used when communicating with a file. The File handle session identifier is  returned by calling GtDio6xFileOpen.

pnTriggerSource

PSHORT

Returns the trigger source as follows:

0.    GTDIO6X_TRIGGER_SOURCE_NONE: No Signal is used as the pause resume trigger source.

1.  GTDI  O6X_TRIGGER_SOURCE_AUX_0: Auxiliary channel 0 used as the pause resume trigger source.

2.     GTDIO6X_TRIGGER_SOURCE_AUX_1: Auxiliary channel 1 used as the pause resume trigger source.

3.     GTDIO6X_TRIGGER_SOURCE_AUX_2: Auxiliary channel 2 used as the pause resume trigger source.

4.     GTDIO6X_TRIGGER_SOURCE_AUX_3: Auxiliary channel 3 used as the pause resume trigger source.

5.     GTDIO6X_TRIGGER_SOURCE_AUX_4: Auxiliary channel 4 used as the pause resume trigger source.

6.     GTDIO6X_TRIGGER_SOURCE_AUX_5: Auxiliary channel 5 used as the pause resume trigger source.

7.     GTDIO6X_TRIGGER_SOURCE_AUX_6: Auxiliary channel 6 used as the pause resume trigger source.

8.     GTDIO6X_TRIGGER_SOURCE_AUX_7: Auxiliary channel 7 used as the pause resume trigger source.

9.     GTDIO6X_TRIGGER_SOURCE_AUX_8: Auxiliary channel 8 used as the pause resume trigger source.

10.  GTDIO6X_TRIGGER_SOURCE_AUX_9: Auxiliary channel 9 used as the pause resume trigger source.

11.  GTDIO6X_TRIGGER_SOURCE_AUX_10: Auxiliary channel 10 used as the pause resume trigger source.

12.  GTDIO6X_TRIGGER_SOURCE_AUX_11: Auxiliary channel 11 used as the pause resume trigger source.

13.  GTDIO6X_TRIGGER_SOURCE_CH_COMPARE_0: Channel Test Signal 0 used as the pause resume trigger source.

14.  GTDIO6X_TRIGGER_SOURCE_LOCAL_BUS: Domain Resource used as the pause resume trigger source.

15.  GTDIO6X_TRIGGER_SOURCE_PXI_0: PXI Trigger 0 used as the pause resume trigger source.

16.  GTDIO6X_TRIGGER_SOURCE_PXI_1 PXI Trigger 1 used as the pause resume trigger source.

17.  GTDIO6X_TRIGGER_SOURCE_PXI_2 PXI Trigger 2 used as the pause resume trigger source.

18.  GTDIO6X_TRIGGER_SOURCE_PXI_3 PXI Trigger 3 used as the pause resume trigger source.

19.  GTDIO6X_TRIGGER_SOURCE_PXI_4 PXI Trigger 4 used as the pause resume trigger source.

20.  GTDIO6X_TRIGGER_SOURCE_PXI_5 PXI Trigger 5 used as the pause resume trigger source.

21.  GTDIO6X_TRIGGER_SOURCE_PXI_6 PXI Trigger 6 used as the pause resume trigger source.

22.  GTDIO6X_TRIGGER_SOURCE_PXI_7 PXI Trigger 7 used as the pause resume trigger source.

pbInvertTriggerSource

PBOOL

Returns the specified trigger line inverter state as follows:

0.    FALSE: Disable signal inverter, do not modify input signal before testing.

1.    TRUE: Enable signal inverter, invert input signal before testing.

pnLevelOrEdge

PSHORT

Returns the specified trigger line test mode as follows:

0.    GTDIO6X_TRIGGER_ON_LOW_LEVEL: Trigger when a low logic level is detected.

1.    GTDIO6X_TRIGGER_ON_HIGH_LEVEL: Trigger when a high logic level is detected.

2.    GTDIO6X_TRIGGER_ON_RISING_EDGE: Trigger when a rising edge is detected.

3.    GTDIO6X_TRIGGER_ON_FALLING_EDGE: Trigger when a falling edge is detected.

pnStatus

PSHORT

Returned status: 0 on success, negative value on failure.

Comments

This function configures the sequencer’s Run trigger. The trigger can be set up to use a source signal that will be tested for a certain condition, testing conditions including, testing for rising edge, falling edge, high level, and low level.

Note: prior calling this function the user need to call either GtDio6xSequencerArm API or GtDio6xSequencerArmIdleStep API in order to prime the sequencer.

Example

The following example set the Run Trigger source to Auxiliary channel 0, set the trigger inverter state to TRUE, set the trigger test mode to trigger when a rising edge is detected, and returns the settings:

 

SHORT nTriggerSource, nLevelOrEdge;

BOOL  bInvertTriggerSource;

SHORT nStatus;

 

GtDio6xTrigConfigSetRunTrigger (nHandle, GTDIO6X_PXI_BUS_TRIGGER_SOURCE_AUX_0, TRUE, GTDIO6X_TRIGGER_ON_RISING_EDGE, &nStatus);

GtDio6xTrigConfigGetRunTrigger (nHandle, &nTriggerSource, &bInvertTriggerSource, &nLevelOrEdge, &nStatus);

 

See Also

GtDio6xTrigConfigSetHaltTrigger, GtDio6xTrigConfigSetJumpTrigger, GtDio6xTrigConfigSetLocalBusTriggerSource, GtDio6xTrigConfigSetPauseResumeTrigger, GtDio6xTrigConfigSetPxiTrigger, GtDio6xTrigConfigSetRunTrigger, GtDio6xTrigConfigSetStopTrigger, GtDio6xGetErrorString