Jump to content

DAQmx: Error -200966 at Register For Events


Recommended Posts

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:

post-11742-0-69712600-1306100107_thumb.p

When I'm done, I unregister for events, and stop my DAQ.

post-11742-0-76556400-1306100148_thumb.p

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?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.