LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Couple of questions regarding displaying and saving data

Hi, I am using the write to measurement file vi to record realtime data, and I noticed that once I opened up the file it was saving to while the program was running that the data no longer saved there anymore. I was wondering if there was a way around this, because I would like to check the raw data in the file as the program runs. 

 

Also, I amplotting my real time data on a graph vs a time stamp, and everytime the while loop that it is in stops, the graph clears, then starts plotting again once the while loop begins (data starts coming in). I was wondering how to "freeze" this graph once the loop stops so I can still see the data, and have it continue plotting once the loop starts again, i.e. when more data comes in. 

0 Kudos
Message 1 of 11
(2,842 Views)

I'd have to see your code to give any real advice about your graph.

 

But as far as looking at your file, it really depends on the editor you are using.  Notepad locks the file and therefore blocks anything else from editing it.  This will give you an error (I don't remember the error code anymore).  If you use Ultra Edit, then you can look at the data and have LabVIEW write to it as well.


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 11
(2,830 Views)

Thank you.  I forgot to mention that I am saving as a .lvm file. I am currently using Excel to open it and would like to continue using that. Even when I close the lvm file after opening, the data stops saving there. 

 

I attached the loop that contains the graph and reads in the data.

0 Kudos
Message 3 of 11
(2,821 Views)

Anyone have any suggestions as to how to freeze the graph when the loop exits? I cannot seem to find a work-around to this.

Also, I woud like to keep using Excel to open the lvm file, how do I keep the file unlocked after opening while the program is still running?

0 Kudos
Message 4 of 11
(2,779 Views)

@baseball07 wrote:

Anyone have any suggestions as to how to freeze the graph when the loop exits? I cannot seem to find a work-around to this.

Also, I woud like to keep using Excel to open the lvm file, how do I keep the file unlocked after opening while the program is still running?


Your graph (assuming it is the unlabeled indicator) should not be written to anymore once that loop stops.  Where's the code that clears the graph?  That is the part you need to take care of.

 

Instead of using LVM, use TDMS.  It is a more open file format and I believe the files will be smaller in size as well.  Excel can even open them.  I don't know if it will solve your "I can't write while looking at the data" problem.  But it just might.


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 5 of 11
(2,761 Views)

Thank you, however I don't think I understand what you are saying. The data is cleared from the graph once the loop exits, but I want it to remain displayed, then continue plotting once the loop starts again and data comes in.

0 Kudos
Message 6 of 11
(2,755 Views)

The graph is being cleared by something outside of that loop.  Is there a property node or local variable writing to that graph as well?


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 7 of 11
(2,751 Views)

I don't think so, here is the rest of the vi, there is not much outside that loop.

0 Kudos
Message 8 of 11
(2,748 Views)

Ah.  Now it's obvious.  You are starting the next set of acquisition immediately after stopping.  How are you stopping the outer-most loop?  You really should not be using the Abort button to stop LabVIEW applications.  You need to make sure everything is closed down properly instead of just aborting and leaving things in who-knows-what state.

 

The simplest solution would be to just remove the outer loop and just leave the code inside.  Then each time you run the VI, you perform a single acquisition.


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 9 of 11
(2,742 Views)

And you have a nice little Rube Goldberg in the middle of your code.  Where you are converting into a 16 bit word, you could just use Type Cast on the string coming from the read to convert to a U16.


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
Message 10 of 11
(2,739 Views)