Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 200284 when asynchronously reading input

Platform .NET, sample application (NI)ReadDigChan_ChangeNotification.

When start button is pressed, I get the error -200284 after 10 seconds. Using Port0, inputs 0-5 are used, 6-7 are grounded.
Message 1 of 6
(4,359 Views)
This error means that the task had to wait too long for the samples you requested to be acquired and timed out. Try the following:

(1) Verify that one or more of the digital signals you are reading is changing and that the lines with the changing signals are entered in one or both of the input controls asking for change detection channels (there is one for detecting rising edges and one for falling edges)
(2) Reduce the number of samples you are reading so that they will all occur within 10 seconds.
(3) Increase the timeout. By default it is 10 seconds. This will require editing the program and adding the line "myTask.Stream.Timeout = 100000;" before any calls to BeginRead (you specify the timeout in milliseconds, so here 100000 means 100 seconds).

I hop
e this helps.

Tony H.
Measurement Studio
Message 2 of 6
(4,359 Views)
Thanks for your reply.

Actually, there may be a few hours between any changes (overnight, for example). Is there a way to set the timeout to be infinite ?

Any side effects of this ?
Message 3 of 6
(4,359 Views)
I have tried, but now I get the message about 100 seconds after start instead of 10 seconds (makes sense).

I need to be notified when a value changes. The other approach is to poll the port constantly. I do not want to do this since the program has to do other things...

Changes can occurs 10 times a seconds or have several hours between any changes...

Any ideas ?
Message 4 of 6
(4,360 Views)
Yes, you can set the timeout to -1. This will cause the task to wait indefinitely for data to be acquired.

Tony H.
Measurement Studio
0 Kudos
Message 5 of 6
(4,358 Views)
I tried the same, setting the timeout value to -1 however the error appears almost immediately, is there anything else I need to be changing?

Kyle
Message 6 of 6
(4,245 Views)