Data Acquisition Toolbox    
muxchanidx

Return multiplexed scanned channel index

Syntax

Arguments

obj
An analog input object associated with a National Instruments board.
muxboard
The multiplexer board.
muxidx
The index number of the multiplexed channel.
absmuxidx
The absolute index number of the multiplexed channel.
scanidx
The scanning index number of the multiplexed channel.

Description

scanidx = muxchanidx(obj,muxboard,muxidx) returns the scanning index number of the multiplexed channel specified by muxidx. The multiplexer (mux) board is specified by muxboard. For each mux board, muxidx can range from 0-31 for differential inputs and 0-63 for single-ended inputs. muxboard and muxidx are vectors of equal length.

scanidx = muxchanidx(obj,absmuxidx) returns the scanning index number of the multiplexed channel specified by absmuxidx. absmuxidx is the absolute index of the channel independent of the mux board.

For single-ended inputs, the first mux board has absolute index values that range between 0 and 63, the second mux board has absolute index values that range between 64 and 127, the third mux board has absolute index values that range between 128 and 191, the fourth mux board has absolute index values that range between 192 and 255. For example, the absolute index value of the second single-ended channel on the fourth mux board (muxboard is 4 and muxidx is 1) is 193.

Remarks

scanidx identifies the column number of the data returned by getdata and peekdata.

Refer to the AMUX-64T User Manual for more information about adding mux channels based on hardware channel IDs and the number of mux boards used.

Example

Create the analog input object ai for a National Instruments board that is connected to four AMUX-64T multiplexers, and add 256 channels to ai using addmuxchannel.

The following two commands return a scanned index value of 14.

See Also

Functions

addmuxchannel


  makenames obj2mfile