GtDio6xChannelSetName

Applies To

GX5296, GX5961, GX5964, File

Purpose

Associates a name with a I/O Channel.

Syntax

GtDio6xChannelSetName (nHandle, lName, pszName, pnStatus)

Parameters

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
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.
GX5296: Each GX5296 board has 4 auxiliary channels.
GX5961: Each GX5961 board has 12 auxiliary channels.
GX5964: Does not have Auxiliary channels.
pszName
PSTR
Used to specify the name of an I/O channel
pnStatus
PSHORT
Returned status: 0 on success, negative value on failure.

Comments

An I/O Channel can be associated with a unique name. This name can be set and read from the software front panel as well. The names are saved to file when GtDio6xFileSave is called.

Example

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);

 

See Also

GtDio6xChannelGetName, GtDio6xChannelGetNameIndex, GtDio6xGetErrorString