LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable can't find spectrometer but VI can

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 

0 Kudos
Message 1 of 6
(1,156 Views)

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

0 Kudos
Message 2 of 6
(1,118 Views)

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 

0 Kudos
Message 3 of 6
(1,112 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 6
(1,109 Views)

You're not wrong! 

Thanks for trying. 

0 Kudos
Message 5 of 6
(1,100 Views)

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!

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(1,054 Views)