Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

StopTask hangs for a few minutes

I use NIDAQmx under VS2007 C++.
I have problem with stopping task.
DAQmxStopTask return after 5-10 minutes. It depend on CPU. CPU usage is 100%.
There is no READ/WRITE operation in the same time.
Could this be caused by calling StopTask in calback registered by DAQmxRegisterDoneEvent?

Thanks for help.
0 Kudos
Message 1 of 4
(3,243 Views)

Fizyq,

Are you using loops in your application?  

How do you have your acquisition configured? Number of samples, sample rate, etc..

Have you always observed this behavior?

Can you use a shipping example that came with DAQmx and get the same outcome?

The examples are located at:  C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples

Ryan N
National Instruments
Application Engineer
ni.com/support
0 Kudos
Message 2 of 4
(3,225 Views)

>Are you using loops in your application? 

Yes. In EveryNSampleEvent callback I read inputs until ther is no more samples.

I have two callbacks gegistered by

 1. DAQmxRegisterEveryNSampleEvents

 2. DAQmxRegisterDoneEvent

In 1. I read inputs, when error ocures I StopTask

In 2. I StopTask

>How do you have your acquisition configured? Number of samples, sample rate, etc..

I have continous aqusition with 25kS/s/ch (4 AI from NI 9233 and 2 AI from  NI 9205)

>Have you always observed this behavior?

Yes. On Intel Celeron 600MHz it stops for 9-11 minutes, on Pentium 4 1.6GHz it stops for about 5 minutes.

I StopTask only after some errors - I turn off /turn on power suply or I pull out/insert USB communication cable.

>Can you use a shipping example that came with DAQmx and get the same outcome?

>The examples are located at:  C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples

I will check the example you mentioned.

Thanks

0 Kudos
Message 3 of 4
(3,203 Views)

Fizyq,

It sounds like something in your code is causing a hang.  If you can post back your results from one of the example programs installed on your machine, which will help in determining the source of the issue.

Also, when you do post your results can you post your code that is causing the issue; this will also help in troubleshooting.

Thanks!

Ryan N
National Instruments
Application Engineer
ni.com/support
0 Kudos
Message 4 of 4
(3,186 Views)