LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ascii characters in the beginin of each data indexed part. How can i fix it?

My data are indexed (coming out from For loop structure) and the saved file has some ascii characters in the beginin of each indexed part. For example,

#@@% 1,1 2,3
3,4 5,4
5,6 7,6 (end of first acquisition)
#$% 2,3 7,9 (beginin of second )
3,1 4,5
5,4 6,4

The file is a sequence of arrays that form, all together, a single and bigger array. If i acquire data, say 10 times, and save to file, the problem will be repeated 10 times, each one to each acquisition. I attached the program (Labview 6.0). You can put some random numbers just to make it works. Thank you.
0 Kudos
Message 1 of 4
(2,746 Views)
Hello
I tested your vi under LV 7 and it runs fine. I think you are reading your file as a string, and you recorded it as "spreadsheet string" ( the format is different) . That means you have extra characters for spreadsheet info like tabs, etc. If you read your data using "read from spreadsheet.vi" your arrays of data should be ok.

Hope it helps you.
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 2 of 4
(2,746 Views)
Hello again
You are saving your data as 1d arrays of string.
Take a look at "LabView data storage". Arrays are saved whith a header containing info about their demensions.

Hope it helps.

Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 3 of 4
(2,746 Views)
I would suggest saving your data in another way. Right now you are changing the array output from each iteration to a spreadsheet string. Then you are writing an array of strings to the data to file. If you wish to save the data in spreadsheet format, you need to build the array using shift registers in the main while loop. Then, after execution, you should use "Write Array to Spreadsheet file.vi" to save the data.
Another option is to save data to the file in each iteration of the loop. See the shipping example: Write to Text File.vi
This shipping example can be found by opening LabVIEW and browsing to Help>>Find Example>>Search>>Spreadsheet>>Write to Text File.vi

-Erik
0 Kudos
Message 4 of 4
(2,746 Views)