How Do I Include a Time Stamp in a File Using the Write To Measurement File VI?
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
When I use the Write to Measurement File Express VI, I want the X value column to be the CPU time stamp. By default, the X value column has time values that start only when the execution starts. How can I change this?
This can be done in two ways. The first way is for writing to a .lvm file, and the second is for writing to a .tdms.
For a .lvm file:
Now the CPU time will show up in the text file next to the data that you are writing in the while loop. If you are acquiring more than 1 sample in the DAQ Assistant, only one value of time will show up for all the samples that you acquire. The resulting measurement file will have one time stamp at the beginning of each measurement set. A screenshot is shown below.
Note: You would also need to select Empty Time Column in the configuration for the Write To Measurement File.vi, if you do not want the default time data to appear.
For a .tdms file:
Now the time stamp will be logged in a column to the left of the measurements under the heading Time, and the dt value will be logged under the heading Time*. A screenshot of the resulting .tdms file in Excel is shown below:
Note: Unlike with a .lvm file, a .tdms file will record a timestamp for every data point.
KnowledgeBase 3PJC3B8: How do I Convert a Date/Time String into a Timestamp Constant in LabVIEW?
KnowledgeBase 4NREG75X: Why is my Time Stamp One Hour Off When I Read Time Data From a File?
Report Date: 01/26/2007
Last Updated: 06/09/2017
Document ID: 45PB9S9U