LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuously acquire signal using DAQ

Solved!
Go to solution

Hello Friends, 

 

I am relatively new to LabView. I would like to record temperature signal from 12 channels (Analog input). 

I would prefer that the signals are recorded in an excel sheet in a continuous manner. I have achieved 

this goal. However, I have not been able to control the frequency and samples to record correctly. 

I need all 12 temperatures to be recorded continuously at 3 sec interval and I need 200 samples in all. 

Could anyone please suggest the correct DAQ setting?..

My approach has been to record 1 sample per second with timeout of 3 sec and stop after 600 sec in a while loop

Any help is valauable to me. 

 

Thanks and regards ,

 

Chirag

 

P.S: Block Diagram attached

0 Kudos
Message 1 of 8
(3,394 Views)

You have not attached a block diagra. You attached an image that is not at all useful. All of your code is hidden in the DAQ Assistant so no one has a clue to what you have done but if you want a 3 second interval, it makes no sense to set a 1 sample/second rate. It's also obvious that you have done nothing to stop the loop after 600 seconds.

0 Kudos
Message 2 of 8
(3,385 Views)

Sorry for that...I havent yet gone that far yet..I will implement time constraint to stop the loop...

As I am not yet completely familiar with LabView, my approach could be totally wrong.....

here is the correct block diagram...

0 Kudos
Message 3 of 8
(3,377 Views)
Solution
Accepted by topic author chirag.joshi

With the settings in your DAQ Assistant, you are taking a sample every 2 seconds - at least with the mean calculation. So, you can change the number of samples to 30 and use an Elapsed Time function to stop the VI. Be aware that with changing the number of samples to greater than the sample rate, your VI will be slow to respond to the stop button. You should also be aware that using the Write to Spreadsheet File is a bit slow and you may run into a problem of keeping up with continuous acquisition. You might want to look at the producter/consumer architecture to separate the acquisition loop from the logging. Your Write to Spreadsheet is also throwing away all timing information. I'm not sure what is happening to the data when you convert from dynamic. I never use dynamic data.

0 Kudos
Message 4 of 8
(3,369 Views)

Thanks for the help.. 

I did not quite understand what u said about the spreadsheet is throwing away info. With your suggested setting I am getting results at 3 sec interval.

I will try to look into the option of seperating the logging and acquision loop. 

 

0 Kudos
Message 5 of 8
(3,357 Views)

You are not recording the time between samples. For some types of analysis (i.e. spectral information), this is important.

0 Kudos
Message 6 of 8
(3,352 Views)

Hi Dennis_Knutson,

 

You mentioned that you can use "the producter/consumer architecture to separate the acquisition loop from the logging". How do you do that?

 

Thanks,

VL

0 Kudos
Message 7 of 8
(3,310 Views)

First of all, here's a good reference for the Producer/Consumer:https://www.ni.com/en/support/documentation/supplemental/21/producer-consumer-architecture-in-labvie...

 

In simple terms, in loop 1 you aquire your data and enqueue the data and in loop 2 your dequeue the data and log it to disk.


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 8 of 8
(3,305 Views)