LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous acquisition and analysis in the same time

Hi,

 

I'm acquiring data with DAQmx at 300kHz. I'm using queues to store data for a moment and I want to analyse a block of data in the same time. How can I do this? I want to detect a variation in voltage and record only data just before the variation, during the variation and just after in order to limit the volume of data to record.

 

thanks for your help!

 

Sophie

 

PS: LV 8.2, PCI-6281

0 Kudos
Message 1 of 7
(3,109 Views)

You have to do it exactly the way you allready descriped. Use a Producer/Consumer design with Queues and do the processing in a parallel loop. How many samples your record should have depends on the application. So you have to take enough samples to find the variation and then save the necessary amount of data you need to go on.

 

But you should work on your programming style, use proper wiring, less variables, clean up your frontpanel and blockdiagramm, and so on....

Otherwise you wont undertand your own code sometime, you will get race conditions, poor performance and so on...

 

 

Christian

0 Kudos
Message 2 of 7
(3,097 Views)
Is a producer/consumer structure really needed in this case? I would never have used such a structure in a fast DAQ system. The reason for this is that we already do have producer consumer structure. The producer is the DAQ driver, and the consumer is your Labview program pulling data from the DAQ driver. So by tuning the daq system you will have much better performance. I this case I would said that a better programming approach should also do the trick. Like delete all indicators you really do not need. It is also a good practice to limit the front panel size to the monitor size.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 7
(3,084 Views)

Thanks both of you for your answers. I have modified the front panel to have something lighter than before ( and it's a great idea!Smiley Happy ) I am doing now the analysis on a certain amount of data but my problem is for saving data. I think it's only the last block of data which is saved. How can I save all of my variation?

 

Thanks in advance!

 

Sophie

0 Kudos
Message 4 of 7
(3,063 Views)
For fast disk writing you need to use a binary format. The lvm format is text based and slow. It should not be used in such application


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 5 of 7
(3,055 Views)

Ok I changed it in a binary file. But I am only saving the last array of variation? Do I have to move the saving box in another loop?

 

thanks for helping me!

0 Kudos
Message 6 of 7
(3,051 Views)

stage84 wrote:

But I am only saving the last array of variation? Do I have to move the saving box in another loop?

 


Why not be somewhat bold and adventurous. Just try it out. Sometimes this is a much faster approach than consulting a forum ;).



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 7
(3,039 Views)