GtDio6xChannelGetSourceCurrentLimits

Applies To

GX5961, GX5964, File

Purpose

Returns the channel’s over current limits.

Syntax

GtDio6xChannelGetSourceCurrentLimits (nHandle, nChannel, pdLimitHigh, pdLimitLow, pbAutoDisable, 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.
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.
pdLimitHigh
PDOUBLE
Used to return the over current limit in terms of Amps.
pdLimitLow
PDOUBLE
Used to return the undercurrent limit in terms of Amps.
pbAutoDisable
PBOOL
Used to return the pin electronics auto disable feature.
pnStatus
PSHORT
Returned status: 0 on success, negative value on failure.

Comments

The current limit settings are used to set the over current threshold levels for the pin electronics.

The action taken upon an over current event can be set by calling GtDio6xOutputSetOverCurrentControl. The current over current status can be ready by calling GtDio6xOutputGetOverCurrentStatus.

Example

The following sets channels 0 and 2 source current limits to 100mA and sink current limits to –100mA, and returns channel 0 settings:

 

SHORT nStatus;

LONG alChannelList[2];

BOOL bAutoDisable;

DOUBLE dLimitHigh, dLimitLow;

 

// Fill channel array

alChannelList[0] = 0;

alChannelList[1] = 2;

 

GtDio6xSetChannelSourceChannelSourceCurrentLimits(nHandle, 2, alChanneList, 0.1, -0.1, FALSE, &nStatus);

 

GtDio6xChannelGetSourceCurrentLimits(nHandle, 0, &dLimitHigh, &dLimitLow, &bAutoDisable, &nStatus);

 

See Also

GtDio6xChannelSetSourceCurrentLimits, GtDio6xChannelSetSourceImpedance, GtDio6xChannelGetSourceImpedance, GtDio6xChannelSetSourceLevels, GtDio6xChannelGetSourceLevels, GtDio6xChannelGetSenseLevels, GtDio6xChannelSetSenseLevels, GtDio6xChannelSetSourceSlewRate, GtDio6xGetErrorString