12-16-2005 05:44 PM
12-19-2005 11:06 AM
You can configure how long the function waits by setting the Timeout property on the DaqStream class. For example:
myTask.Stream.Timeout = 1000; // Wait for 1sec
// ('Timeout' is in milliseconds)
Setting this property to (-1) will allow you to wait indefinitely. The syntax will be slightly different depending on if you are using VB/C/C# etc..
Hoep this helps.
-Jeff
12-19-2005 03:31 PM
Jeff,
Thanks for the help and what you recommended worked. I couldn't find how to do this anywhere in the Meas Studio help documentation.
However, now that I got past the timeout issue, another problem has arisen.
After I start my task using BeginReadMultiSample, there seems to be no way to stop the task if the board is waiting for a trigger condition to occur. I have a control button that performs Task.Dispose. This is meant for the user to stop data acq completely. This works fine as long as the trigger condition is being satisfied. But if the board is waiting for a trigger, and Task.Dispose is called, the system completely hangs up. Task.Stop does the same. In fact, any attempt to control the task while the board is waiting for the trigger seems to hang up the system.
Any advice on how to cleanly stop the data acq task while waiing for a trigger?
Thanks,
Jerry
12-19-2005 05:23 PM
Jerry,
What I would do is create a button that performs the callback for the code. Inside of the "halt button" callback, I would put the following:
try
12-19-2005 05:23 PM
Jerry,
What I would do is create a button that performs the callback for the code. Inside of the "halt button" callback, I would put the following:
try
12-19-2005 05:23 PM
Jerry,
What I would do is create a button that performs the callback for the code. Inside of the "halt button" callback, I would put the following:
try
12-19-2005 05:30 PM
12-19-2005 06:54 PM
Jeff,
Your suggestion worked great! Problem solved.
Thank you again,
Jerry
12-20-2005 07:17 AM