08-05-2021 12:31 AM
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.
08-06-2021 09:34 AM
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
08-07-2021 02:05 PM
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.
08-08-2021 05:16 PM
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
08-09-2021 01:34 AM - edited 08-09-2021 01:35 AM
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.
08-09-2021 07:39 AM
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…
08-16-2021 03:23 PM
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?