05-16-2013 03:50 PM
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.
05-16-2013 04:55 PM
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.
05-16-2013 06:25 PM
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.
05-24-2013 09:55 PM
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?
05-25-2013 06:39 AM
@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.
05-25-2013 07:17 AM
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.
05-25-2013 07:23 AM
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?
05-25-2013 07:36 AM
I don't think so, here is the rest of the vi, there is not much outside that loop.
05-25-2013 08:01 AM
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.
05-25-2013 08:05 AM - edited 05-25-2013 08:05 AM
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.