11-09-2008 10:49 AM - edited 11-09-2008 10:52 AM
I'm looking for some thoughts on cRIO timestamp methods. Essentially all I want is a timestamp on each sample, during a multi channel acquisition from a couple modules (9215 for example, sample rate will be 50k and approx 8 channels). The time stamp must not rollover for a very long time, so I have chosen a U64 to represent the "count up" for each data point. The trouble comes in trying to get the time stamp to actually count up on the RT side. Attached is a screen shot of the RT code. I've tried multiple methods, one of which was just using an XY plot (and that code is still in the screen shot) but I've decided what I really prefer is a waveform chart with:
- t0 grabbed when the RT code starts (would be better to grab it in the high priority loop to sync with the first returned data, but I haven't put that in the cluster yet)
- using the U64 * 1/sample rate as the current time
For some reason I can't get it to work though. The problem with the code as it is now is that the timestamp doesn't update - it perpetually shows the start time even though it refreshes the data. I found a thread on this topic from 2007, but it wasn't using FIFOs.
11-09-2008 01:02 PM