LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using multiple channels with DAQmx and a USB-6009

I'm using LV 14 and a USB-6009

The example I have attached is originally posted by stmoritz back in 6/27/13, I've made a few simple changes but it is a perfect example for me to ask my question.  I should be able to group the AO and DO channels together yes?  So rather than 5 "parallel" tasks I would end up with 3 parallel tasks, 1 AO with 2 channels, 1 DO with 2 channels, and 1 AI but I am having some difficulty with the execution. How do I combine the like channels and then disassemble the data?

 

0 Kudos
Message 1 of 4
(2,450 Views)

Do a Web search for "Learn 10 Functions in NI-DAQmx ..." and learn about creating Tasks, either in MAX or (my preferred place) in your LabVIEW Project (which you don't seem to be using).  This makes it easy/natural to group Channels together (Dev1/AO0:1, for example).  When you have multiple inputs, you generally get arrays (of channels), so N Samples, N Channels becomes either an Array of Waveforms or a 2D Array of Dbl.  But once you create the Task and define the Channel, the functions you wire to it should "conform" to the Task/Channel it defines.

 

Bob Schor

0 Kudos
Message 2 of 4
(2,406 Views)

Thanks Bob for your input, I did find the 10 functions and I'm working on it.  Yes, I will add this to a project and eventually create an .exe 

0 Kudos
Message 3 of 4
(2,400 Views)

So if it is in a Project, you can got to the Project line, right-click New, Task, and get the Task constant (including device, channels, channel settings (Max, Min), Timing (rate, # samples, mode), etc. defined, so your DAQmx code largely consists of "Start Task" (with the Task Constant wired to it), "Read" (or "Write"), possibly with a Property Node to extract # Samples/Channel, "Stop Task", and (optionally) "Clear Task".  4 Functions, no mysterious constants (I'm assuming you don't need to vary any of the Task parameters).

 

Bob Schor

0 Kudos
Message 4 of 4
(2,393 Views)