LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fuzzy logic built file cannot fimd fs file

Solved!
Go to solution

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?

 

0 Kudos
Message 1 of 5
(783 Views)

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:

  • set the name of the executable so the name should be clear
  • you include the fs file in the BuildSpec, so it should be found next to your executable
  • you (probably) use the "FL Load Fuzzy System" function with a filepath, so you can determine the location of your fs file
  • do you use any filepath  constant like CurrentVIPath or ApplicationDirectory?

I don't understand why you wonder about your own executable searching for the needed files in places defined by you?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(777 Views)

but how can it be within some exe

Steffen01_0-1705661656461.png

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

0 Kudos
Message 3 of 5
(750 Views)
Solution
Accepted by Steffen01

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)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(730 Views)

Steffen01_0-1705712987370.pngSteffen01_1-1705713035128.png

ok, that works. Thanks!

0 Kudos
Message 5 of 5
(706 Views)