Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

ChangeDetectionOverflowed on USB-6251

I have a USB-6251 that I am controlling using C3 and .Net3.5.

 

The code is as follows:

 Task theTask = new Task("Measure");

string lines = GetLinesForPins(pinsToMeasure);

DIChannel chan = theTask.DIChannels.CreateChannel(lines, theTask.ToString(), ChannelLineGrouping.OneChannelForAllLines);

theTask.Timing.ConfigureChangeDetection(lines, lines, SampleQuantityMode.ContinuousSamples, 1000);

// Start the reading asynchronously:

 DigitalSingleChannelReader reader = new DigitalSingleChannelReader(theTask.Stream);

reader.BeginReadWaveform(numberOfSamples, null, null);

 

// Wait code removed for clarity

 

theTask.Stream.ReadAllAvailableSamples = true; // We should wait untill the

 DigitalSingleChannelReader reader = new DigitalSingleChannelReader(theTask.Stream);

DigitalWaveform wave = reader.ReadWaveform(-1);

if (theTask.Timing.ChangeDetectionOverflowed)

TestIsNonConclusive("ChangeDetection overflowed. DUT is too fast for NI-DAQ module");

 

 

The ChangeDetectionOverflowed is not set, despite the fact that the IO line toggles every ~810ns (measured with Logic Analyzer).

Also the timestamps in samples indicate sample every 1ms - which measn about 1000 overflow events occured...

 

This is how I read the timestamps:

foreach (DigitalWaveformSample sample in wave.Samples)

{

PrecisionTimeSpan dt = sample.PrecisionTimeStamp - wave.PrecisionTiming.StartTime;

 

What am I doing wrong?

 

Regards

 

Espen

0 Kudos
Message 1 of 2
(2,955 Views)

I think I discovered the issue here. The 6251 uses the 80MHz clock for changedetection - which is more than fast enough not to loose any triggers.

 

 

0 Kudos
Message 2 of 2
(2,941 Views)