LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save a cluster in a file

Hi! i'm trying to save a file with some data of my application. This Data is a cluster of some boolean data, some i32 data, some array of i32 and some string data. I use OPEN_CREATE_REPLACE File.vi, WRITE FILE and CLOSE FILE to create and replace file and works fine. But when i create the EXE file, this sistem will not work anymore. why? (If i create a more simple cluster i.e. a boolean data+ a i32 data, this work)

Thank you very much to anyone that try to respond to my question.
Andrea
0 Kudos
Message 1 of 4
(3,126 Views)
this should work.
Make sure that :
- When building an appplication, the location of your files may change (one more "strip path"-function needed)
-Another way : first use "Flatten to string" function, and then write the string". After reading the string, you can use the "Unflatten from string function".
0 Kudos
Message 2 of 4
(3,126 Views)
Hi Andrea,

I am curious to know what does not work when you are trying to write the complex datatype to file. Does the exe give you errors? Are these errors related to File I/O?

There are a few examples that ship with LabVIEW that may be very useful to you. Please look at Help >> Find Examples >> Fundamentals >> File Input and Output >> Write Datalog File Example. If this one works for you, you can use the Read Datalog File Example to read the data back.

Feroz
Applications Engineer
National Intruments
0 Kudos
Message 3 of 4
(3,126 Views)
Hi Andrea,

I am curious to know what does not work when you are trying to write the complex datatype to file. Does the exe give you errors? Are these errors related to File I/O?

There are a few examples that ship with LabVIEW that may be very useful to you. Please look at Help >> Find Examples >> Fundamentals >> File Input and Output >> Write Datalog File Example. If this one works for you, you can use the Read Datalog File Example to read the data back.

Feroz
Applications Engineer
National Intruments
0 Kudos
Message 4 of 4
(3,126 Views)