05-20-2008 11:00 PM - edited 05-20-2008 11:05 PM
Dear All,I have several questions about the change detection event callback based from the VC++ shipping example, ReadDigChan_ChangeDetection_Events.1. What is the rate of the configure change detection timing? It's not defined in the argument.m_task->Timing.ConfigureChangeDetection( risingEdgeLines, fallingEdgeLines, DAQmxSampleQuantityModeContinuousSamples, sampleSize);
2. Is the callback single-threaded or multi-threaded?
3. Is there anyway to differentiate which signal pin/s generated the change detection? Is there an API for this operation or is it simply depends on the user how to figure this out?
Is there any data passed in the userData to achieve this?
void CReadDigChan_ChangeDetection_EventsDlg::OnDigitalChangeDetection(void* userData)
{
int value; CNiComInitialize com(CNiComInitialize::Apartment); if (m_taskRunning) { try { //read sample m_reader->ReadSingleSampleMultiLine(m_data);..........
Thanks a bunch, A 😃
05-20-2008 11:11 PM
Hello again,
To add #3, what kind of data is being passed to the callback ()?
Thanks,
A
05-21-2008
03:25 PM
- last edited on
02-03-2025
09:59 AM
by
Content Cleaner
Hi angelmcdoggie,
1. Change detection timing “Configures the task to acquire samples on the rising and/or falling edges of the specified lines or ports”, therefore the rate is completely dependent on how quickly your lines/ports change.
2. It would probably be better to ask you what your concern is so that it can be fully addressed.
3. Because change detection uses logic that only tells you that there was a change, it is impossible to know from hardware which line changed. However, the values of all lines/ports should be captured and you can compare the before/after cases to determine which line changed.
I hope that helps.
05-22-2008 05:01 AM
05-22-2008
03:57 PM
- last edited on
02-03-2025
10:01 AM
by
Content Cleaner
Hi angelmcdoggie,
Change detection is supported by the devices listed here. As new products come out, this page should be updated. Just to make sure it wasn’t missing anything, I checked the 9401 and it does not support change detection. You have the option of purchasing one of these devices if you need hardware change detection, or possibly implement some logic in software that monitors every line and notifies you of any changes you specify. A software solution doesn’t appear to be trivial.
If you would like more information about purchasing our products, please visit ni.com/contact.
05-22-2008 08:15 PM
Hello Mark,
Thanks again for the info. I would like to know the difference between digital change detection and hardware change detection.
Best regards,
A
05-23-2008
11:20 AM
- last edited on
02-03-2025
10:04 AM
by
Content Cleaner
Hi angelmcdoggie,
Digital change detection is something that happens in hardware, as described here.
Feel free to read this DevZone article or check out the links on the left to learn more.
06-25-2008 03:17 PM
Hi Mark,
Could you please tell me if any of the C Series digital input modules (for NI CompactDAQ) supported the Change Detection feature?
thanks
06-26-2008
01:10 PM
- last edited on
02-03-2025
10:05 AM
by
Content Cleaner
Hi nantek,
I used a couple of resources to find an answer for you, so let me share those with you, and the community.![]()
The NI cDAQ-9172 User Guide and Specifications has a section on “Change Detection”, currently on page 37. You need a module that supports correlated measurements, and they have to be placed in slots 1 through 4.
I hope that helps.
Message Edited by Mark E on 06-26-2008 01:11 PM