LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read From Two USB DAQ Devices

Hello all,

 

I am currently trying to read from a NI USB-9162 and NI USB-6210 in the same LabVIEW code. I would like to have the data collected plotted against eachother so I would like for it to be done as close to simutaniously as possible. Currently I have the DAQ assistant for these two devices in seperate For loops, but the one devices runs through the For loop quicker then the other, despite them having the same sample rate. Is there any way t syncronize the loops, or a better way to do this? I am unable to add both devices to the same DAW Assistant as one of the devices doesn't allow for multidevice tasks. 

 

Thank you in advanced for any help. 

 

My Code is attached.

0 Kudos
Message 1 of 3
(2,772 Views)

There is definitely a Better Way to Do This.  Do not use the DAQ Assistant for this task!  Read this excellent White Paper and start programming your DAQ devices using Tasks and "real" calls to DAQmx functions.

 

Note that to pull this off, you need to know a little LabVIEW, like how to string functions together, the concept of Data Flow, and how/when to use a While loop.  If you don't know these things, spend some time with the on-line LabVIEW Tutorials, such as the ones noted on the upper right section of the Forum's main page.

 

Once you have some real LabVIEW code, if you get stuck, come back here, post your code (this means "Attach your VI"), and ask for help.

 

Bob Schor

0 Kudos
Message 2 of 3
(2,761 Views)

First of all, i would get away from using the DAQ Assistant.  You can use it as a stepping stone for initialization of your hardware but after you have the channels setup properly, right click the Express VI and either convert it to DAQ code or open the front panel.  Once you do that for both express VIs, you can combine the code together into one VI or you can leave them in separate VIs and use a rendezvous to sync them up.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 3
(2,749 Views)