Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help for continuosly data logging

Hi,

 

I need to continuously write data from the analog inputs from my DAQ card (NI-USB 6212). The input data produced by a sensor [time (t) and voltage (v)]. The frequency and data samples are high (high speed acquisition data). I need to record my data in a certain period of time (10-15 minutes).

I try to use "producer consumer loop architecture", but the problems is on the binary output file. As far as I know, a binary file is not a text file (I got the producer consumer loop architecture from https://forums.ni.com/t5/Community-Example-Submissions/Using-Producer-Consumer-Architecture-for-DAQm...).

 

I also try to use continuous data logging with TDMS File (http://www.ni.com/white-paper/3727/en/). There is a problem in DAQmx Start Task.vi., the vi can't be executed.

 

I have attached the vi. Hopefully, someone can help me out.

 

Thanks,

 

Jannus

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

jannus wrote:

I also try to use continuous data logging with TDMS File (http://www.ni.com/white-paper/3727/en/). There is a problem in DAQmx Start Task.vi., the vi can't be executed.


What do you mean by "can't be executed"?  Are you getting an error?  Broken run arrow?

 

The only real issue I see with the TDMS logging is that your read should be inside of a loop so that you continuously get data until you tell it to stop.  Other minor issues include:

  1. Do not wire up the "Samples Per Channel" on the DAQmx Timing.  This just puts a limit on your buffer, leading to buffer overrun errors.
  2. Change your waveform graph into a waveform chart.  The chart keeps a history, so it should better align with the kind of display you want.

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 4
(2,546 Views)

Hi crossluz,

 

Thank you for your reply. 

By following your advice, I have run the *vi. There is no error message (also no broken arrow). But, there is no measurement or test data in the tdms file.  

 

I have one more VI file for the same purpose (writing data in *.tdms file). I have gotten the VI also from this discussion forum. I can run the *.vi and open the *.tdms file.  But, data logging in 10 seconds and  60 seconds will give the same number of data point. Both of tdms files will only have the same data point (for a certain of rate/Hz), for example 26624 points for both of tdms files (samples=10K & rate=50K Hz).  I really hope I can log my data continuously about 10-15 minutes and also get more data point for longer logging/recording. Can the VI be used for the purpose ? 

The VI I have used is attached. Thanks a lot.

 

Best regards,

 

Jannus

 

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

Your DAQmx Stop should be AFTER the loop.

 

The other change I would do is change your file setting to be "Create" instead of "Open or Create".  This way, you are not adding to old data accidentally.


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 4 of 4
(2,508 Views)