Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/10/2018 in all areas

  1. I also have a method to propose: U64 Nanoseconds to LabVIEW Timestamp.vi
    2 points
  2. You could probably get better results by using the quotient function you have down below as your double value, rather than doing a floating point multiply. You can also just continue with the pattern you have followed for subsecond values divide seconds by days, days by years, and find the offset from 1904. The hard part is handling things like leap seconds. You could try to use the seconds to date time after converting to a standard timestamp using one of these methods: 1. The fpga timekeeper has a nanosecond to labview time conversion: https://forums.ni.com/t5/Sync-Labs/NI-TimeSync-FPGA-Timekeeper-Getting-Started/gpm-p/3543895 under /timekeeper/utilities 2. Move the bits around and type cast yourself. Timestamp format is defined here: http://www.ni.com/tutorial/7900/en/ { (i64) seconds since the epoch 01/01/1904 00:00:00.00 UTC (using the Gregorian calendar and ignoring leap seconds), (u64) positive fractions of a second} Your time in ns/1E9 gives the first value remainder of the above divide *(2^64)/(1E9) is what you need for the second value if I'm reading the document correctly, or multiplying by ~18446744074. you put these in a two-element cluster in the order above, and then type cast to a timestamp.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.