LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting data, optional saving, order of operations

I'm sure for you seasoned pros this will be a no-brainer but it's giving me a fair bit of grief.

 

The Situation

I'd like to collect data (voltage, voltage, current, pressure, pressure), plot it all continuously on a graph, then allow the user to review the data on the graph, then save it to a desired file path or discard it.  That order is important.

 

The Problem

I created a VI (attached) that can function with the wrong order of operations (Run -> prompt for path -> begin logging to TDMS -> graph data live -> end after certain time passes) but can't seem to create a VI that will use the order of operations requested by my users.  I've tried pulling the data out of the while loop and writing it to a file or spreadsheet, but I either get errors due to missing data, don't know how to properly convert the data line to plot it, or get an empty data file.

 

Any help is appreciated!

0 Kudos
Message 1 of 6
(2,526 Views)

How much data are you collecting?  If collecting a lot of data, then it doesn't make any sense to change from what you are doing.  If it is just a short run, then you could save your data in arrays and then write to the TDMS file manually.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(2,509 Views)

@crossrulz wrote:

How much data are you collecting?  


Roughly 10 seconds worth at 1,000hz from 5 channels.  Call it 50,000 data points.

 


@crossrulz wrote:

If it is just a short run, then you could save your data in arrays and then write to the TDMS file manually.


Not sure if this counts as a short run.  If it does could you baby-step me through the data->array conversion?

0 Kudos
Message 3 of 6
(2,496 Views)

I would read that data as waveforms.  You can then use Append Waveforms.vi (Waveform->Analog Waveform palette) to keep adding your new data to the old.  Keep the wavforms in a shift register.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(2,476 Views)

Assuming I'm looking at this correctly, I don't have a problem of data missing from my waveform (I can run the program and see all 10 seconds of collected data in my plot).  The problem lies in taking it from the waveform and putting it into a TDMS, spreadsheet or text file after it's collected.

 

Edit: It's possible I'm missing an underlying concept of data buffering here.  I'm working under the assumption that because the 10 seconds of data is all visible to me on my plot that it has been stored somewhere and I simply need to retrieve it.  Maybe that's wrong?

0 Kudos
Message 5 of 6
(2,470 Views)

Sounds like you are using a chart.  Use a graph instead.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(2,429 Views)