GtDio6xChannelSetParameters

Applies To

GX5296, GX5961, GX5964, File

Purpose

Programs the channel parameters, phase, window, data format, and capture mode, for the specified channels.

Syntax

GtDio6xChannelSetParameters (nHandle, lChannelListArraySize, palChannelListArray, nPhase, nWindow, nFormat, nCapMode, 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.

lChannelListArraySize
LONG
Used to specify the number of channels to set. This parameter should not be greater than the size of palChannelListArray. If GTDIO6X_ALL_DOMAIN is passed in, then the palChannelListArray parameter can be set to NULL and the settings will be applied to all channels in the Domain.
palChannnelListArray
PLONG
Array containing channels numbers that will be set by this function, channels numbers are 0-based and refers to any channel in the Domain.
This function does not support auxiliary channels.
nPhase
SHORT
Used to set 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).     

nWindow
SHORT
Used to set 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.

nFormat
SHORT
Used to set 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.

nCaptureMode
SHORT
Used to set 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

GtDio6xChannelGetParameters, GtDio6xGetErrorString