04-18-2016 01:42 PM
Hi,
I am a new user of Labview. I am using a NI-USB 6009 DAQ device to record simultaneously 2 analog input voltage signals coming from 2 different devices (an acoustic sensor and a flow sensor) and wanted to sample both signals at 44.1kHz.
The maximum sampling rate I could apply as an input of the DAQmx Timing.vi was 24kHz. Is 24kHz the maximum sampling rate that can be applied using the DAQmx Timing.vi? Or is this problem due to the NI-USB 6009 I am using?
You can download the code I created. I would really appreciate any help.
Thank you very much.
04-18-2016
02:01 PM
- last edited on
03-15-2024
10:41 AM
by
Content Cleaner
The spec is 48kS/s, then divide that by your 2 channels and you get 24kS/s. It is a limitation of your DAQ board. You might want to consider something more like the USB-6210.
04-18-2016 02:08 PM - edited 04-18-2016 02:09 PM
24 kHz at 2 channels is 6009 limitation.
Before you get into MHz rates, it will be limited by board spec (or programming), then transfer rates, required processing and PC capabilities may start causing errors.
Look at Max sampling rate (aggregate) specification in the manual, usually NI specifies it on the specification page of the board (6009)
04-19-2016 12:10 PM
Thank yoy very much!
I tried with another DAQ device (NI USB 6211) applying the same Labview code. With this DAQ, the maximum sampling rate is 250kS/s, so it should work at 44.1kHz. But I can’t record 2 signals on a synchronized way, I just obtain voltage data of one of those channels. Do you know how is that possible?
04-19-2016 02:26 PM
04-19-2016 02:35 PM
helenalacalle wrote:I tried with another DAQ device (NI USB 6211) applying the same Labview code. With this DAQ, the maximum sampling rate is 250kS/s, so it should work at 44.1kHz. But I can’t record 2 signals on a synchronized way, I just obtain voltage data of one of those channels. Do you know how is that possible?
Something sounds very wrong with your setup then. Is it still the same code as above?
04-20-2016 04:10 AM
Yes my VI is still the same as the one I attached above. And about my setup, the two output signals and grounds (from the two sensors that I want to synchronize) seem to be correctly connected to the NI USB 6211, i checked the datasheet. Also, if I try to record one of those sensors (selecting just one analog input), the code works.
Any ideas?
04-20-2016 06:05 AM - edited 04-20-2016 06:05 AM
Exactly what error are you getting? I am wondering if you are getting a buffer overflow error. You might want to consider writing to a TDMS file instead of xlsx. Or, even better, use the DAQmx Configure Logging feature so that you do not even need to mess around with the file IO: DAQmx will do it all for you.
Another note from messing with your code, you should be using Charts instead of graphs. Charts keep a history while graphs just show the last thing you wrote to it.
04-20-2016 02:24 PM
Okay, the thing is that I am not obtaining any error with that code. It is just that the plots that are obtained are not logical at all. Sometimes I get just the flow signal and the acoustic signal is a constant line at one particular voltage (so the voltage signal is not being captured by Labview); sometimes viceversa; ...
At the datasheet of the NI USB 6211 it says that there is just one analog ground (one input of the DAQ where I can add the ground wires), so I added the two ground wires at this DAQ input; is that okay? Perhaps that is the problem.
Anyway, I wrote a DAQ Assistant code which is easier than the DAQmx code I had, you can download it. I reached my objective, I obtained an Excel file with the voltage data of both the acoustic and the flow sensor.
Thank you very much for your advices about the Labview Code.. 🙂
04-21-2016 02:12 AM - edited 04-21-2016 02:15 AM
Hi Helena,
now you got exactly the same type of VI that NI is always proposing on their hands-on seminars… (Sarcasm!)
Do you really want to take 480k samples at a sample rate of 48k? Waiting 10s for data to arrive? With a timeout value of exactly 10s?
Hint: Right-click the DAQAssistent and select "Open Front panel" to convert it to a "standard" VI…
Or examine the VIs in the example finder on DAQmx...