01-06-2014 09:36 AM
Thanks in advance for any help:
I have an executable created which runs perfectly now, except the log file. Every time the exe is closed, it loses its binding to the log file, and you can't re-bind to the same file when you re-open. Ideally the exe would be bound to a logfile the same way the labview program would, so that when you close and reopen and run again, it would log the results at the end of the existing logfile instead of prompting for a new one.
Is there a setting in the .exe application build specs that I have missed? I tried in "Advanced" > "Generate build log file", but this still does not work as intended.
Is there a way to make it work the way I want it to?
Thanks,
Justin
01-06-2014 09:40 AM
First the "Generate Build Log file adds a entry to a log whenever you build the build spec. That won't do what you want.
Use a configuration file to store the path of your application log file
01-06-2014 10:01 AM
I'm attempting to add the information to the configuration file that would indicate where the logfile is found. In researching I am finding that most of the help available relates to Configuration File VIs and not to building the configuration file manually.
My config file now just has:
server.ole.enabled=True
server.tcp.serviceName="My Computer/VI Server"
server.vi.propertiesEnabled=True
WebServer.TcpAccess="c+*"
WebServer.ViAccess="+*"
DebugServerEnabled=False
DebugServerWaitOnLaunch=False
Is there a good resource for how to work with config files, or can you provide the syntax for a line in the config file that defines the location of the logfile?
Thanks,
Justin
01-06-2014 10:07 AM
@g0dam0ng1n53ct5 wrote:
Is there a good resource for how to work with config files, or can you provide the syntax for a line in the config file that defines the location of the logfile?
Thanks,
Justin
Well Yes, Did you look in the help and peek at the examples?
01-06-2014 10:29 AM
Yes
01-06-2014 12:10 PM
As I have already created a fairly complex .vi and debugged it and have been using it for a while, suffice it to say that I am familiar with using help files and searching for more information. The fact that I have posted the question here should make it clear that I do not have, or understand how to find, the answer to the question that I am asking.
With reference to the suggestion to use configuration files, it appears to me that there are in fact no "established" key names that labview will use without other code. It appears to me that if I put the path to the log file in the config file, then I have to use the Config File VIs to read that key and programatically define the log file to use. Even if I do that, it seems that it will try to re-link to that log file every time the program runs or is opened, and then it will give the error that the log file refers to an existing directory, LLB, or non-datalog file. It appears to me that this is the wrong answer, so I have to go back to my original question:
Is there a way to permanently link a log file to an executable in the same way that the log file was linked to the VI.
In other words: If I don't make an .exe from the VI, then the data log binding stays in place when you save and close, and you can then always retrieve past test results no matter how many times the file is opened. When I make an exe, that log file binding does NOT carry over between closing the program and opening it again.
Is there a way to fix this? The workaround right now is to not make an .exe from the .vi.
01-06-2014 01:31 PM
There is probably a way to fix it but we need to see the code you are using. Do you use a static file name that points to a folder that doesn't exist on the machine where your executable runs? You'll always be asked for a file name if LabVIEW can't find the file name you provide.