Digital I/O

Showing results for 
Search instead for 
Did you mean: 

Need automatic timestamp collumn, collumn headers, and title in tabdelineate file



Simply, I am creating 8 collumns of data from a 8 channels on a DAQ and saving them to a tab delineated transposed file.  I need to creat a preceding 9th collumn that is contains timestamps of every row.  I also need to creat collumn headers and a title above the collumns.  I wasn't sure how to search for this, but from what I did search, I couldn't find anything.  If there is something that explains this well, please let me know.  I am just learning this program for my internship and need to learn it very fast to get up to speed with the group.



Thank you!



0 Kudos
Message 1 of 12

Hi Braden,


Thanks for the post and I hope your well today.


When using a DAQ you should be able to acquire a waveform. The wavefrom data type includes timing and the data.  Then you could just include as another signal for when you write to the file. Have you got any example code you could post? - I would like to know more about how your saving to file to help answer your question.


However, some links:


How Do I Include a Time Stamp in a File Using the Write To Measurement

Writes time stamp and headers as a comment into the file. 


Hope this helps, and I look forward to hear from you soon.

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 12



My experiment is hooked up to a computer that doesn't have internet, and this computer in my office doesn't have LabView.  It's all very sensible!  So, I can't view the file in that link.  Could you email it to me?  How can I send you my file?



0 Kudos
Message 3 of 12

Oh.  Here we go.

0 Kudos
Message 4 of 12

Why would you convert the dynamic data from the DAQ Assistant to a 2D DBL and use the Write to Spreadsheet File? You are throwing away all of the time information and column headers. Use Write to Measurement File if you are going to use the DAQ Assistant Express VI.


Your use of the Write to Spreadsheet function is also incorrect. Wiring a Date/Time string to the format input does not make any sense.


p.s. You also want to be a bit more carefule about which forum you post to. You posted to the Digital I/O board and your question has nothing to do with that. You would have been better posting such a generic question to the LabVIEW board.

Message Edited by Dennis Knutson on 01-26-2009 08:21 AM
Message 5 of 12

Apologies.  I didn't actually specify a group; I just filled out a form and it put it in this forum.


As for the date/time string attached to the spreadsheet, that must be just a left over from things I was trying to do that didn't work.  So are you saying if I use the write to measurement file, it will accomplish my goals?

0 Kudos
Message 6 of 12
Depends on what the exact goals are. The Write to Measurement function will take the channel names from the DAQ Assistant and write those as column names. You can add a comment. I don't know exactly what you mean be title. The function takes the initial start time (t0) and writes that in the header. The dt is then writen as the first column in the data section. The Export Waveforms to Spreadsheet File function stores timestamps a little differently. You might wnat to try that as well.
0 Kudos
Message 7 of 12

I am going to try the Write to Measurement file function as well as the other mentioned and see what results they produce in a minute,


As for the title, I would simply like to produce some type of comment/string at the top of each set of data that says, in this case, which seal I am testing.  This means I would want a prompt to the user as to what the seal type is at the beginning of each run which would then be placed in that title.  Does that make sense?


Thanks everyone.



0 Kudos
Message 8 of 12

I  have tried the Write To Measurement file and it works just fine I think, except that I can't figure out how to label the headers with more than 'untitled' and 'x-label'.  I need to be able to use comments on them, but I can't get that to work.  I tried cacantenated strings, but it keeps giving me an error.


Any idea how?  I checked the forum and someone posted a small picture, but I am new to this and do no understand how to use the information.  Could you explain how to accomplish this tasks, perhaps with a picture of the diagram? 





0 Kudos
Message 9 of 12

Do you wish this label to be the first line of the header? If that's the case, the easiest way may be use one of the low level file write functions after the lvm file has been created. You don't have a lot of options of customizing the Write to Measurement File. It's designed for beginners even if you do manage to modify the source code, the file couldn't be read by the Read From Measurement File. Instead of inserting a label in the header, could you distinctly name the file itself?


On the other hand, you've gotten some help in your other thread on how to use the Write to Spreadsheet File. With this and some other low level functions, you can create the file in any format that you want. It's a matter of using an easy to use function with limited options or writing your own code with unlimited options.

0 Kudos
Message 10 of 12