Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to log the data by a USB data acquistion with high sample rate in Labview

Solved!
Go to solution

Hello All,

 

I am using a USB6361 to acquire a analog data with sample rate 100K. The program in labview looks as below which is a simple DAQ configuration. Use the VI for wrting the data to excel file. The configuration (Sample rate is 10000Hz) in the following pic can works well.Analog DAQAnalog DAQ

 

However, when I use a high sample frequence (100K Hz) which I need for my project, the error popped up as below. I tried to increase the number of samples, the error is still there. If I do not enable the write to file VI, there is no issue with this program.

 

Could someone help with this? ThanksErrorError

 

Finally when I try to test two channels, I got the following wave form after I run the model, but actually I did not connect any cable to the second channel. Why does the second channel (voltage1) also show almost same value as the first channel which is connected to a function generator.

 Curve with Two ChannelsCurve with Two Channels

 

Regards,

Jian

0 Kudos
Message 1 of 5
(2,519 Views)
Solution
Accepted by topic author gnatjian

You logging is slowing down the loop too much.  File IO is just slow.  That is the nature of computers.  But you can be a lot more efficient with how you are logging.  If an Excel format is not a requirement, what I would do is get rid of the Write To Measurement File.  You can then go into the DAQ Assistant and then the Logging tab.  You can configure DAQmx to stream the data straight to a TDMS file.  Then as long as you have the TDMS Excel add-on installed (comes with LabVIEW), you can still look at your data in Excel.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(2,484 Views)

I have found that the fastest way to log data is to log to memory mapped files which essentially uses the PC's RAM to store the data.

0 Kudos
Message 3 of 5
(2,469 Views)

Thanks for reply. I found that if I choose TDM or TDMS format, the data can stored successfully based on this 100K sample rate.

0 Kudos
Message 4 of 5
(2,463 Views)

Thanks. It works now based on your suggestion.

0 Kudos
Message 5 of 5
(2,462 Views)