From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert LV RT 64 bit timestamp in to date.

Hey Folks,

 

Stuck at this. I am coding for labview Real time 2012. It has one Function to get the date and time. 

 


 

RT Get Timestamp VI

Owning Palette: RT Utilities VIs

Requires: Real-Time Module

Inserts a 64-bit timestamp value from a high-precision timing source into a preallocated array at an index value specified by iteration. The timestamp value indicates the time when the RT Get Timestamp VI executes on the RT target.

Use the RT Timestamp Analysis VI to analyze the timestamp array returned by the RT Get Timestamp VI.

Details  Example

download.jpg

 


 

This function returns the 64 bit timestamp. I couldn't find any way to convert it in Date and Time with Mili or micro second information. I need this information to timestamp my data while storing.

 

Regards,

Hitesh

 

0 Kudos
Message 1 of 2
(2,545 Views)

Hello,

 

I came across this query of mine after long time while searching for method of time stamping RT data. Nobody has still answered it but I understood it with some experiments. I forgot to update it. As it is viewed 800 times I think lot of people might have similar issue. Let me add some explanation.

 

This VI returns time stamp in U64 format.

For example, 3753801387004

 

This is not absolute time stamp. It's relative to some point. So this can not be used to timestamp the data inside RT if you are planning to sync this data with some other system data. That means if you have systems which has multiple acquisition system you may need timestamps that are absolute and not relative as in this VI. But if you are using only one system and everything is inside this one RT system, this is pretty good accurate time stamping.

 

We can breakdown this U64 time stamp following manner,

3753-801-387-004

Seconds-millisecods-microseconds-nanoseconds

 

So if your single shot is <9999 seconds. this time-stamping can be used which gives accuracy in microseconds. Even nanoseconds up-to some degrees. Seconds counts upto 9999 and then rounds off to 0 and starts again.

 

Hope this helps someone.

 

Regards,

Hitesh

0 Kudos
Message 2 of 2
(1,716 Views)