キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

LabView doesn't find file

I've got a LabView Application, which uses two txt-files (read/write to it). if i run the apllication with the LabView-Software it works fine. but if i make an executable it returns the error-code nr.7 (could not find file / or ni-488 card doesn't exist). when it trys to open one of this files. when i made the executable so i added the txt-files as support-files...
i don't know what the reasen is, that causes this error.
thx for your help
0 件の賞賛
メッセージ1/8
4,740件の閲覧回数
How does your LabVIEW code call the .txt file? Is it a hardcoded path, or a relative path? I have a feeling that when you create an executable, it's either looking for a directory which doesn't exist (like the National Instruments directory which most likely doesn't exist on a PC without LabVIEW), or a relative path which is different on the target PC.

I've made executables which look for text files, so I can tell you that it can be done (both reading and writing).

Mark
0 件の賞賛
メッセージ2/8
4,740件の閲覧回数
So I used the VI that ctaches the path of a VI (the toplevel VI) and then i split of this path and add the name of my txt-files. so i generate the path... doesn't this VI work if you make an application?
0 件の賞賛
メッセージ5/8
4,740件の閲覧回数
54577533trh wrote:

> So I used the VI that ctaches the path of a VI (the toplevel VI) and
> then i split of this path and add the name of my txt-files. so i
> generate the path... doesn't this VI work if you make an application?
>

At least in the past build vi's path was as if it was in a llb.
So one has "strip path" one extra compared to non build vi's.

I usually place ini files one directory too up during development
process (if I use relativer path) to overcome this.

Juha
0 件の賞賛
メッセージ6/8
4,740件の閲覧回数
How are you finding the files? Is the directory hard wired? Support files will be placed in the DATA subdirectory below the directory that the program is in (unless you choose custom locations from the application builder). If you are looking in the current directory, you must split off 2 file/directory names from the .EXE but only 1 file/directory name from the main program in LabVIEW.

It might be easier for us to diagnose the problem if you include your code.

Rob
0 件の賞賛
メッセージ3/8
4,740件の閲覧回数
LabVIEWs App Builder creates a library inside the .EXE so you have to strip the path twice in the
the built version to get to your file. See attached "Path to File.VI".


> I've got a LabView Application, which uses two txt-files (read/write
> to it). if i run the apllication with the LabView-Software it works
> fine. but if i make an executable it returns the error-code nr.7
> (could not find file / or ni-488 card doesn't exist). when it trys to
> open one of this files. when i made the executable so i added the
> txt-files as support-files...
> i don't know what the reasen is, that causes this error.
> thx for your help
メッセージ4/8
4,740件の閲覧回数
thanx for this very helpful vi. now it works great
0 件の賞賛
メッセージ7/8
4,740件の閲覧回数
I tried running this .VI under LavView 5.1, and it would not open the file. What do I need to do, for this file to open?
0 件の賞賛
メッセージ8/8
4,740件の閲覧回数