GtDio6xChannelGetParameters

Applies To

GX5296, GX5961, GX5964, File

Purpose

Returns the channel’s parameter settings, including channel phase, window, data format, and capture mode.

Syntax

GtDio6xChannelGetParameters (nHandle, nChannel, pnPhase, pnWindow, pnFormat, pnCaptureMode, 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.

nChannel
SHORT
Used to specify the channel to Get. This parameter is 0-based and refers to any channel in the Domain.
This function does not support auxiliary channels.
pnPhase
PSHORT
Used to return a channel’s phase selection as follows:

0. GTDIO6X_PHASE_STEP_TSET_0: Phase applied based on the step's TSet Phase Assert 0 and Phase Return 0.

1. GTDIO6X_PHASE_STEP_TSET_1: Phase applied based on the step's TSet Phase Assert 1 and Phase Return 1.

2. GTDIO6X_PHASE_STEP_TSET_2: Phase applied based on the step's TSet Phase Assert 2 and Phase Return 2.

3. GTDIO6X_PHASE_STEP_TSET_3: Phase applied based on the step's TSet Phase Assert 3 and Phase Return 3.

4. GTDIO6X_PHASE_STEP_TSET_4: Phase applied based on the step's TSet Phase Assert 4 and Phase Return 4 (GX5296 Firmware version > 0xAA03).

5. GTDIO6X_PHASE_STEP_TSET_5: Phase applied based on the step's TSet Phase Assert 5 and Phase Return 5 (GX5296 Firmware version > 0xAA03).

6. GTDIO6X_PHASE_STEP_TSET_6: Phase applied based on the step's TSet Phase Assert 6 and Phase Return 6 (GX5296 Firmware version > 0xAA03).

7. GTDIO6X_PHASE_STEP_TSET_7: Phase applied based on the step's TSet Phase Assert 7 and Phase Return 7 (GX5296 Firmware version > 0xAA03).

pnWindow
PSHORT
Used to return a channel’s window selection as follows:

0. GTDIO6X_WINDOW_STEP_TSET_0: Window applied based on the step's TSet Window Open 0 and Window Close 0.

1. GTDIO6X_WINDOW_STEP_TSET_1: Window applied based on the step's TSet Window Open 1 and Window Close 1.

2. GTDIO6X_WINDOW_STEP_TSET_2: Window applied based on the step's TSet Window Open 2 and Window Close 2.

3. GTDIO6X_WINDOW_STEP_TSET_3: Window applied based on the step's TSet Window Open 3 and Window Close 3.

pnFormat
PSHORT
Used to return a channel’s format selection as follows:

0.    GTDIO6X_FORMAT_NONE: No Return Data Format.

1.    GTDIO6X_FORMAT_RETURN_TO_HI_Z: Return to Off (HiZ) Data Format.

2.    GTDIO6X_FORMAT_RETURN_TO_ZERO: Return to Zero (Low) Data Format.

3.    GTDIO6X_FORMAT_RETURN_TO_ONE: Return to One (High) Data Format.

4.    GTDIO6X_FORMAT_RETURN_TO_COMPLIMENT: Return to Complement Data Format.

5.    GTDIO6X_FORMAT_COMPLIMENT_SURROUND: Surround Complement Data Format.

6.    GTDIO6X_FORMAT_FORCE_ZERO: Force Zero (Low) Static Output.

7.    GTDIO6X_FORMAT_FORCE_ONE: Force One (High) Static Output.

8.    GTDIO6X_FORMAT_FORCE_HI_Z: Force Off (HiZ).

9.  GTDIO6X_FORMAT_FORCE_PHASE_INVERTED: Force Inverse Phase Output. During the Phase Assert, the Output driver goes from high to low level. During the Phase Return, the Output driver goes from low to high level.

10.GTDIO6X_FORMAT_FORCE_PHASE: Force Phase Output. During the Phase Assert, the Output driver goes from low to high level. During the Phase Return, the Output driver goes from high to low level.

pnCaptureMode
PSHORT
Used to return a channel’s capture mode as follows:

0.     GTDIO6X_CAPTURE_DISABLE: Do not capture on the channel, no Real Time Compare errors can be generated from the channel.

1.     GTDIO6X_CAPTURE_WINDOW_OPEN_EDGE: Capture on the Window Open Edge Only (Edge Capture).

2.     GTDIO6X_CAPTURE_WINDOW_CLOSE_EDGE: Capture on the Window Close Edge Only (Edge Capture).

3.     GTDIO6X_CAPTURE_WINDOW: Capture throughout entire Window Range (Window Capture).

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

Example

The following example sets channel 0 and 2 parameters, and return channel 0 parameters:

 

SHORT nPhase, nFormat, nWindow, nCaptureMode;

SHORT nStatus;

LONG alChannelList[2];

 

// Fill the channels array

alChannelList[0]=0;

alChannelList[1]=2;

 

GtDio6xChannelSetParameters(nHandle, 2, alChannelList, GTDIO6X_PHASE_STEP_TSET_1, GTDIO6X_WINDOW_STEP_TSET_2, GTDIO6X_FORMAT_RETURN_TO_HI_Z, GTDIO6X_CAPTURE_WINDOW_OPEN_EDGE, &nStatus);

GtDio6xChannelGetParameters(nHandle, 4, &nPhase, &nWindow, &nFormat, &nCaptureMode, &nStatus);

 

See Also

GtDio6xChannelSetParameters, GtDio6xGetErrorString