Data Acquisition Toolbox | ![]() ![]() |
Return multiplexed scanned channel index
Syntax
Arguments
Description
returns the scanning index number of the multiplexed channel specified by scanidx = muxchanidx(obj,muxboard,muxidx)
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.
returns the scanning index number of the multiplexed channel specified by scanidx = muxchanidx(obj,absmuxidx)
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.
Functions
![]() | makenames | obj2mfile | ![]() |