NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I pass multiple virtual channels to labview DAQmx

I want to measure and compare two signals with my DAQ card (PCI-6221) but I want TestStand to control which two channels are compared. How do I pass multiple virtual channels?
0 Kudos
Message 1 of 4
(3,669 Views)

gumby,

you can store the physical channel information in teststand as strings and pass them to a "init DAQmx"vi you create to build your task. you can there combine the channelstrings to a single channelstring (please check out the DAQmx-examples for multiple channel configuration) and pass this to the creat virtual channel vi. now add timing and trigger infos, and you then can measure the correct channels. if you want to use these channelsettings in several vis of your application, you would like to pass the reference to the DAQmx to teststand. please remark that the reference is no pointer but a struct (container). in teststand 3.5 you will be prompted to create an appropriate datatype for this parameter if you hit the correct button.

 

Norbert B.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(3,665 Views)
I have no trouble passing physical channels.  I'm wanting to pass virtual channels.  Rather than configuring my channels inside each VI, I want to take advantage of the virtual channels I created in NI Measurement and Automation Explorer and just pass the virtual channel to the VI.  I did this successfully with traditional DAQ, but now I am converting my VIs to DAQmx and can't find a way to do it.
0 Kudos
Message 3 of 4
(3,650 Views)
gumby,

you can create "virtual channels" for DAQmx as well. these are called "global channels" then (to differ between trad DAQ and DAQmx) and a new kind of global configuration is added called "task". Infact, a task includes at least one virtual channel (which does not need to be defined as global channel!) and contains one timing and trigger-info for all included channels.
therefore, you can do the same with DAQmx as with trad. DAQ but you have to change the VI itself to DAQmx of course (including the channel-input control!).
the disadvantage of defining channels/tasks in MAX is that you always have to share these settings as well if deploying your application. if that is not of an issue for you, please feel free to use MAX for predefining all your channels/tasks for the application.

Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(3,634 Views)