LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquire data using buffer

I have an analog input the is problem with my data ,when i acquire it , my problem is when i do the acquisition ,i see in my waveform graph a cut of data. I don't know how to fix it .After that i want with a button to acquire the data.

any idea ? please

0 Kudos
Message 1 of 16
(2,441 Views)

It sounds like you want to set up continuous analog input acquisition. There are several examples shipped with LabVIEW that show variations on this theme, but if you'd like to share your code so far people can give more productive suggestions.

 

As a starting point, if you're using DAQmx you should change the sampling type to Continuous and then use Read in a loop. Each time, attach the new data to the end of the old data using a shift register or feedback node. If you anticipate a large amount of data, read about the Producer/Consumer architecture.


GCentral
0 Kudos
Message 2 of 16
(2,439 Views)

If your LabVIEW program is not giving you the data you expect, the problem is probably in your program.  We cannot accurately "guess" what you did.  Showing us a picture of your Block Diagram is also not very helpful (I, for one, refuse to waste my time looking at hard-to-view, impossible to edit/inspect/run pictures).  You need to attach your VI or VIs!

 

Bob Schor

0 Kudos
Message 3 of 16
(2,409 Views)

thanks for your respond ,Actually i'm not using a Daqmx but a pci-9820  . Please find my Vi attached .

 

Download All
0 Kudos
Message 4 of 16
(2,391 Views)

DAQmx is the name of the driver (not the hardware) although it's sometimes used to describe DAQmx Hardware (i.e. hardware that uses the DAQmx driver).

The VI appears to show that you're acquiring new data each loop iteration and doing some processing, but that no historic data (i.e. previous iterations) is actually stored/recorded/added to the graph.

 

Unlike a Chart, a Graph displays only the data that you plot to it (i.e. there is no in-built history).

The processing in your loop makes it hard to assess the best modification to get the results you want (I'll look more later) but essentially changing to a Chart will give you some history in your plots for little effort, but won't solve the likely problems with processing.

 

You should read about Shift Registers to get an idea about how you might store data between iterations. If you want to run the VI for a long time, be aware this is going to increase the memory demands each iteration, and so you might prefer to consider the Producer/Consumer already linked, with your producer acquiring data and a consumer plotting a graph, doing your processing and logging to disk if needed.


GCentral
Message 5 of 16
(2,383 Views)

It looks like you are acquiring 80k samples at a time at the rate of 800kHz.  If we assume that your DAQ Read "does the right thing" and waits for all 80k samples to be in its buffer, then 10 times a second you get another 80k samples to plot.

 

You've chosen to acquire the data without Time information (i.e. as a 2D Array instead of a 1D Array of Waveforms), and your Graphs are arranged to show about 200 points, so I expect you are viewing the final 200/80k samples, or the last 0.25% of your data.  OK, not what I would find very helpful ...  And every tenth of a second, you overwrite that Graph with the last 0.25% of the next data sampled.

 

Have you thought about what you want to do and/or see of this data?  What is useful to view/plot about data coming in at 800 kHz?  If the data are varying "quickly" (like thousands of times/second), there's probably no easy way to "see" this, but if it varies more slowly, then you can plot one point every 100 or every 1000 and get an indication (this is a Poor Man's Low Pass Filter).

 

What if you want a continuous plot over several tens of seconds?  Well, how many plots-of-80k points can you fit on a screen?  If you are plotting a (continuous) graph, you first plot "all the data" (80k points), then plot "all the data" (original 80k + new 80k points), etc.  Is this what you want to do?  [It doesn't matter what I'd do, these are your data points and you get to choose what you show and how you show it.]

 

Maybe time to learn a little more LabVIEW about acquiring and plotting data.

 

Bob Schor

0 Kudos
Message 6 of 16
(2,363 Views)

Thanks for your respond ,I'm still learning about labview and this is new for me .

Actually I want to acquire my data at a rate of 120MHz But i couldn't do this it gives me an error that says its out of range . 

I've attached a picture of what my data should look like. 

Download All
0 Kudos
Message 7 of 16
(2,345 Views)

Hmm, I'm not sure that your A/D card is capable of the data rate that you want.  The rated speed is 120M S/s, which for 2 channels, works out to 60 MHz for each channel.

 

Bob Schor

0 Kudos
Message 8 of 16
(2,333 Views)

My A/D card is capable of the 120MS rate in the datasheet it's write up to 130 MS/s sampling rate in "ping pong" mode ,and i'm using the ping pong mode

0 Kudos
Message 9 of 16
(2,317 Views)

If, as you state, "I want to acquire data at 120 MS/s", why are you using this weird "ping-pong" mode to sample at 130 MS/s?

 

Bob Schor

0 Kudos
Message 10 of 16
(2,307 Views)