LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delet datalog file

Solved!
Go to solution
I've been experimenting with the auto front panel logging facility, I have no trouble in logging data to a file in a vi and retrieving it BUT I can't seem to be able to delete the log file from the top level vi.  I get the File already open error message, but i don't seem to be able to close the file....I suspect there's a very simple answer! 
0 Kudos
Message 1 of 11
(3,938 Views)
You did not include the VI with the project file. There is nothing to open here.
Tim
GHSP
0 Kudos
Message 2 of 11
(3,937 Views)
...here are the vi's
Download All
0 Kudos
Message 3 of 11
(3,930 Views)

I'm interested in this function, but I can't open your VIs because I run LV8.5: was it introduced in LV2009?

Thanks

0 Kudos
Message 4 of 11
(3,916 Views)
I'm not sure when the feature was added I've just  gone straight from 6.2 to 9.... I've attached the vi's saved in 8.5 format....let me know if you can open them.
Download All
0 Kudos
Message 5 of 11
(3,905 Views)

I can open them now, thanks a lot.

Unfortunately, after updating the file paths, I get the same error as you...

FYI, in order to log front panel data, I usually refer to this method proposed by dippi:

http://forums.ni.com/ni/board/message?board.id=170&thread.id=378313&view=by_date_ascending&page=1

Message Edited by xdaf on 01-11-2010 09:43 AM
0 Kudos
Message 6 of 11
(3,869 Views)

Well, I'm not an expert on autolog function, so I hope I'm not writing nonsense...

But the autolog.atfinish function should log data AFTER the vi has finished executing. So... you can't delete the file DURING vi execution, because of course you're going to get a "vi already open" error.

Just an idea...

0 Kudos
Message 7 of 11
(3,867 Views)

The second metod is very similar to what I have used in the past and works well. 

 

re the datalog, what you say sounds sesnisble - maybe the route is therefore to call the vi with a server and then close it once used to free up the file.  I haven't tried this before so if I get time it'll be an interesting exercise...

 

Thanks for taking a look.

0 Kudos
Message 8 of 11
(3,857 Views)

Here's a version using a vi server - I thought this might help with the datalog file deletion by removing the vi from memory after use....it doesn't.

0 Kudos
Message 9 of 11
(3,851 Views)
Solution
Accepted by steveADI

...and here's my final vi's

 

Getdatalogs3.vi: programmatically opens simplesine.vi, sets logging on and sets the log file name, calls the vi in hidden mode, runs the vi and then closes the reflog.vi is then also called programatically which in turn calls simplesine.vi in database mode to get the log file data.

 

log.vi could be replaced with a vi to translate the log file data but it's already done with database function so why bother...

 

 

Download All
0 Kudos
Message 10 of 11
(3,839 Views)