Data Acquisition Toolbox    
makenames

Generate a list of descriptive channel or line names

Syntax

Arguments

'prefix'
A string that constitutes the first part of the name.
index
Numbers appended to the end of prefix -- any MATLAB vector syntax can be used to specify index as long as the numbers are positive.
names
An m-by-1 cell array of channel names where m is the length of index.

Description

names = makenames('prefix',index) generates a cell array of descriptive channel or line names by concatenating prefix and index.

Remarks

You can pass names as an input argument to the addchannel or addline function.

If names contains more than one descriptive name, then the size of names must agree with the number of hardware channels specified in addchannel, or the number of hardware lines specified in addline.

If the channels or lines are to be referenced by name, then prefix must begin with a letter and contain only letters, numbers, and underscores. Otherwise the names can contain any character.

Example

Create the analog input object AI. You can use makenames to define descriptive names for each channel that is to be added to AI.

names is an eight-element cell array of channel names chan1, chan2,..., chan8. You can now pass names as an input argument to the addchannel function.

See Also

Functions

addchannel, addline


  load muxchanidx