LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elapse time + Excel + write to measurement express VI

Hello Community,

I have been working on a VI that plots a 10 point average of a random number against elapse time and using the write to measurement file express vi to write this to an excel file. The vi works after a fashon but the only way I can get the time column to work is to fractionize seconds into a part day (apparently Excel sees time this way) and when I open the excel file is to format the time column into hhh:mm:ss.00. 

Any suggestions or exmples are more than velcome

I guess I must be missing something 🙂

TIA

Simon

Download All
0 Kudos
Message 1 of 3
(2,921 Views)

What you are "missing" is that computer systems and languages represent TimeStamps differently, especially in the definition of the definition of "Time 0".  For LabVIEW, it is 1 Jan 1904 UTC, while for Excel, it is 1 Jan 1900 UTC.  [Interesting, Time 0 for the Windows File System appears to be 1 Jan 1601, while Unix use 1 Jan 1970].

 

If you express Time as a String (instead of a number) and save it to Excel, you stand a chance of getting the "expected value".  Otherwise, there are complicated formulas (I haven't convinced myself that I've yet gotten it right) that might allow you to translate between a LabVIEW TimeStamp (numeric) value and Excel's (note that LabVIEW's TimeStamp is a 128-bit number).

 

I see that you are using LabVIEW 2016.  I know that some "editions" of this version include the Report Generation Toolkit which permits pretty flexible writing of Excel files, and in particular can accomodate writing TimeStamps as strings.  I don't know if this would help your situation ...

 

Bob Schor

Message 2 of 3
(2,906 Views)

Your time conversion is missing some elements.

Try this:

Time to XL.png

from here  more information here on why there is no built in LabVIEW function.

 

Wow, its been a while since I needed to pst that.  That little vi has more solution to posts than any other single vi on the forums (a few String / ASCII conversions come close though)


"Should be" isn't "Is" -Jay
Message 3 of 3
(2,899 Views)