Returns the specified channel Conversion Mode.
Gx5642GetChannelConversionMode (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 |
Conversion Mode can be as follows:0. GX5642_CHANNEL_CONVERT_DIFFERENTIAL_TO_TTL – convert differential signal to TTL level.1. GX5642_CHANNEL_CONVERT_TTL_TO_DIFFERENTIAL – convert TTL level to differential. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function returns the specified channel conversion mode: differential signal to TTL level or convert TTL level to differential.
For protection, by default all channels are disabled after power-up and reset. The channels can be enabled and or disabled by calling Gx5642SetChannelOutputState.
Note: The channel should be set to conversion mode prior calling this function by calling Gx5642SetChannelMode otherwise the function returns an error.
The following example sets channel 0 to conversion mode, sets the conversion to be TTL level to differential, enables the channel and returns the channels conversion mode:
SHORT nMode;
Gx5642SetChannelMode (nHandle, 0, GX5642_CHANNEL_MODE_CONVERSION, &nStatus);
Gx5642SetChannelConversionMode (nHandle, 0, GX5642_CHANNEL_CONVERT_TTL_TO_DIFFERENTIAL,
&nStatus);
Gx5642SetChannelOutputState(nHandle, 0, GX5642_CHANNEL_OUTPUT_ENABLE, &nStatus);
Gx5642GetChannelConversionMode (nHandle, 0, &nMode, &nStatus);
Gx5642SetChannelMode, Gx5642SetChannelConversionMode, Gx5642SetChannelOutputState, GxPioGetErrorString