03-19-2015 09:51 AM
I am developing a Labview RT application which needs to generate a data timestamp, I was planning on using the Get Date/Time in Seconds but am unsure of the time resolution I could attain running on a CRIO 9068 platform. Does anyone know what resolution I could expect?
03-20-2015 05:17 PM
Dargm,
The Get Date/Time in Seconds VI will return a millisecond value. If you need higher resolution, I would recommend looking into the High Resolution Relative Seconds in the LabVIEW Hidden Gems Library.
Hidden Gems in vi.lib- https://decibel.ni.com/content/groups/hidden-gems-in-vilib
03-31-2015 10:50 AM
Get Data/Time in Seconds actually has microsecond resolution (on NI Linux RT it uses gettimeofday), it's just not displayed in the default indicator which is set to show only to 3 decimal places. If you crank it up to 6 you can see accurate microsecond resolution (increasing to 9 does not show nanosecond resolution on NI Linux RT).
On RT targets, for that, you have a couple of extra options besides the hidden gem for higher resolution. In Real-Time>>RT Timing there is a Tick Count VI that has resolution options down to ticks (nanoseconds). Or, depending on your use case, the timestamp functions in the Real-Time palette may be what you want. They have good resolution (nominally nanoseconds, though it takes on the order of nanoseconds to get a timestamp in the first place), and there's a handy utility VI to do typical analysis functions. Those are Real-Time>>RT Utilities>>RT Get Timestamp.vi and Real-Time>>RT Utilities>>RT Timestamp Analysis.vi. Be sure to check the help if you're not familiar with them; they more for benchmarking and probably aren't what you want for timestamping data, but I wanted to mention them for completeness.