LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I combine in one file (string and numeric data)?

Hi all.......................
I am doing a large program, so because there are a lot of numeric inputs, I want the user to input some numeric numbers and put name to this file in string control then save this file (instead of input the numbers everytime in the main program). After that when the user want to use these numbers he will open the file, so the numbers will appear in the numeric controls and the name of the file will appear in string indicator.
 
But how can I make this (numeric numbers and string) to be save in one file?
 
I tried to do it in attachment VI but it saved in two files!!!!!!!!!!
 
Please help me and modified in the same VI if you can.
Download All
0 Kudos
Message 1 of 4
(2,502 Views)
Hi rammo,
this should do it:
Write:

Read:

File content:


Greets, Dave

Message Edited by daveTW on 06-16-2006 02:50 AM

Greets, Dave
Download All
Message 2 of 4
(2,493 Views)

Are you trying to implement something allong the lines of a preference file; that is serialize some imput data to file and leter reload.  Using .ini files are a very easy and flexible approach since you can easily mix data types and furthermore the order and syntax as not tightly coupled to the semantic of the data.  XML is also an easy but slightly more complicated to implement in LV way to do this.  another method is using the string format and write characters to file vis.  The string format is like "%s/r%f/t%f/t%f/t%f/r", but again your reader and writers will be tightly coupled to the order so you would have to change both functions if the data format is altered (therefore more planning on your part).

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 4
(2,471 Views)
Thanks a lot.........................................
0 Kudos
Message 4 of 4
(2,456 Views)