GtDio6xOutputGetOverCurrentEnable

Applies To

GX5961, GX5964

Purpose

Returns the specified board’s channels over-current enable states.

Syntax

GtDio6xOutputGetOverCurrentEnable (nHandle, pdwOverCurrentEnable, 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.

pdwOverCurrentEnable
PDWORD

Over-current flag state, each bit corresponds to a channel i.e. bit 0 represents channel 0 and bit 31 represents channel 31.

     A bit with logic high bit will enable the over current circuit, when output over current condition is detected, sink or source, it will automatically set to its output in Hi-Z. Enabling channels outputs which were set to Hi-Z as a result of over current can only be reset by calling ResetOutputOverCurrentStates function.

     A bit with logic low will ignore over current condition and will not set it to Hi-Z.

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

Comments

Note: over current condition can only be cleared by calling GtDio6xOutputResetOverCurrentStates. After the over current is cleared the channel output driver will be active again.

Channels over current high and low flags states can be read back and set dynamically at any time even while the board is running mode.

Example

The following example enables first 4 channels over current protection flags, and returns the settings:

 

DWORD dwOverCurrentEnable;

SHORT nStatus;

 

GtDio6xOutputSetOverCurrentEnable (nHandle, 0x0000000F, &nStatus);

 

GtDio6xOutputGetOverCurrentEnable (nHandle, &dwOverCurrentEnable, &nStatus);

 

See Also

GtDio6xOutputSetOverCurrentControl, GtDio6xOutputGetOverCurrentStatus, GtDio6xChannelSetSourceCurrentLimits, GtDio6xChannelGetSourceCurrentLimits, GtDio6xGetErrorString