Discussion:
6509 Change Detection Events
(too old to reply)
jlgeek
2006-06-26 21:40:09 UTC
Permalink
I have configured a 6509 Digital I/O card for change detection events on a line and it seems to work ok. Is there a way to unregister change detection events and return the input channel to normal operation? I try to unregister the event by using a NULL callback pointer but the next digital read is met with a timeout problem. In simplest terms, I want to be able to configure change detection events for the duration of a test and then revert to the previous mode of operation when the test is done. This is a TestStand/LabWindows based test fixture. There are a couple of test steps in the tester where I want to detect events. The rest of the time, I want to perform simple digital I/O.
Thanks,
John
 
Jesse O
2006-06-27 15:10:12 UTC
Permalink
Hello jlgeek,
I have found documentation that explains how to unregister a NI-DAQmx Software
Event.&nbsp; You can find it <a href="http://digital.ni.com/public.nsf/websearch/2C32EF1415B91A62862571100073652E?OpenDocument" target="_blank">here</a>.&nbsp;
This article explains that you should pass a NULL value for the event callback
function pointer.&nbsp; This seems to be what you have done, however you cannot
unregister (or register) an event while a task is running.&nbsp; You must stop
the task and then unregister your event.
I hope this clarifies things,
Jesse O.
Applications Engineering
National Instruments
jlgeek
2006-06-27 15:10:12 UTC
Permalink
Hi Jesse,
Thanks for your input. I am stopping and starting correctly. I think
that I've solved my own problem after much digging through the
references. It appears that when change detection is configured, the
sample timing type is set to DAQmx_Val_ChangeDetection and
when normal sampling is to resume, the sample timing must be reset. In my
case, the default timing was set to DAQmx_Val_OnDemand (obtained by DAQmxGetSampTimingType). Once I set it back
via the DAQmxResetSampTimingType, things seemed to be ok. It is unfortunate that
in the manuals, there isn't much information other than a simple statement of
purpose and a function prototype. There should be at least a page of information
on how the change detection works and what it changes under the hood so that you can change it back when you are done.
John

Loading...