07-10-2007 08:47 AM
07-11-2007 08:20 PM
07-11-2007 11:05 PM
07-12-2007 06:24 AM - edited 07-12-2007 06:24 AM
" Have you tried to change the VI Search Path in Tools->Options->Paths->VI Search Paths (in drop down menu)?"
This is how I changed the default directory. (See photo) This allows me to use the function "default directory" to point to the path where information is stored. (see second photo) The application is an .exe created from a program written in labview with a top level and numerous lower level vi's. When the network goes down and the application (or labview on my base computer) is started, the default directory does not return a bad linkage or <not a path>. It reverts to the "original" default directory that was populated during initial loading of Labview on the computer. Since I need to know when this path is not the desired path, how can I prevent (or detect) when Labview changes the default directory back to the original.
Also, if the network comes back on-line and the apllication (or Labview on my base computer) is shutdown and restarted it reverts back to the desired default. So, when the application starts up, it is checking the path and if the path is not good, it is deciding on its own to select the "factory" default directory. I would like to be able to program the application to use a programmer controlled backup directory rather than the National Instruments controlled default directory, if the desired default directory has an invalid (temporarily non-existant) path.
Thanks,
Tom
Message Edited by Tom Haggerty on 07-12-2007 07:25 AM
Message Edited by Tom Haggerty on 07-12-2007 07:26 AM
07-12-2007 10:05 PM
07-13-2007 07:45 AM
Thanks for the info. Is there at least a way to tell if Labview had to revert to the original? And is there a way to reset the default once the desired directory comes back without shutting down.
I think this would be a good feature to add... Allow The default directory to change back to the desired when it's available. I don't like the idea that the operator must close and restart Labview in order to reset the default directory back to the desired path. I think this is a different situation than changing the desired path. I understand in order to change the desired path, one must restart Labview in order for the changes to take affect.... But if the desired path is not used by Labview because it is unavailable at the time of startup, I think the path should be settable (only back to the intended target) once the path becomes available.
I am trying to code how to handle when the network is down. I have written a way to detect that the network is unavailable and I pull the config and setup files I need from a backup location. I also store collected data in the backup location, however when the network comes back, I need to synchronize the backup location back to the desired storage location for the data files. And without being able to reset the desired path in Labview, I cannot do this automatically in the program... This makes the data collected at risk for being lost or overwritten.
Tom
07-13-2007 08:10 AM
07-13-2007 08:53 AM
Hind sight is 20/20
I know there are work arounds, but I programmed this way with an expectation as to how the program would work. Now that the program does something unexpected, I would like to know the reason and the ways I can correct it.
My thought originally was that if I had to change the location of the setup files for some reason, I could just change the default directory in options and I wouldn't have to rebuild the .exe and reload it everywhere it was used. It turns out that we have lost the ability to change the default directory on .exe's any way (in labview 😎 so the use of the default directory in the way that I am using it is not as desirable as it once was.
Tom
07-13-2007 02:20 PM
07-16-2007 07:50 AM