GtDio6xChannelSetSourceCurrentLimits

Applies To

GX5961, GX5964, File

Purpose

Programs the channel’s over current limits.

Syntax

GtDio6xChannelSetSourceCurrentLimits (nHandle, lChannelListArraySize, palChannelListArray, dLimitHigh, dLimitLow, bAutoDisable, 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.
palChannelListArray
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. 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.
dLimitHigh
DOUBLE
Used to specify the over current limit in terms of Amps.
dLimitLow
DOUBLE
Used to specify the undercurrent limit in terms of Amps.
bAutoDisable
BOOL
Used to specify 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

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