10-15-2016 10:35 AM
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
10-15-2016 11:23 AM
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
10-15-2016 12:55 PM
Your time conversion is missing some elements.
Try this:
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)