LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time stamp daqmx

So I have a DAQmx Read in a while loop waiting to acquire 1600 samples at 16,000 KS/s.

So it loops on the order of 100ms.

There are no timers in the while loop, I'm just depending on the continuous Read to keep things going.

 

I want to time tag the first sample in the data every time the loop executes.

I put a subroutine right before and then right after the Read.

When I chart out the difference between the current and previous reading I get variations on the order of +-100ms peak.

I would have expected to have variations of less than +-1ms.

 

I think put the Read in timed loop.  While the time looks great there appears to be a couple of second lag after changes to the input signal source frequency or amplitude.  Not sure what going on there either.

 

So I need an accurate +-1ms time stamp for this data.

 

Any ideas?

 

Thanks,

Mark

0 Kudos
Message 1 of 4
(1,117 Views)

Just to qualify this.  The DAQ is an Ethernet NI-9234.

0 Kudos
Message 2 of 4
(1,098 Views)

Those peaks can have many different reasons:

- Parallel running threads preemting the CPU

- "Clock uncertainty": Drift between OCX on DAQ device vs. "system time"

- Depending on the way you acquire the "time stamp": Possibly you jitter within the loops iteration so in iteration N, you take it as the first action done in N, in N+1 as last action. This results to somewhere about 200ms (+100). N+2 is again first action, resulting in about 0 ms (-100).

 

You should consider to read the data as waveform which contains a t0 and delta t.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 4
(1,094 Views)

@Norbert B wrote:

Those peaks can have many different reasons:

- Parallel running threads preemting the CPU

- "Clock uncertainty": Drift between OCX on DAQ device vs. "system time"

- Depending on the way you acquire the "time stamp": Possibly you jitter within the loops iteration so in iteration N, you take it as the first action done in N, in N+1 as last action. This results to somewhere about 200ms (+100). N+2 is again first action, resulting in about 0 ms (-100).

 

You should consider to read the data as waveform which contains a t0 and delta t.

 

hope this helps,

Norbert



Ditto that!

 

It is rare that i do not use the Waveform data type.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(1,090 Views)