LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save data while the file is open

Solved!
Go to solution

This question has probably been asked before but I truly can not find a solutions.

 

Anyways; the problem is simple, I am using write to mesaurment file (.lvm) and it records just fine, but when I open the file (while th vi is still runing) it doesn't continue saving data anymore. How do I solve this problem?

 

Thanks, 

0 Kudos
Message 1 of 6
(3,125 Views)
Solution
Accepted by topic author Roddy

A man walks into a doctor's office and the doctor says "OK, what's wrong". The man says "Well, doc, every time I raise my arm it hurts." The doctor says "Stop raising your arm. NEXT!".

 

Problem solved? Smiley Very Happy   (Hey, it's Friday.)

 

OK, how are you opening the file? .lvm files are simple text files so if you open them with an application that caches the information you should not be encountering a problem. 

Message 2 of 6
(3,109 Views)

Hi Roddy,

 

When you say that it doesn't continue saving data anymore, do you mean that the file does not continue to populate data while the file is open? If you close the file and then reopen it, is the data there?

 

I ran a quick test using the following code:

 

write_measurement_file.png

 

When I opened the file while the VI is running (I just used Notepad to open it), I get the data up until I opened the file. If I close it, then I get all the data up until I opened the file the second time. Is this not the behavior you are seeing?

 

Thank you for choosing National Instruments.

 

Aaron

National Instruments

Applications Engineer

http://www.ni.com/support 

0 Kudos
Message 3 of 6
(3,069 Views)
I used to open them with notepad and I never had a problem. The I began using excel and the problem appeared; so I tried notepad once again and the problem persist...
0 Kudos
Message 4 of 6
(3,037 Views)
I don't know why the problem would persist by going back to notepad.  But Excel is a program that will put a lock on the file which will prevent other programs from opening the file.
0 Kudos
Message 5 of 6
(3,017 Views)

Hi Roddy,

 

If you create a brand new VI using the code that I posted earlier and then open and close the .lvm file using Notepad while the VI is running, do you still see this problem? Or does the file update with new information every time you open the file?

 

Thank you for choosing National Instruments.

 

Aaron Pena

National Instruments

Applications Engineer

http://www.ni.com/support

0 Kudos
Message 6 of 6
(2,999 Views)