LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Works fine as a VI, but when displays error as an executable

Hi All
 
I am Kiran using LV7.1 FDS
 
I have a program that works fine as a VI, but when I build it and tried to run it as an executable on a deployment machine, I receive the following error:

Error 1 occurred at Write File in datalog.vi->main vi.vi
Possible reason(s):
LabVIEW:  An input parameter is invalid.
NI-488:  Command requires GPIB Controller to be Controller in Charge.
 
The thing is that i am trying open or create a file in the folder where the datalog.vi is stored using Current VI's path icon. It is working when i am trying to run it as VI.But when i run it as exe the above error is displayed.
 
Plz suggest
 
Thanks and Regards
 Kiran
0 Kudos
Message 1 of 4
(2,288 Views)
Kiran,
 
I think the problem is lying in the way youu sre using the Current VI path:
 
While running your source code it may work fine, but if your EXE is in another location, then the current VI path gives the path other than the EXE path and this will generate the error.
 
-Krishna
0 Kudos
Message 3 of 4
(2,252 Views)

Kiran,

You can always use the attached VI to find the Current Directory path from where your application is running [whether as a VI or an EXE].

The VI is in LV 7.1...

- Partha ( CLD until Oct 2024 🙂 )
Message 4 of 4
(2,243 Views)