Returns the specified channel operating mode.
Gx5642GetChannelMode (nHandle, nChannel, pnMode, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5642 board. |
nChannel |
SHORT |
Channel range is: GX5642_FIRST_CHANNEL (0) to GX5642_LAST_CHANNEL (63). |
pnMode |
PSHORT |
Channel operating modes are as follows:0. GX5642_CHANNEL_MODE_CONVERSION – channels is set for conversion mode.1. GX5642_CHANNEL_MODE_STATIC_IO – channels is set for static I/O mode. |
pnStatus
|
PSHORT |
Returned status: 0 on success, negative number on failure. |
For protection, by default all channels are disabled after power-up and reset. The channels can be enabled and or disabled by calling Gx5642SetChannelOutputState.
The following example returns channel 0 mode:
Gx5642GetChannelMode (nHandle, 0, &nMode, &nStatus);
Gx5642SetChannelMode, Gx5642GetChannelDifferentialPortDirection, Gx5642SetChannelDifferentialPort, GxPioGetErrorString