LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I save amplitude vs time graph from my project continuously at certain freqency?

I need to capture and save data continuously at certain frequency during ultrasound wave monitoring.  I have reached where I can view the data from my vi program in a graph.  My next step is to enable it to save my graph data (amplitude vs time) automatically while the program is running in csv or Excel format.

0 Kudos
Message 1 of 7
(2,341 Views)

This sounds a bit like Time-Frequency Analysis, which is a somewhat advanced topic.  Depending on exactly what you want to do, something you could do is to acquire a short time sample (since you are talking about ultrasound, this could be a few milliseconds), filter it to estimate the power at a center frequency, and plot that point.  You would then "slide" the time sample down some delta-time (a "moving window", which could include points at the end of the previous window) and repeat the power estimate.

 

Bob Schor

0 Kudos
Message 2 of 7
(2,305 Views)

I appreciate your input.  I may have been unclear about what I need to do.  I have a graph that is updating every 100 milliseconds (Voltage vs time).  I want to be able to save the data of that graph, say every 500 milliseconds, as txt, csv or xlsx file.  I hope this explains it better.

0 Kudos
Message 3 of 7
(2,286 Views)

Ah.  That's very simple.  Sampling data and streaming it to disk is something that LabVIEW does very well.

 

Are you familiar with LabVIEW's Data Acquisition routines and DAQmx?  Have you looked at the examples that ship with LabVIEW?  If you provide more details on what you are trying to do, and post your own code, we can make more helpful suggestions.

 

Bob Schor

0 Kudos
Message 4 of 7
(2,272 Views)

Unfortunately I am very new to LabVIEW and the code was pretty much done with the help of a consultant.  I have looked at some examples on "write to file", but couldn't get anywhere.  I posted the code here.  The code is able to show continuous feed from my transducers.  My goal is to be able to automatically save the data shown on that graph (amplitude vs time) continuously every 300-500 milliseconds.  Please let me know if you need more explanation.  Thanks for your follow up.

0 Kudos
Message 5 of 7
(2,261 Views)

Hi Ryyan,

 


@Ryyan_5 wrote:

My goal is to be able to automatically save the data shown on that graph (amplitude vs time) continuously every 300-500 milliseconds.  Please let me know if you need more explanation. 


Simplest solution: put a WriteWaveformToFile next to your graph and wire the waveform and a filepath…

 


@Ryyan_5 wrote:

Unfortunately I am very new to LabVIEW and the code was pretty much done with the help of a consultant.


If this is still to complicated for you you should consider asking that consultant again to improve its VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,248 Views)

Thanks for the suggestion to use Write waveform to file.  I am able to save the data, but it is is asking me to overwrite the file or give it a new name.  How do I enable it to save the file automatically every 500 milliseconds within the same file or a different file name?  

0 Kudos
Message 7 of 7
(2,211 Views)