Chapter 4
Programming
4-2
www.ni.com
Channel Addressing
Performing scanning operations in software depends on the ADE
you are using. While using LabVIEW, Measure, or Visual Basic
(ComponentWorks), all scanning operations are prepared in software by
using an SCXI channel string as the input to the channel parameter in the
analog input VI or function. These ADEs also support virtual channels
using Data Neighborhood (DAQ Channel Wizard) in Measurement &
Automation Explorer. In LabWindows/CVI, C, or C++ development
environments, several NI-DAQ function calls need to be made to set up
each module involved in the scan, the chassis, and the DAQ device
controlling the scan. In Virtual Bench, the instruments that support SCXI
scanning configure the channels of the module in a menu item in the
graphical user interface. In BridgeVIEW, SCXI channels must be
configured as virtual channels (tags) in Measurement & Automation
Explorer.
A discussion describing how to implement multiplexed scanning in the
different ADEs follows. See your ADE manual and the DAQ analog input
examples that come with your application software for more detailed
information on programming your SCXI modules for scanning in
multiplexed mode.
LabVIEW and the SCXI Channel String
For LabVIEW, Measure, and Visual Basic, the channel string determines
the sequence in which SCXI channels are scanned. In LabVIEW, an array
of these channel strings configures multiple modules in the scan list. When
the application program runs, the channel string is used for programming
the channel information into the SCXI system. The format of the channel
string is as follows:
obx ! scy ! mdz ! channels
where
obx is the onboard DAQ device channel, with x representing a particular
channel where the multiplexed channels are sent. This value is 0 for DAQ
channel 0 in a single-chassis system. In a multichassis or remote chassis
system, however, the DAQ device channel x corresponds to chassis number
n-1, where DAQ device channel x is used for scanning the nth chassis in the
system.