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: 

Saving data as ascii/or something readable!!

Solved!
Go to solution

Hi, I have been using the attached code to operate/collect data from a GC system and it used to be saved as a text file which I opened and transferred the data to Excel or Origin Lab. For some reason the format it is written to file has changed, and if I try importing it directly to Origin or something as ascii, it now says the ascii data is not in readable columns. If I try opening it in something like text pad it just displays as lines of symbols, maybe ansii?

I have absolutely no idea what i may have changed to make this happen and how to get it back to a "readable" format, any help would be greatly appreciated!

Thanks, Kelly 

0 Kudos
Message 1 of 7
(2,709 Views)

Well, this is very easy. Simply go to your backups and use the difference tool to see what you changed. 😄

 

Instead of writing the cluster in binary, format it as a line of text before appending. See how far you get. 🙂

Message 2 of 7
(2,705 Views)

Hi, I have tried both of your suggestions. the revisions/modifications does not show anything and when I try formatting the string that does allow the data to display in a basic programme as numbers, but rather than having the data in 2 columns, there are thousands of columns, on 2 rows. Also the data used to be saved as a text file and now it isn't saving as a text file at all. I think the data is now in ASCII format, but still "unusable" as spreadsheet pacakges can't do anything with it because of the odd column/row format. I have no idea at all where or how I can change something like that?

If you have any idea i'd be very grateful. this is not my labview code, but rather an existing bit of code which has been used for a while on a GC which i have just started using, and somehow it has messed up. there are a few users of this instrument, and nobody has any idea how this happened or how to fix it!

Download All
0 Kudos
Message 3 of 7
(2,679 Views)

This seems quite trivial. Format the two values (time and averages) as a simple string, with a tab in the middle and a newline at the end. Then append such a string to the existing file at each iteration.

 

I no longer have LabVIEW 7.0, but here's an image (note that I set the format string to \-codes display so the tab a newline are easily visible). You should of course adapt the format to your exact requirements. Do you have a datafile formatted with the original code? can you show a few lines from it?

 

Message Edited by altenbach on 12-05-2008 01:45 PM
Message 4 of 7
(2,675 Views)

Thanks so much, why is it always the small problems that cause the biggest headaches!

I will try to replicate what you just suggested. I have attached a notepad file of the how the data used to be displayed.

thanks so much for your help, I would never figure this out with the couple of labview text books I have!

Notice how the file used to be saved as .txt too, and now it is not?

0 Kudos
Message 5 of 7
(2,667 Views)
Solution
Accepted by topic author Khume

OK, convert your timestamp to DBL and use the following format (make sure to set the format diagram constant to \-codes display first!):

 

%.5e\t%.5e\n

Message 6 of 7
(2,663 Views)

Total Genius, thank you so much, I can now finish my week on a happy note!!

0 Kudos
Message 7 of 7
(2,654 Views)