LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using LVM Express VIs to save/load chart/graph data & resetting initial values at runtime

Hi,
 
I have been trying to use the LVM express VIs to save data as it is acquired.
 
I have an array of data from an buffered analog input that I am sending into the LVM Write VI.  I set the VI to contain only one header and I have verified the data is being writen to the file with Excel. 
 
I am reading the data using the Read LVM express VI, converting it from dynamic data to a double and am then connecting it to a chart and graph.  I always see the same waveform on the charts and graphs.  I noticed in the header that even though I have only one header and additional segments are being appended, there is a row that calls out the number of data points in the file and that number is set to the number of points from the first segment...
 
Is there any way to use the read/write LVMs to write a datafile while data is being acquired and then read it back in?
 
I tried this with only one call to the Write LVM VI by putting all the data in an array and then connecting that to the Write LVM VI.  The graph & chart looked as I expected when I read the data with the Read LVM VI in this case.
 
One othe quick question I'd like to throw in here:
 
  Is there any way to reinitialize to default values at runtime?  I haven't seen a VI that does this but I would like to reset everything when I run.  The only method I've had so far is to use property nodes...
 
Thanks,
 
Dave
0 Kudos
Message 1 of 2
(2,640 Views)
I believe you can accomplish the resetting initial values fairly easily by using the VI method "Reinitialize All To Default".  You can find this in an invoke node, by setting the class to "VI" and selecting "Default Values -> Reinitialize All To Default", or pressing CTRL-SHIFT-B and searching for the name of the method.
 
As for the writing acquired data in your loop, I believe a VI like this should accomplish what you're trying to do.  My writer just creates some default data using four iterations of my "acquisition" loop.
 
Hope this helps!
Download All
0 Kudos
Message 2 of 2
(2,629 Views)