mje Posted May 22, 2011 Report Share Posted May 22, 2011 Hoping someone can help me out here, it's been a while since I've actually done any DAQ in LabVIEW. I have a DAQmx task which I might reuse an arbitrary amount of times. When it comes time to start the task, I do a registration on the EveryNSamplesAcqIntoBuffer event, then go off and start the event. Something like this: When I'm done, I unregister for events, and stop my DAQ. Works beautifully the first time. When I try to restart the task, I get an error: Error -200966 occurred at Register For Events in ... Possible reason(s): Every N Samples Acquired Into Buffer Event registration has failed because the event is already registered within the task. Unregister the event before registering it again. Task Name: _unnamedTask<E> So it seems that despite calling the Unregister For Events primitive, DAQmx still thinks that the task has a registration pending. Is there a special step I'm missing that I should know about when dealing with DAQmx tasks? I should note, I have a workaround, wherein I only register for the event when I first configure the task, not every time I start the task. But it seems like I should be able to do it the other way where I register when needed, no? Or is it a case of once a DAQmx task is registered, the only way out is to clear the task and start again? Quote Link to comment
SuperS_5 Posted May 24, 2011 Report Share Posted May 24, 2011 Using simulated DAQ I could reproduce. (LV2010 sp1) Stoping->Closing the DAQmx event without using the unregister event primitive did however seam to work. (Again I am on simulated devices) I could also re-register the task. Quote Link to comment
Aristos Queue Posted May 27, 2011 Report Share Posted May 27, 2011 This seems like something that should be posted to the ni.com forums so that an AE can check into it for you. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.