Returns the Digital IO output enables states.
GX1649, GX1649-1
GxAoDioGetOutputEnable (nHandle, pucOutputEnable, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX1649 board. |
pucOutputEnable |
PBYTE |
Returns the bit fields corresponding to the DIO output enable states of each channel. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Bit 0-7 of pucOutputEnable corresponds to DIO channels 0-7. A bit with a value of 1 represents an enabled state. A bit with a value of 0 represents a disabled state.
The following example gets the DIO output enable states:
SHORT nStatus;
BYTE ucOutputEnable;
GxAoDioGetOutputEnable(nHandle, &ucOutputEnable, &nStatus);
if (ucOutputEnable & 1)
printf(“Channel 0 is enabled”);