LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Precision and Accuracy of Timestamp of Write to Measurement File

Hello,

 

I am currently using write to measurement file express vi to save data in my program. I have selected the option to use one header only. I had a question regarding the timing. There appears to be three different timings. The first is in the first header section, just under date and just above ***End_of_Header*** and in the attached file reads: Time    10:18:34.0115025999999837462. 

 

The second time is in the second header just below Date and just above Y_Unit_Label and in the attached text file reads: Time    10:19:13.4180030999997732626    10:19:13.4180030999997732626    

 

The third, and final time section is the first column of data that is the time column for each data point. The first value being 0 and each subsequent value being 4 microseconds after the previous one. I have set the rate of data collection to 250kHz so this timing appears quite accurate.

 

My question is regarding the first two times and their precision and what time they are displaying. It seems to me, from my own investigating, that the first time (10:18:34.011 etc.) is the time at which the write to meas file is initially set to true in the code (which is right when the code runs for me). Then the second time (10:19:13.4180 etc.) is the time of the initial data point of its corresponding channel when saving data (which unsurprisingly appears to be the same initial time for all channels on a given daq unit). 

 

Does this mean that the time 0 in the first column of the data equivalent to 10:19:13.4180...? What is the possible error in the timing precision and accuracy of this timestamp? I have another daq unit in this same code that says its time 0 in its text file header is 10:19:12.3821..., does this mean that the volt text file shared starting saving data approximately 1.03s after my other write to meas file? Essentially I am asking how accurate are these timestamps. The time stamps also have a large number of digits displayed after the decimal point (for example: 10:19:12.3821526999996506926). How precise is this value? Can I trust it to a millisecond precision, microsecond precision?

 

Thank you in advance for the help.

0 Kudos
Message 1 of 6
(3,442 Views)

Hi ultrawhale,

 

Could you post a little more information on how you're getting those timestamps? What functions are you using? How did you configure the Write To Measurement File express VI?

 

In the meantime, here are some links that might be helpful:

Using Write to Measurement File Express VI

Precision of the Write to Measurement File Express VI

How do I include a Time Stamp in a File Using the Write to Measurement File VI?

 

Melanie

Applications Engineer

National Instruments

Melanie P.
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,383 Views)

Frankly you should just forget about the Express vi's. The Express vi's were designed for those LabVIEW sales pitches seminars to show how fast you can just throw something together in LabVIEW. But as you see they are not good for any "real" use.

 

I have attached what I use to write measurements to a file with a timestamp.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 6
(3,373 Views)

Oh BTW: You might notice that in Excel the timestamp I write is still a double precision float.

 

Simply highlight the column, right click, and select "Format Cells" from the pop-up menu.

Then chose the date and/or time format you want to see.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 6
(3,366 Views)

The timestamps come from the express vi itself. I just am using write to measurement file vi and have checked the box that says "one header only". Then the express vi is generating the timestamp . The only thing I configure for the write to measurement file is I have true for enable, a true for reset, my data going into signals and a filename going to filename. As can be seen in the attached png.

0 Kudos
Message 5 of 6
(3,349 Views)

I have attempted to run your code but I do not have your latest version of LabVIEW (LabVIEW 17.0), could you please post it as an older version? I have LabVIEW 16.0. Thanks!

0 Kudos
Message 6 of 6
(3,348 Views)