GX5961, GX5964
Returns the specified channel connection state to the Front Panel.
GtDio6xChannelGetConnect (nHandle, nChannel, pbChannelConnectState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Session identifier:● Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization. |
nChannel |
SHORT |
Used to specify the channel to Get. This parameter is 0-based and refers to any channel in the Domain.GX5961: Auxiliary channel numbers begin with 1000.GX5964: Does not have Auxiliary channel. |
pbChannelConnectState |
PBOOL |
Used to return the channel connection state:0. GTDIO6X_CONNECT_OFF: Disable the channel to the Front Panel I/O Connector (J8). 1. GTDIO6X_CONNECT_ON: Enable the channel to the Front Panel I/O Connector (J8). |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
This function gets the state of the isolation relay for each channel. The channel connection can either be enabled or disabled per channel. This function addresses any channel in the domain.
The following example connect channels 0 and 6 to the Front Panel I/O Connector, and gets channel 0 connection state:
SHORT nStatus;
LONG alChannelList[2];
BOOL bConnectState;
// Fill the channels array
alChannelList[0]=0;
alChannelList[1]=6;
GtDio6xChannelSetConnect (nHandle, 2, alChanneList GTDIO6X_CONNECT_ON, &nStatus);
GtDio6xChannelGetConnect (nHandle, 0, &bConnectState, &nStatus);
if(bConnectState)
printf(“Channel 0 is connected”);
GtDio6xChannelSetConnect, GtDio6xChannelSetAnalogConnection, GtDio6xGetErrorString