06-13-2012 08:07 AM
Dear members,
I have the following problem: I have a sub-vi (a call library node) which initialize a certain device which needs in Input the name of a specific file (Note not the path of the file just a small name like "file1"). During the execution the main vi then Open or create a path (with the express VI File Dialog) . The initialization of the device occurs before the File dialog in the Block diagram.
At the first run of the program everything goes well. Then after a stop and a restart of the VI an error occurs which declares that is no possible to find the specific file.
I have checked: If I exclude the "File dialog " VI no errors appears. Additionally if I place the file in the directory I choose with the File Dialog I become other errors but the file can be found anyway.
It is like when I have closed the application and I restart it , it restarts from the location I have chosen with the file dialog, and the sub-vi starts to search the file in the start directory.
Could someone give me an hint how to solve this problem?
Many thanks
principiant
06-13-2012 08:46 AM
Hi Principiant
Attach your vi so that can help you much better.
06-13-2012 04:54 PM
Just a quick shot in the dark, but are you using a file path control to select the file? I You may need to set the file path as default. t would be helpful if you could attach your VI.
06-18-2012 04:32 AM
Hello and sorry for the dealy I was on a trip andI have forgotten to reply.
I attach here a model of my VI. As I said the first time it runs it finds everything.
Then I stop and re-satrt and he find the file filename no more.
The responsible is 100% the File Dialog since without it I cabn run everytime I want without problems.
My question is how to reset the path of the VI after the first run.
Thanks
Principiant
06-18-2012 08:07 AM
Unfortunately, you did not include the subVI, or provide details on how it works. You said it uses a CLFN. To do what? Based on your description of the problem it sounds like the issue is inside that subVI.
Also, do not create paths using string functions. That's what the Build Path function is for. Also, do not hard-code directory paths. Always use a file path control so the program can run from other accounts and other computers.