10-05-2009 01:51 PM
10-06-2009 06:33 PM
Hello JasonAtSeagate,
Thank you for using NI forums. I've encountered an issue similar to this before when doing continuous AI with events in VB6. I think the problem stems from trying to dereference the event (or trying to dereference a null pointer) in VB6. We believe there may be a bug with the DAQmx driver and VB6. I believe if you were to comment out the code within the callback of the RegisterEventEveryNSamples (not sure if this is the correct function name) function then you will not run into this problem. This still probably won't allow you to do what you want, but I believe the problem can be narrowed down to that portion of code. I was actually running into a crash whenever I would stop and then restart the UI, but if I were to completely close the UI and recompile then everything worked fine. I'm still looking into possible reasons for this, and I'm not certain if you are encountering the same issue, but it does sound rather familiar. I will try to post an update if any new discoveries are made.
Regards,
10-07-2009 12:09 PM
Hi Brandon,
I solved my problem once I realized that I did not really need to use event notification / callbacks to achieve the desired result - which was to update the UI during a long acquisition. Since I was not really familiar with DAQmx, I did not realize that I could easily accomplish this with continuous acquisition, which I am now doing. Once I stumbled on the description of how DAQmx uses circular buffers all became clear.
Sometimes I miss the days when we had printed manuals!
Good luck with your problem.
Jason.