01-28-2009 04:52 AM
Hi,
I'm using LabVIEW 8.2 and for my simulations purpose I've to store my data with time stamp (seconds having 6 digit precision ) in a text file.
I'm using get time vi to get the time of the host computer on a 6 point precision (which I've attached also). My problem is I'm unable to convert this time stamp into string which can be written to text file directly. I would prefer to avoid the "unbundle cluster" which gives me individual elements (like seconds,date,time,year,day of the year, etc) and them convert each of them into a string.
Looking to hear from any one of you soon,
Regards
01-28-2009 05:01 AM
Hi roiht,
how do you need the timestamp? You can use the "Get Date/Time String" function or you convert all your numbers to a string with the "Number to Decimal String" function.
Mike
01-28-2009 07:19 AM
Hi Roiht
You will never achieve 6 digits precision with the "get date/ time i seconds function" Perhaps 1 if you are lucky. But you can convert the time to string using the "format data/time string" function. You find it in the same palette as the other time functions.
01-28-2009 11:41 PM
Thanks for the reply,
Perhaps, when after extracting hours, minutes and seconds from this vi and displaying them on a float indicator, I'm able to see the details now. If I change the precision of float indicator for seconds to 6 point precision, I see float values for seconds? Are those values for seconds wrong then ?
Looking forward for your reply
01-29-2009 03:37 AM
01-29-2009 08:31 AM
Your figures for LabVIEW timing resolution using the Get Time/Date in Seconds primitive under Windows are about right. The actual numbers vary depending on the actual version of Windows and LabVIEW. Resolution is much better under LabVIEW RT and is superb under LabVIEW FPGA. You can get much better resolution by querying the Windows performance counter (see attached VIs). However, due to the multi-tasking nature of Windows XP/Vista, the results can be easily skewed. For example, if you are timing an operation and an e-mail arrives, you just added half a second or more to your time. I think the time slice interval on Windows is usually 10ms, and this feeds into timing jitter, as well.
One other point. The LabVIEW timestamp has about 20 digits of fractional seconds resolution (64 bits - it is a 128 bit fixed point number with a 64 bit integer and 64 bit fraction). Whether you can use this resolution or not is another matter. If you use hardware timing sources, you can get 10 or more digits of resolution. If you use a Windows operating system, it is closer to two digits.
Let us know if we can be of more help.
01-29-2009 09:05 AM
Thanks for the reply,
The files which you've send are in 8.5 version but I'm working on 8.0 versio. Could you please send me the files in 8.0 version.
Thanks
01-30-2009 08:49 AM
01-30-2009 09:53 AM
roiht,
Upon rereading your original post, it seems that converting the timestamp to DBL and then converting to string may work.
Lynn
01-30-2009 11:45 AM
Thanks for the reply,
I actually started doing what is shown in the .png file . Problem is solved