From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary files and stand alone builds

Solved!
Go to solution

Hello: I have an application running in LabView 2014 that creates and reads multiple 3D arrays (25 X 8 X6) to and from binary files. Works fine in the Development Environment. Problem is that now I need to create a Build (stand alone ) for the client. Binary File functions do not seem to work. Any help or guidance would be apprciated.

0 Kudos
Message 1 of 22
(3,845 Views)

What errors or problems come up when you try to do this? Creating a debuggable executable might help you figure out exactly what isn't working.

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 22
(3,839 Views)

You likely have pathing issues.  Take Jacobson's advice and see what error pops up

0 Kudos
Message 3 of 22
(3,833 Views)
Solution
Accepted by topic author Dboucher
Yes, a very common mistake is to save files with a path that is defined relative to the VI that is saving the file. A more portable solution for non-LabVIEW files is to define paths relative to the output of the Application Directory function.

In the development environment it returns the path to where the project file is located. In the executable it returns the path to where the executable is located.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 22
(3,823 Views)

I've had no problem running exactly the same code in Development and Build mode and reading and writing multiple Binary Files.  As others have noted, however, the file paths are specified by absolute paths (the User is asked to choose a Folder for saving the data using a (hmm, what do you call the file/folder-like browser?) thing as the starting folder, and building the file name according to some rules (such as the (unique) name of the Experiment, possibly made unique by encoding a File Number, a Date/Time string, etc.  The point is that regardless of where the code lives, the total data file name is not related to the file location of the code).

 

Bob Schor

0 Kudos
Message 5 of 22
(3,812 Views)

@Dboucher wrote:

Hello: I have an application running in LabView 2014 that creates and reads multiple 3D arrays (25 X 8 X6) to and from binary files. Works fine in the Development Environment. Problem is that now I need to create a Build (stand alone ) for the client. Binary File functions do not seem to work. Any help or guidance would be apprciated.


What do you mean by "do not seem to work"?

Do you get an error? If so, what does it say?

Do they give different results to what is expected?

Do they just not run at all? If not, what about the rest of the code?

0 Kudos
Message 6 of 22
(3,784 Views)

Thanks for all of the rapid responses. In short, I use the Open/Create/Replace command to create the binary files during an initialization routine. These files contain the 3 D arrays of data, which are then read and modified during the main .vi.  In the Development enviornment all is fine and the system runs well. In the stand alone, the system runs through the initiailization but the binary files are not created, so later reads do not happen

0 Kudos
Message 7 of 22
(3,769 Views)

Try running the executable as an administrator

0 Kudos
Message 8 of 22
(3,763 Views)
What do you mean by, "do not happen"? We are back to the first question you were asked. What errors are generated?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 9 of 22
(3,758 Views)

No errors thrown. When I halt the main .vi execution during the initialization stage, the binary files are nowhere to be found. If I let the program run to completeion. The files appear on the drive. Is it possible that the binary files are created in virtual memory during the initialize routine and only saved to disk after the program completes its final write to file (binary write and close).

0 Kudos
Message 10 of 22
(3,746 Views)