08-13-2009 02:49 AM
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
08-13-2009 03:35 AM
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
08-13-2009 04:33 AM
08-13-2009 06:58 AM
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! ) 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
08-13-2009 07:25 AM
08-13-2009 07:42 AM
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!
08-13-2009 08:01 AM
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 ;).