LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with storing and retrieving waveform

Hello.. I have just started working on LabVIEW, so my issue may sound silly.

I am trying to plot the numbers coming out of a random generator (will use some PID controller at a later stage) with respect to the current time on a waveform graph. My aim is to plot that data wrt time, store it in a spreadsheet file and then again retrieve the waveform (data points) from the stored file. I am just confused how can I do this. I have a VI (trygraph4) which is working more or less fine, but it's not storing the data points in a proper format, so I think I won't be able to retrieve the waveform from this file. I have enabled the 'Append to file' input, otherwise it would ask to save the data again and again. Is there any other way to achieve this? Can someone plz help me out. 😞

0 Kudos
Message 1 of 2
(1,915 Views)

Hi meetrajesh,

 

First of all try to get your wires as straight as possible, it'll bite you later on when you add more code.

 

You also would want place the  export to spreadsheet file outside the loop, it only requires to be executed once. At this moment you write a new waveform to file each second. This would give waveforms with 1, 2, 3, 4, etc point instead of a single waveform of e.g. 100 points.

 

Typically you would want to look into using TDMS files (search examples) to write and read back waveforms and only use to to spreadsheet function to get the data in a format for further processing outside LabVIEW.

 

Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 2
(1,883 Views)