Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

One shot & continuous samples trouble in VB.NET

Hello,
I am using VB.NET 2003 with MS 8.0 ,
I have modified a National Instruments example in order to acquire one shot or continuous samples depending on the pressed button.I take one sample (from one of each three channels I have configured), then I pressed Continuous button in order to acquire in continuous mode and then if I stop the program with the stop button I get this error : Status code -200088. The click event for the stop button only checks if there's a task running and then disposed it. My problem is that everything goes well except when I disposed the continuous task.
I know it may be a stupid problem for an experienced programmer, so I attached my code hoping that someone can help me.
Thank's in advance.
Regards.
0 Kudos
Message 1 of 2
(2,820 Views)
Hi AINIA

   I've succesfully reproduce your error. What are you trying to accomplish? It seems you are reading 100 samples at a rate of 1000 samples per second, but you are only displaying the last one.

  The error seems to be produced because you are trying to close a task that is already closed. In order to do continous acquistion, try this link

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=C60E158A108C26A7E034080020E74861&p_node=174961

  There is also an on-line tutorial that uses USB-DAQ, but applies to your case

http://zone.ni.com/devzone/conceptd.nsf/webmain/C1EA00A64C9948BC86256FE800698BC3

Hope this helps

Javier Gutiérrez
NI Aplication Engineering


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