From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquiring continuous data from Ni DAQmx

Solved!
Go to solution

Hello,

        I am using LV 8.0 and am acquiring the ecg signals from a machine using the NI DAQmx with a sampling rate of 1000smpls/sec.. the thing i want to do is , get the array with the full information and pass it to another VI for analysis.. But the problem I am facing is , as the sampling rate is 1000 and my DAQmx is in a While loop I am getting just 1000 values in the array and not the full array with the record of more than 60 seconds... 

 

Can anyone please tell me a method to get all the values in the array, i mean for the whole acquisition session(may be for 5 mins)...

 

Regards,

Nitzy.. 

0 Kudos
Message 1 of 20
(7,469 Views)
Solution
Accepted by topic author NitzZ

Hello!

 

Use something like this:

 

samplebuild.PNG

 

But where the DAQ Assistant is, put your own DAQmx code (for something as simple as acquiring 1000 samples, DAQ Assistant is good!)

 

Make sure the Build Array function is set to Concatenate Inputs, also the Convert from Dynamic Data is set to 1D array of scalars- automatic (but this only matters with the DAQ Assistant)

 

I hope this helps!

Message 2 of 20
(7,455 Views)
If you want to keep all of the information that you acquire, do not convert to DBL. Keep it as dynamic data and use the Append Singals with a shift register or convert to waveform and use Append Waveforms with a shift register. Unless of course you want to analyze each capture separately.
0 Kudos
Message 3 of 20
(7,444 Views)

Shift registers and appends work great for a low number of samples (1ks/sec * 300 sec = low), but if you want to log for an extended period of time you might not be able to keep everything in memory.  You might want to consider pushing those 1000 entry arrays into a FIFO and pulling/processing them on the fly in a separate loop.

 

Ive used that method to log 32 DI lines @ 50Ms/s for multiple hour acquisition sessions using:

 

Instrument --> SampleFifo

SampleFifo --> ProcessingLoop

ProcessingLoop Results --> Hard Drive 

 

Hugs,

memoryleak 

Message Edited by memoryleak on 07-23-2009 03:07 PM
0 Kudos
Message 4 of 20
(7,432 Views)

hello everyone,

 

                      A special thanks to Er.Macaba, Your solution solved my entire problem.. I aslo thank others for their valuable information.. Though not now but at some other point of  time, they too may come in use.. 

 

Best Regards,

 

Nitzy... :smileyvery-happy:

0 Kudos
Message 5 of 20
(7,417 Views)

Hello memoryleak,

Can you please post the vi to do this using FIFO and what you described. I am trying to acquire around @ 40Ks/s rate and 20K number of samples using 9215 AI on a cDAQ for measuring high speed movement of a plunger. I am currently using the daq assistant with append, althougth the time is <5 secs, i believe that not all values are being acquired and would very much like your type of solution.

 

Thankful to you,

freemason

0 Kudos
Message 6 of 20
(7,248 Views)

Try this too.

This is using A DAQmx. Using an Express VI generally eats a lot of memory

Somil Gautam
Think Weird
0 Kudos
Message 7 of 20
(7,221 Views)

1.JPG

 

Dear Eng. Mark,

 

I tried to do you VI but the dynamic data converted to 2D array not to 1D array, please inform me about the proble, also i cann't find the waveform graph icon.

 

M. Abdelkader.

0 Kudos
Message 8 of 20
(6,758 Views)

The waveform graph icon is the terminal for the waveform graph you drop onto the front panel.

 

For a 2-D array, change the properties in the dialog box you get by double clicking on the Convert Dynamic Data express VI so that it outputs a 2-D array.

 

You may need to change the Build Array function to Concatenate Inputs by right clicking on it.

 

(PS.  I see you were ultimately able to get your screenshot embedded, but it looks like you first tried by using Firefox to embed a jpeg.  That doesn't work because the file it points to is located on your hard drive which we can't access.)

0 Kudos
Message 9 of 20
(6,723 Views)
I attached the VI, please correct it then send it two me.
0 Kudos
Message 10 of 20
(6,720 Views)