11-26-2013 11:26 AM
When I run multiple data acquisitions using DAQmx eventually the code will hang on a call to 'EndReadWaveform'.
private void AnalogInCallback(IAsyncResult ar)
{
try
{
if (runningReadTask != null && runningReadTask == ar.AsyncState)
{
// Read the available data from the channels
wfmData = analogInReader.EndReadWaveform(ar); <<<<<<<< Normally works but eventually hangs (never returns and no exception raised)
The timeout on the task is set to 2s (it was at -1 before which made no difference).
11-27-2013 11:05 AM
Greetings Lorne. V.
In order to help you better is it OK if I ask you some questions?
Is this behavior reproduced with one of the examples included with the driver installation? How many data points are you reading? What hardware are you using? When you say you run multiple acquisitions, do you mean in parallel or that the program hangs after several uses? Can you elaborate on what “eventually” means (like an average time or number of runs)? Is the behavior reproduced with similar methods like EndReadMultiSample? Do you have to restart the application or the whole OS in order to continue working after the application hangs?
Thank you for your time. With this information we will have a better understanding of what is happening.
Warm Regards,