GtDio6xOutputGetOverCurrentControl

Applies To

GX5961, GX5964

Purpose

Returns the driver over current controls.

Syntax

GtDio6xOutputGetOverCurrentControl (nHandle, pnOverCurrentMode,pnOverCurrentWindow, 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.

pnOverCurrentMode
PSHORT
Used to return the over current mode for the channel causing the over current event:

0.  GTDIO6X_OVER_CURRENT_DISABLED: Over current event is ignored.

1.  GTDIO6X_OVER_CURRENT_DISABLE_CHANNEL: When over current event is detected, only the channel causing the event will be disabled.

2.  GTDIO6X_OVER_CURRENT_DISABLE_ALL_CHANNELS: When over current event is detected, all channels will be disabled.

pnOverCurrentWindow
PSHORT
Used to return the over current window size. The window size is used to compensate the extern cable length.

0.    GTDIO6X_OVER_CURRENT_WS0: Cable Length (ft): 4-8.

1.    GTDIO6X_OVER_CURRENT_WS1: Cable Length (ft): 8.3-16.3.

2.    GTDIO6X_OVER_CURRENT_WS2: Cable Length (ft): 16.6-24.6.

3.    GTDIO6X_OVER_CURRENT_WS3: Cable Length (ft): 25-33.

4.    GTDIO6X_OVER_CURRENT_WS4: Cable Length (ft): 33.3-41.3.

5.    GTDIO6X_OVER_CURRENT_WS5: Cable Length (ft): 41.6-49.6.

6.    GTDIO6X_OVER_CURRENT_WS6: Cable Length (ft): 50-58.

7.    GTDIO6X_OVER_CURRENT_WS7: Cable Length (ft): 58.3-66.3.

8.    GTDIO6X_OVER_CURRENT_WS8: Cable Length (ft): 66.6-74.6.

9.    GTDIO6X_OVER_CURRENT_WS9: Cable Length (ft): 75-83.

10. GTDIO6X_OVER_CURRENT_WS10: Cable Length (ft): 83.3-91.3.

11. GTDIO6X_OVER_CURRENT_WS11: Cable Length (ft): 91.6-99.6.

12. GTDIO6X_OVER_CURRENT_WS12: Cable Length (ft): 100-108.

13. GTDIO6X_OVER_CURRENT_WS13: Cable Length (ft): 108.3-116.3.

14. GTDIO6X_OVER_CURRENT_WS13: Cable Length (ft): 116.6-124.6.

15. GTDIO6X_OVER_CURRENT_WS15: Cable Length (ft): 125-133.

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

Comments

The programmable drivers generate an over current signal that is monitored.  Several actions can be programmed when an over current event is detected.

0.    Disable the channel causing the event.

1.    Disable all the channels.

In addition, an over current window can be programmed to compensate for spikes due to cable length.  The window is triggered with the selected phase assert signal and masks the over current event.

Example

The following example sets the global over current disable to enable, and returns channel over current and global over current disable setting:

 

SHORT nChannelOverCurrent, nGlobalOverCurrent, nOverCurrentWindow;

SHORT nStatus;

 

GtDio6xOutputSetOverCurrentControl(nHandle, GTDIO6X_DISABLED, GTDIO6X_ENABLED, GTDIO6X_OVER_CURRENT_WS0, &nStatus);

 

GtDio6xOutputGetOverCurrentControl(nHandle, &nChannelOverCurrent, &nGlobalOverCurrent, &nOverCurrentWindow, &nStatus);

 

See Also

GtDio6xOutputSetOverCurrentControl, GtDio6xOutputGetOverCurrentStatus, GtDio6xChannelSetSourceCurrentLimits, GtDio6xChannelGetSourceCurrentLimits, GtDio6xGetErrorString