GxAoDioGetOutputEnable

Purpose

Returns the Digital IO output enables states.

Applies

GX1649, GX1649-1

Syntax

GxAoDioGetOutputEnable (nHandle, pucOutputEnable, pnStatus)

Parameters

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.

Comments

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.

Example

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”);

 

See Also

GxAoDioSetOutputEnable, GxAoGetErrorString