GX5961, GX5964, File
Sets the state of the channel isolation relay to the Front Panel Analog I/O Connector.
GtDio6xChannelSetAnalogConnection (nHandle, lChannelListArraySize, palChannelListArrary, bAnalogConnectState, 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. |
lChannelListArraySize |
LONG |
Used to specify the number of channels to set. This parameter should not be greater than the size of palChannelListArray. If GTDIO6X_ALL_DOMAIN is passed in, then the palChannelListArray parameter can be set to NULL and the settings will be applied to all channels in the Domain. |
palChannelListArrary |
PLONG |
Array containing channels numbers that will be set by this function.channels numbers are 0-based and refers to any channel in the Domain. Auxiliary channel numbers begin with 1000.GX5961: Each GX5961 board has 4 fully programmable auxiliary channels, and 8 TTL I/O channels. First 4 auxiliary channels may use all the Pin Electronics API.GX5964: Does not have Auxiliary channels. |
pbAnalogConnectState |
PBOOL |
Used to return the channel connection state:0. GTDIO6X_CONNECT_OFF: Disable the channel’s to the Front Panel Analog I/O Connector (J6). 1. GTDIO6X_CONNECT_ON: Enable the channel’s to the Front Panel Analog I/O Connector (J6). |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
This function sets 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”);
GtDio6xChannelGetAnalogConnection, GtDio6xChannelSetConnect, GtDio6xGetErrorString