03-09-2015 06:09 PM
Hello everyone. I'm new here and I have a quick question about collecting and processing data.
I am on LabView 2012 and I am using a DAQ to collect and process some data. There are two signals of dynamic data type ("Input" and "Output") that I am plotting along with their FFTs. This part works fine. However, the data collection period is very long (20-30minutes for this experiment) and an event of interest ("Flutter") happens around 25 minutes. What I would like to do is to wire my block diagram and add a boolian button to the front panel such that right before this event looks like it is about to happen, I can press the button and begin plotting and taking the FFT of that short data segment. The attachement shows what I am working with.
-Kyle
03-09-2015 07:38 PM
Kyle,
Where is your loop? Any program which needs to repeat portions of the code should have those portions in a while loop. Do not use Run Continuously for opreating a program like this.
If you are taking 30 minutes of data before the DAQ Assistant returns, you cannot conviently stop the program except with the Abort button which is also bad practice.
Both of those buttons are for use during program development only. It has been said that: Using the Abort button to stop a VI is like using a tree to stop a car. It works but there may be unintended cosnquences!
The Dynamic Data Type generated by Express VIs tends to hide the underlying data structure making it more difficult to manipulate the data. For data in waveforms or arrays you can use Get Waveform Subset.vi or Array Subset to get the portion of the data you want to look at closely.
Lynn
03-09-2015 08:35 PM
03-11-2015 02:16 PM
Thank you for your replies Lynn and Mike.
Lynn,
When I choose the properties of the DAQ Assistant, I choose the samping rate and the number of samples. At the end the code ends on its own. Is this as good as a while loop? If I want to end it early, what kind of code should I use? If there is a tutorial on this, that would be cool too. I've programmed something like this before (a while loop that I can trigger an exit condition cleanly) but it didn't involve a DAQ and now it seems tricky.
I think I can do what I need with a case structure. However, the way the DAQ Assistant outputs data is mysterious to me in that even when I use a waveform graph to plot in real time, nothing shows up on my front screen until the end. This gives me the impression that the data is collected and then passed all at the end. Is this right? Mike, which videos do you think I could explore to learn about this?
03-12-2015
06:05 PM
- last edited on
01-06-2025
10:32 AM
by
Content Cleaner
Here is a good example of what a while loop is - you would be able to stop it by attaching a button to the conditional terminal of the while loop.
If you would like the data to be plotted as data is available, it sounds like you need a waveform chart instead of a waveform graph. There's a good article talking about the difference between those in this article.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9zsSAC&l=en-US