05-02-2006 03:09 PM
05-03-2006 03:21 PM
Amehl,
Unfortunately, I do not know of any reasons why the counter task would simply
stop some of the time. I have a couple recommendations that you can try
to troubleshoot the issue.
First, it would be good to know if the event (acquired_data) is not being
called, or if the counter actually stops counting. To do this you might
try calling the readcounter method after you see that events are no longer
being called. If you call this method several times, and you know pulses
are still going to the counter you should see it increment.
Secondly, you might want to try minimizing the amount of code you have
executing inside the callback function to decrease its execution time. Finally,
if neither the above help, you might try increasing the number of samples
before the acquired_data event is called. This will help prevent the
event stack from getting bogged down and possibly causing problems.
If
none of this helps, can you find any similarities between when it works and
when it does not? Do you create/start any other tasks/acquisitions when
this problem seems to occur?
Regards,
Jesse O.
Applications Engineering
National Instruments