08-21-2018 02:38 AM
Hi All,
I can able to read the data in the file using file dialog box in main vi but when i build the exe the data is flowing to 2nd case and giving the error message in that case.
Please find the code snippet
08-21-2018 02:50 AM
Hi chaituc,
please attach VIs instead of (blurry) images - they are much better to debug using LabVIEW!
1. Use BuildPath instead of string functions to build a path!
2. Please output the file path used for reading the file in case of an error: you really need to check for valid file paths…
3. Please output the error number in case of an error: how will you know WHICH error occured?
08-21-2018 04:15 AM
Please find the VI attached
08-21-2018 04:28 AM
08-21-2018 04:47 AM
Hi,
When i am running the VI it can able to read the file without error and going to "No Error" case but after converting to EXE, it is going to "Error" case and displaying the load failed.
Best Regards,
Chaitanya.
08-21-2018 05:34 AM
08-21-2018 06:45 AM
This sounds like the classical error of VI vs exe-path. If your file is relative to your VI, it Changes 1 level when compiled as the .exe is considered a level. Do a Dialog box which shows your path and you'll see the difference from the VI to the exe.
/Y
08-21-2018 08:04 AM
I use these
08-21-2018 08:34 AM
@Yamaeda ha scritto:
This sounds like the classical error of VI vs exe-path. If your file is relative to your VI, it Changes 1 level when compiled as the .exe is considered a level. Do a Dialog box which shows your path and you'll see the difference from the VI to the exe.
/Y
There is a File Dialog express vi to choose the file, in principle there is no room for a mistake, unless the user chooses an ill-formatted file.
Moreover, the Application Directory vi consistently returns either the disk directory where the executable file is located orr the directory of the .lvproj file when running from inside LabVIEW. The "classical" error I also had experience with many times should not be an issue anymore.
08-21-2018 04:28 PM
Look up the Help documentation for Application Directory. Notice it is different for Applications (.exe) than for VIs in the Development Environment (and different for developing in a Project and "in the raw"). So if you have a different Path in one instance, you might expect an error ...
Bob Schor