LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daq assistant

Solved!
Go to solution

Hello,

 

I am new to LabVIEW and I am experiencing a very basic problem, so please bear with me.

 

I have 12 anemometers (wind meters) that outputs voltage that scales linearly with velocity. I want to graph the velocity vs. time and then save the data in a measurement file (I have attached my VI).

 

I want the user to input the desired number of samples and sample rate. Then, once the VI is run, DAQ Assistant will take the specified number of samples at the specified sample rate and then write to a measurement file and then quit.

 

The problem is that DAQ Assistant continually takes the user-specified number samples and keeps overwriting old data. I can see old data constantly being overwritten on the graph.

 

Thank you all for any help you can provide!

0 Kudos
Message 1 of 4
(2,930 Views)

Hi rolf,

 

that's the way graphs work in LabVIEW. They don't buffer your data in a magical way…

 

In your case I recommend to use charts instead of graphs. They use their own buffer to keep an history of data.

You also want to THINK DATAFLOW when saving data to a file. Right now you only save the data measured in the last loop iteration…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,926 Views)

GerdW, thanks for the reply!

 

After doing a little more research, here is what I am thinking: The reason DAQ Assistant keeps taking the user-specified number of samples over and over again and is because it is stuck in a while loop that will keep iterating until I hit the stop button. That's why I'm seeing my data continually get overwritten with new data.

 

So what I need to do is wire something to the "stop" button that tells the program to stop once the user-specified number of samples is reached... And then I forward that set of data over to "Write to Measurement File"?

 

Am I on the right track?

0 Kudos
Message 3 of 4
(2,893 Views)
Solution
Accepted by topic author rolfzed

Hi Rolf,

 

I can't open your VI here, but I think I remember how it looks like…

 

You have configured the DAQAssistant to give a a certain number of samples for your channels. It will do that whenever you call that DAQAssistant!

No need for a while loop here when you only want to get that number of samples…

 

That's why I'm seeing my data continually get overwritten with new data.

Quite different: Your data will get "overwritten" (better wording: "replaced") because your graphs don't have any internal data buffers. A graph only displays the data you wire to it…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(2,888 Views)