Sets the specified channel Differential Port value.
Gx5641SetChannelDifferentialPort (nHandle, nChannel, bData, 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). |
pbData |
PBOOL |
Differential Port value:0. Logic low1. Logic high |
pnStatus
|
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function sets the Differential Port value. If the Differential Port direction was set to output then the function returns the current channel’s port settings, if the port direction was set to input was then the function returns the Differential input value.
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 Static I/O mode prior calling this function by calling Gx5641SetChannelMode otherwise the function returns an error.
The following example sets channel 0 Differential Port value to 1:
Gx5641SetChannelDifferentialPort (nHandle, 0, 1, &nStatus);
Gx5641SetChannelDifferentialPort, Gx5641SetChannelMode, GxPioGetErrorString