GX5296, GX5961, GX5964, File
Returns the specified channel‘s name.
GtDio6xChannelGetName (nHandle, lChannel, pszName, nNameMaxLen, 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. ● File handle is used when communicating with a file. The File handle session identifier is returned by calling GtDio6xFileOpen. |
lChannel |
LONG |
Used to specify the I/O Channel to name. This parameter is 0-based.Auxiliary channel numbers begin with 1000. |
pszName |
PSTR |
Used to return the name of an I/O channel. |
nNameMaxLen |
SHORT |
Size of the buffer to contain the name of the I/O channel string. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
Each I/O Channel can be associated with a unique name. This name can be set and read back from the software front panel as well. The names are saved to file when GtDio6xFileSave is called.
The following example sets the name of channel 4 to “My First Channel”, retrieve the channel’s name and then uses the name to retrieve back the channel index:
SHORT nStatus;
LONG lChannel;
CHAR szChannelName[256];
GtDio6xChannelSetName(nHandle, 4, “My First Channel”, &nStatus);
GtDio6xChannelGetName(nHandle, 4, szChannelName, 256 &nStatus);
printf(“Channel 4 name is: %s”, szChannelName);
GtDio6xChannelGetNameIndex (nHandle, szChannelName, &lChannel, pnStatus);