Returns the state of the specified open collector.
Gx3722OpenCollectorGetEnable (nHandle, pnState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX3722 board. |
pnState |
PSHORT |
Returns a bit mask containing the current 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. The state of each bit is as follows:0. GX3722_OPEN_COLLECTOR_DISABLE.1. GX3722_OPEN_COLLECTOR_ENABLE. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Enabling will bias the gate of the Open Collector, creating a path from the Open Collector channel input pin to Ground via a 0.02Ω resistor. The voltage drop across this resistor is then amplified and used for overcurrent sensing.
The following example gets the current open collector state:
SHORT nState;
Gx3722OpenCollectorGetEnable (nHandle, &nState, &nStatus);
Gx3722OpenCollectorSetEnable, Gx3722OpenCollectorGetOvercurrent, GxFpgaGetErrorString