LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp with Write to Measurement File?? Help a Newb.

   OK, we're using LabView Basic 8.5 and acquiring 4 channels of measurement data from a NI-9215 via "write to Measurement File".   Our problem is the resulting file does not have a timestamp, only index numbers.  How do we add accurate time stamps instead of index numbers?   I have attached both our "write to file"  and our "read & display data" file.   Any help or suggestion would be appreciated. 
 
labviewmeasurement3.vi  -   writes data to measurement file.
avalon3.vi  -  reads data from file and displays.
 
 
Thanks,
 
John
Download All
0 Kudos
Message 1 of 19
(8,828 Views)
In the "comment" input of the "Write Measurement File.vi" put a time/date timestamp string....You can find the functions on the "timing" Pallette
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 2 of 19
(8,824 Views)
When you convert the dynamic data to a 2D DBL array, you have stripped all of the timing information. Instead, you could convert to a waveform data type which does retain the timing information.
Message 3 of 19
(8,820 Views)
We are reading the measired data into an array in order to buffer a few minutes of data.  Basically, it runs all night until an error condition triggers it to write to measurement file.  This buffered data, which contains the error, is then written to a file.  I'm not sure how to accomplish this using the waveform data type. 
 
John
0 Kudos
Message 4 of 19
(8,801 Views)
In the "comment" input of the "Write Measurement File.vi" put a time/date timestamp string....You can find the functions on the "timing" Pallette
 
I can put a time stamp on the control panel, but what conversion needs to be done to link it to the comment input of the "Read to Measurement" ?   
0 Kudos
Message 5 of 19
(8,797 Views)

The "Get Date/Time String.vi" outputs the string in the format you specify, check the context help on the vi for more info.0

Or the "Format Date/Time String.vi" to get more accurate Date/Time info (i.e. seconds, ms)



Message Edited by TWGomez on 04-22-2008 11:30 AM
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 6 of 19
(8,792 Views)

"The "Get Date/Time String.vi" outputs the string in the format you specify, check the context help on the vi for more info.0

Or the "Format Date/Time String.vi" to get more accurate Date/Time info (i.e. seconds, ms)"

I just realized that the "write to measurement" is only writing the contents of the buffered array.  So if I put a time stamp on it's comment field, it will not be properly associated with the measurements. 

 

John

0 Kudos
Message 7 of 19
(8,775 Views)
The comment field will not work unless you want to write your own read file function. When you use a Read Measurement File, you must use dynamic data or waveforms. Since you are using an express VI, it makes sense to keep everything as dynamic data. Do not convert to a 2D array and intead, you could try using the Append Signals function instead of the Build Array.
Message 8 of 19
(8,765 Views)
"Do not convert to a 2D array and intead, you could try using the Append Signals function instead of the Build Array".
 
 
Dennis,
How would I then buffer a few minutes of data without an array?  We are only interested in data acquired a few minutes preceding our machines fault trigger.   
 
John
0 Kudos
Message 9 of 19
(8,749 Views)
I am not the best person to ask about dynamic data types but I think the function I mentioned will do the same thing as building an array. And as I already mentioned, you could use the build array function with the waveform data type. I use the lower level DAQmx functions and each DAQmx Read returns a 1D waveform data type. This is why I said you can convert the dynamic data to 1D waveform. You can then create a 2D waveform array that will represent a period of time. When it is time to write, I think you will need to put your Write To Measurement File inside a for loop.
Message 10 of 19
(8,734 Views)