01-19-2024 03:59 AM
Good day,
I am trying to compile a vi with fuzzy logic, but the .exe throws Error 7:
Open/Create/Replace File in NI_Fuzzy_Logic_API.lvlib:FL Load Fuzzy System.vi->pump control4.vi<APPEND>
F:\Data\Labview\examples\builds\pump control4\pump control4\pump control4.exe\Water_PID_6.fs
how does it look for a file named xyz.exe?
Solved! Go to Solution.
01-19-2024 04:07 AM - edited 01-19-2024 04:10 AM
Hi Steffen,
please use ZIP to attach ZIP files. (RAR is proprietary, while ZIP is available with almost every OS nowadays.)
@Steffen01 wrote:
I am trying to compile a vi with fuzzy logic, but the .exe throws Error 7:
Open/Create/Replace File in NI_Fuzzy_Logic_API.lvlib:FL Load Fuzzy System.vi->pump control4.vi<APPEND>
F:\Data\Labview\examples\builds\pump control4\pump control4\pump control4.exe\Water_PID_6.fs
how does it look for a file named xyz.exe?
Unfortunately you use a recent LabVIEW version, which I cannot open.
But I can look into your lvproj file and see your Build spec. You:
I don't understand why you wonder about your own executable searching for the needed files in places defined by you?
01-19-2024 04:59 AM
but how can it be within some exe
F:\Data\Labview\examples\Water fuzzy 4\build\pump control4.exe\Water_PID_6.fs
it works in testing, .fs file is in the same folder as the vi, and everything. So why does it not find it when compiled? I saved as LV15 and zip
01-19-2024 05:52 AM - edited 01-19-2024 05:55 AM
Hi Steffen,
@Steffen01 wrote:
but how can it be within some exe
Because YOU have programmed it this way!
See this:
You read the path of the current VI: this will be YourExe.exe\Your.vi as the VI will be located within your executable. Then you strip the VI filename, so "stripped path" is the filepath of the executable. Then you append the filename of the FS file and "appended path" will be YourExe.exe\Water_PID_6.fs - exactly as you programmed your VI...
The usual recommendation is to use the ApplicationFolder constant and place the FS file in a data subfolder. This will work also in the executable as the AppBuilder places additional files also in a "data" subfolder (by default)!
01-19-2024 07:10 PM
ok, that works. Thanks!