DioGetOutputOverCurrentEnable

Applies To

GX5055

Purpose

Returns the channels over-current enable states.

Syntax

DioGetOutputOverCurrentEnable (nHandle, pdwOverCurrentEnable, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Board or File board handle.
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 number on failure.

 

Comments

NOTE: over current condition can only be cleared by calling DioResetOutputOverCurrentStates. 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 DIO is running mode.

Example

The following example reads back the over current protection flags:

 

DWORD dwOverCurrentEnable;

DioGetOutputOverCurrentEnable (nHandle, & dwOverCurrentEnable, &nStatus);

 

See Also

DioSetupOutputOverCurrentEnable, DioSetupOutputDataFormat, DioSetupInputLoadCommutatingVoltage, DioSetupInputLoadResistance, DioSetupInputThresholdVoltages, DioGetErrorString