GX5961, GX5964
Returns the connection state of the specified channel to the Front Panel Analog I/O Connector.
GtDio6xChannelGetAnalogConnection (nHandle, nChannel, pbAnalogConnectState, 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). |
pbAnalogConnectState |
PBOOL |
Used to return the channel connection state:0. GTDIO6X_CONNECT_OFF: Disable the channel to the Front Panel Analog I/O Connector (J6). 1. GTDIO6X_CONNECT_ON: Enable the channel to the Front Panel Analog I/O Connector (J6). |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
This function returns the state of the channel isolation relay to the Front Panel Analog I/O Connector. 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 Analog 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;
GtDio6xChannelSetAnalogConnection (nHandle, 2, alChanneList GTDIO6X_CONNECT_ON, &nStatus);
GtDio6xChannelGetAnalogConnection (nHandle, 0, &bConnectState, &nStatus);
if(bConnectState)
printf(“Channel 0 is connected”);
GtDio6xChannelSetAnalogConnection, GtDio6xChannelSetConnect, GtDio6xGetErrorString