Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

EndReadWaveform hangs

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).

 

0 Kudos
Message 1 of 2
(3,652 Views)

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, 

Luis J.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,629 Views)