From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

Showing results for 
Search instead for 
Did you mean: 

Get Exception during reading port after starting changedetection Task

Hello, I have a simple question.


I try to read a port with NIDaq Ni9421 after starting the corresponding task:

// Create the task.

myTask = new Task();


// Create channel

myTask.DIChannels.CreateChannel(physicalChannelComboBox.Text, "",


// Configure digital change detection timing




SampleQuantityMode.ContinuousSamples, 100000);

// Add the digital change detection event handler


myTask.SynchronizeCallbacks = true;



myTask.DigitalChangeDetection +=
new DigitalChangeDetectionEventHandler(myTask_DigitalChangeDetection);

// Create the reader

myDigitalReader = new DigitalSingleChannelReader(myTask.Stream);


// Start the task



bool[] data = myDigitalReader.ReadSingleSampleMultiLine();


After reading the port I get the Exception Error -200284

Some or all of the samples requested have not yet been acquired. To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger, make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.


What do I have to change to get my code running. I there a method to wait until all samples are acquired.



Thanks for your help

0 Kudos
Message 1 of 2

Hello Aldo Platz,


please have a look at the following KB, which explains this error:


Why Do I Get Error -200284 from my DAQmx Read VI?


hope this helps,


0 Kudos
Message 2 of 2