LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Logging the information from multiple tables to a txt file

Solved!
Go to solution

To All,

 

I am working in a bench test set in which I test different devices via serial. For each of them, I have a log table. Is there a way I could log all those tables in a singe text file? 

 

Thank you,

Cosmica 

0 Kudos
Message 1 of 6
(2,652 Views)
Solution
Accepted by topic author Cosmica
Of course there is. Have you looked through the functions in the File I/O palette? For example, the Write to Spreadsheet File or the Write Measurement File, depending on the format of your data.
Message 2 of 6
(2,647 Views)

Hey cosmica,

 

Yea as Smercurio said, you can use the file I/O VIs to do your task. The advantage of the write to spreadsheet file VIis that you can set the delimiter (the character that separates data points in the same row) as a tab. This means that even if you don't open the file with a spreadsheet program like excel then notepad could still be used to open your file. Regardless of the extention that you choose to save your spreadsheet as, Excel can import it. You just select which delimiter you chose when you created the file (I recommended tab).

 

Please let us know how this worked out for you.

Message Edited by rex1030 on 05-14-2009 02:28 PM
---------------------------------
[will work for kudos]
Message 3 of 6
(2,644 Views)

Smercurio and Rex1030,

 

Thank you for your solution, it does work!

 

Now, I have another question, I want to generate different names files for each log.

For instance I want to have c:\bench\(generate date)\datalog_(number)

if I did 10 test, then I would like to have 10 datalog files.

 

I did try something like this, but I get error in the path, it would not generate the file name.

http://forums.ni.com/ni/board/message?board.id=170&message.id=258603&query.id=321663#M258603

 

Thank you for your help!

 

Cosmica

0 Kudos
Message 4 of 6
(2,624 Views)
A better method is to use the Build Path to create your path (the example I gave at that time was very specific to Windows). Thus, you could do something like this:
0 Kudos
Message 5 of 6
(2,608 Views)

Thank you Smercurio!

 

It work perfectly!

 

-Cosmica

0 Kudos
Message 6 of 6
(2,588 Views)