03-05-2019 07:59 AM - edited 03-05-2019 08:00 AM
Hello,
In a situation where one uses FPGA to get data from different I/O modules with different acquisition speeds what is the correct way of adding a time-stamp to data?
1) After you get data to RT and just use "Get Date/Time in seconds" there?
2) Do you in some way convert tics that you send from FPGA to RT to get exact time-stamp?
3) Other solutions?
regards
03-05-2019 08:04 AM
Hi Niklasson,
what is the correct way of adding a time-stamp to data?
Whatever fits to your requirements…
1. Using the RT timestamp is fine as it includes date/time, but might not be correct to the µs…
2. Using ticks from FPGA might get you closer to your exact acquisition timestamp as you can get 25ns ticks from FPGA (with default 40MHz clock)…
03-06-2019 10:36 AM
On my FPGA I use a U64 that counts up in a SCTL for my timestamps. This gives me years of time at ns precision since the start of the FPGA and is the same for all processes that occur on that FPGA.
It is important to recognise that this is time for this FPGA only and it is harder to compare to something more universal like the UNIX ms timestamp which you might be requesting from the RT or PC systems. You could just take the timestamp on the RT when you started the FPGA and then add the U64 from the FGPA to the timestamp to get something roughly comparible. But the precision you gain should not be confused with accuracy!
To get precise and accurate timings across cards you really need to have a common timing card and run all the clocks from that. This way you avoid annoying things like drift.