LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

front panel logging

I am trying to work out a way of saving the most recently entered setup parameters for an application so that the next time the application is run, those values are displayed.

The obvious way is to use an Invoke node and, after execution, make these values default however this application is to be made into an executable which means this won't be possible.

The way I have been investigating is using the front panel logging facilties to log the front panel data. This is great, aside from a few things as follows:

Is there a way to programmatically determine how many logs are present in a datalog file, as, for my application, I only want to access the last one?

OR

Is there a programmatic way of resetting the datalog file s
o that it only ever contains one datalog - ie. the most recent one? I have tried manually doing this by resetting the EOF position but had some problems. Any suggestions?
0 Kudos
Message 1 of 2
(2,748 Views)
RDK,
There are a few ways to do such.
In my area, we often use config files saved as .txt. Under Functions>File I/O palette, we use the Read File & Write File vi's.

Upon initial running of the main vi, we use a 3-step sequence: 1. Reading the last written configs (to set the front panel values). 2. Middle sequence (work-horse) 3. Writing sequence (upon the user closing the main vi with a booleon 'close' button', we do a final sequence of writing the last set values).

This is just one approach. The benefit of using text files is that they are easily viewable outside of Labview for our users who often want to see certain parameters, etc., but not through Labview, but with Wordpad, etc.

Good Luck, Doug
0 Kudos
Message 2 of 2
(2,748 Views)