06-22-2021 01:56 PM
Hey all,
I'm having a very frustrating problem.
I have a .vi that runs a spectrometer and selects it through a config file. The .vi works great, but once I build an executable it can not find the spectrometer.
I'm at a loss!
Thanks in advance,
Maria
06-22-2021 04:13 PM
Can it find the config file? In the development environment, the application directory is wherever the .lvproj is located. In the runtime environment, it is wherever the .exe is located. So, make sure your "config.txt" file is located in the same folder as your executable, since you build the config file path using <application directory>\config.txt
06-22-2021 04:15 PM
Hey Gregory,
Good tip, i've fallen for that before but not this time!
I also have the .dll's in the "always include" preferences.
Maria
06-22-2021 04:20 PM - edited 06-22-2021 04:31 PM
I am not sure what will resolve your issue but that code needs some serious work. The block diagram is WAY too big and there are way too many local variables. I would also eliminate all of the stacked sequences and use a state machine. It was very difficult to try to look through the code to find your issue given the size of the bock diagram. I generally give up once I have to scroll in both the X and Y dimensions.
06-22-2021 04:21 PM
You're not wrong!
Thanks for trying.
06-27-2021 05:25 AM
You talk about DLLs in plural but only attached one. Did you just always include all of them causing LabVIEW to move them into the data subdirectory or did you make sure that they end up in the executable directory itself rather than the data subdirectory?
The DLLs that your VIs reference directly can be in any subdirectory you want but the DLLs those DLLs reference must be in very specific directories for Windows to find them. LabVIEW doesn’t know about them and Windows doesn’t know about the data subdirectory!