Sets the specified channel Conversion Mode.
Gx5641SetChannelConversionMode (nHandle, nChannel, nMode, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5641 board. |
nChannel |
SHORT |
Channel range is: GX5641_FIRST_CHANNEL (0) to GX5641_LAST_CHANNEL (63). |
nMode |
SHORT |
Conversion Mode can be as follows:0. GX5641_CHANNEL_CONVERT_DIFFERENTIAL_TO_TTL – convert differential signal to TTL level.1. GX5641_CHANNEL_CONVERT_TTL_TO_DIFFERENTIAL – convert TTL level to differential. |
pnStatus
|
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function sets the specified channel to convert 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 Gx5641SetChannelOutputState.
Note: The channel should be set to conversion mode prior calling this function by calling Gx5641SetChannelMode otherwise the function will return 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;
Gx5641SetChannelMode (nHandle, 0, GX5641_CHANNEL_MODE_CONVERSION, &nStatus);
Gx5641SetChannelConversionMode (nHandle, 0, GX5641_CHANNEL_CONVERT_TTL_TO_DIFFERENTIAL, &nStatus);
Gx5641SetChannelOutputState(nHandle, 0, GX5641_CHANNEL_OUTPUT_ENABLE, &nStatus);
Gx5641GetChannelConversionMode (nHandle, 0, &nMode, &nStatus);
Gx5641SetChannelMode, Gx5641GetChannelConversionMode, Gx5641SetChannelOutputState, GxPioGetErrorString