Returns the overcurrent status of the specified open collector.
Gx3722OpenCollectorGetOvercurrent (nHandle, pnOvercurrent, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX3722 board. |
pnOvercurrent |
PSHORT |
Returns a bit mask containing the current overcurrent state of the open collector. Each bit corresponds to the state of an Open Collector channel with bit 0 corresponding to channel 1, bit 1 is channel 2 and bit 2 is channel 3. If a bit is HI=1, the channel is over-current. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Overcurrent will be flagged with greater than 2.5 Amperes are present on an open collector channel.
The following example enables the open collector and retrieves the overcurrent state of Open Collector channel 1:
SHORT nOvercurrent;
Gx3722OpenCollectorSetEnable (nHandle, GX3722_OPEN_COLLECTOR_ENABLE, &nStatus);
Gx3722OpenCollectorGetOvercurrent (nHandle, &nOvercurrent, &nStatus);
Gx3722OpenCollectorSetEnable, Gx3722OpenCollectorGetEnable, Gx3722OpenCollectorResetOvercurrent, GxFpgaGetErrorString