GtDio6xChannelGetSenseLoadState

Applies To

GX5296, GX5961, GX5964, File

Purpose

Returns the channel sense load state.

Syntax

GtDio6xChannelGetSenseLoadState (nHandle, nChannel, pnLoadState, 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. Auxiliary channel numbers begin with 1000.
GX5296: Each GX5296 board has 4 auxiliary channels that support all the Pin Electronics API functions.
GX5961: Each GX5961 board has 4 fully programmable auxiliary channels, and 8 TTL I/O channels. First 4 auxiliary channels may use all the Pin Electronics API.
GX5964: Does not have Auxiliary channels.
pnLoadState
PSHORT
Used to return the channel sense load state:

0.    GTDIO6X_DISABLED: Disable channel load state.

1.    GTDIO6X_ENABLED: Enable channel load state.

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

Comments

The function enables all the loads to be applied to the specified input channels (constant source and the resistive load). When the load is enabled there is a ~40Ohm resistor in between the input and the loads.

Each channel has an independent load with the following capabilities:

     Channels’ Input constant source and sink currents up to 24 mA – GtDio6xSetSenseLoadCurrent function.

     Maintain high impedance over a wide voltage.

     Separate high and low commutating voltages – GtDio6xSetSenseLoadCommutatingVoltage function.

     Channels’ Input Resistive load options - GtDio6xSetSenseLoadResistance function.

     With independent high and low commutating voltages, the source and sink currents each have their own threshold voltage. If the voltage on the input, when the load is activated, is between the two commutating voltages, the load will remain in a high impedance state.

Example

The following example sets channels 0 and 2 load state to ON, and returns channel 0 load state:

 

SHORT nLoadState;

SHORT nStatus;

LONG alChannelList[2];

 

// Fill channel array

alChannelList[0] = 0;

alChannelList[1] = 2;

GtDio6xSetChannelLoadState(nHandle, 2, alChannelList, GTDIO6X_ENABLED, &nStatus);

 

GtDio6xGetChannelLoadState(nHandle, 5, &nLoadState, &nStatus);

 

See Also

GtDio6xChannelSetSenseLevels, GtDio6xChannelSetSenseLoadCommutatingVoltage, GtDio6xChannelSetSenseLoadCurrent, GtDio6xChannelSetSenseLoadResistance, GtDio6xChannelSetSenseLoadState, GtDio6xGetErrorString