Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO Timestamp Methods

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.

 

 

Message Edited by Codewheelie on 11-09-2008 10:52 AM
0 Kudos
Message 1 of 2
(3,433 Views)
Never mind on this for now, have moved passed this exact problem though I will probably ask the community for thoughts down the road.  Where is the edit / delete thread functionality?
0 Kudos
Message 2 of 2
(3,428 Views)