LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving and then populating the vi when loading

Hello,

what i have is a vi that if i seclect a boolean control to be true then an array value will go into a string indicator.  the boolean controls that are selected are then put into a boolean array.  what i would like to do is save the the string indicator and the boolean array and then when i try to load the saved file it will populate the indicatiors again.  can someone show me how to do this.  also, how do you convert a boolean array to an xml file.  thank you

i attaced a vi that is simple that creates the string indicatior and boolean array.
0 Kudos
Message 1 of 7
(3,235 Views)

Could not open your VI as i do not have labVIEW 8.x installed on my system

But this is what I understood.

You want to save a boolean array ( Which corresponding to states of the controls) and a string array ( is it??)

What I suggest is , bundle them into a cluster, write to a file.

You can always read that file ( Note: define the byte stream type to be the same as what you write into the file), unbundle these arays and use it to update your Indicators.

look at attached Pic

Message Edited by devchander on 08-30-2006 10:49 PM

Message Edited by devchander on 08-30-2006 10:52 PM

Download All
Message 2 of 7
(3,218 Views)
thank you that helps
0 Kudos
Message 3 of 7
(3,197 Views)

And thanks for those Stars.

Any more doubts, do get backSmiley Wink

0 Kudos
Message 4 of 7
(3,178 Views)
Hi dev
is there any way to use a byte stream file when XML file required,
 
I need help in writing byte stream file in lv 8.0
 
what is major difference between byte stream file and datalog file
 
0 Kudos
Message 5 of 7
(3,173 Views)

A Byte stream File that stores data as a sequence of ASCII characters or bytes

Whereas a Datalog File that stores data as a sequence of records of a single, arbitrary data type that you specify when you create the file.

Although all the records in a datalog file must be a single type, that type can be complex.

For example, you can specify that each record is a cluster that contains a string, a number, and an array ( as shown in the Pic I have attached in my pevious post)

 

I do not have labVIEW 8.0 or ablove on my system.

So, I guess someone else might be able to suggest you bettter in that regard  Smiley Happy

0 Kudos
Message 6 of 7
(3,164 Views)
Hi Anu,
 
Datalog files are designed for storing a list of records to a file. Each record is represented by a cluster, and can contain multiple pieces of data with any data type. They are basically binary files, with different API than other binary files. You need to specifically use the Datalog VIs to read and write arrays of clusters to Datalog files. In order to access the contents of a datlog file, you must know the contents of the cluster type stored in the file.
You can checkout the "Write Datafile File Example.vi" and other text and binary file formats in LabVIEW example finder.

Tunde A.
0 Kudos
Message 7 of 7
(3,142 Views)