LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write to spreadsheet file absolute time VS Data (Strain)

What our experiment requires is data (Strain) to be written to file.  Ideally two columns,  #1 in units of strain (0-100lb) and #2 Absolute Time.

At the moment, the units of strain correspond with the Strain gauge measurement and the time is either in seconds ex: 120000.677 and not in absolute format ex: AM 12:07:00 or not present at all. 

 

Teach me OH wise One!

 
 
0 Kudos
Message 1 of 2
(2,867 Views)
Hello belangem,
 
Since it is likely that you will have to do some processing on your timestamp data before writing it to file, you probably don't want to use one of the easy VI's (such as Write to Spreadsheet File.vi). Instead, I would have something like a for loop where you can write the data row by row as a string. You will have to convert your timestamp to whatever format you like (absolute or otherwise) and then to a string. There are several VI's available on the Timing subpalette -- the one you will most likely be interested in is "Get Date/Time String.vi". You'll also have to convert your strain data to a string as well, hence the for loop (you can iterate through your array of data). You can use the "Format into String" on the String subpalette.
 
Once you've done all your conversions, you can concatenate the strings together (again, look to the String subpalette) and then use the "Write to Text File.vi" (from the File I/O subpalette).
 
Hope this helps!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 2 of 2
(2,857 Views)