12-21-2010 04:38 PM
According to this webpage, it would :
http://digital.ni.com/public.nsf/allkb/8914FA5E30971E0C86256FEF005760FF?OpenDocument
[...]
Some M Series (Port 0 ONLY)
[...]
USB Bus-Powered M Series devices like the USB-6210 and USB-6211 and our Industrial M Series cards (NI 623x) do not support change detection. However, USB High-Performance, PCI M Series, and PXI M Series devices do support change detection.
------------------
But, I've been testing with Nidaqmx in C# and I'm not sure it really does or I am missing something.
To keep things simple, I tried with the example provided by NI :
I am using 2x NI PCI 6221 linked together for this test. When I try to write to the Digital Output, I receive the event (DigitalChangeDetection) on the Digital Input part but it times out throwing the following exception :
-200284
"Some or all of the samples requested have not yet been acquired.
To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger, make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.
As noted in the Digital Change Detection supported hardware webpage, I use the port 0 on each cards. Dev2/Port0/line0:7 & Dev1/Port0/line0:7.
However, if I try using the ReadDigChan sample (no Change Detection involved), it works fine.
It also work fine using the Measurement & Automation Explorer but I don't know if it's using Change Detection or a timed loop.
It also work fine when I use a test panel + a NI PCI 6518 which explicitely support change detection.
So, does anyone know if the 6221 _really_ support Digital Change Detection?
I will try to find a second 6518 or 6514 card tomorrow and update my test setup to see if the change detection will work or not with these cards. If it does work, it would means the 6221 doesn't support Digital Change Detection and the documentation would need to be updated.
Thanks in advance for anyone with some infos on this subject!
If I'm not clear enough and you need more informations, let me know.
PL
12-22-2010 10:56 AM
I've done more tests this morning and when I interact with manual switches for on/off signal, Digital Change Detection work fine but from one 6221 card to another it doesn't, so it might be a problem somewhere else in my setup.
But, if I try to set a Digital Filter Minimum Pulse Width, I get an exception saying : -200452 Specified property is not supported by the device or is not applicable to the task. It does that only when I target my 2 PCI 6221, it works fine otherwise with a PCI 6518.
So even if DigitalChangeDetection would be supported properly by a 6221 (only on port0), without a digital filter it won't be much of any use for my project.
It seems like I need to get back to the slower loop pooling method for the 6221 cards and use the faster ChangeDetection on the PCI 6518 & 6514.
If I missed anything on the PCI 6221 regarding the digital filter and/or Digital Change Detection, let me know.
Thanks,
PL
12-22-2010 06:11 PM
Hi PL,
That error you're seeing on your 6221 is known behavior. This KB explains what's going on and also offers a workaround. Hopefully this proves to be adequate. Let me know if you run into any more problems.
Happy Holidays!
12-23-2010 09:17 AM
Now that's interresting! I'm not sure if I'll implement this workaround but knowing we don't need to do this for the X series is good to know as we're supposed to use a 6321 card on our final system. (I haven't tried with a 6321 so I didn't know and by looking at the specs of both the 6221 and 6321... it wasn't clear if the 6321 was able to support it or not.)
Thanks Sean, you guys do a great job routing us to the right documentation.
Happy holidays to you too 🙂
12-27-2010 10:01 AM
Hi PLG,
Glad I could help out. Digital filtering and change detection both work on the 6321.
Happy Holidays!
12-27-2010 08:22 PM
Hey plg,
One thing to point out... digital filtering is only supported on the PFI lines of the 6221 (port 1 and port 2). Change detection is only supported on port 0. So, the workaround is good if you want to use digital filtering on something like a sample clock or a trigger input, but it won't work for change detection on the M Series board.
The X Series boards (63xx) support both digital filtering and change detection on port 0. The workaround is also not necessary, since there is a DI.DigFltf.Enable property that you can use.
So, if you're using an X Series for your final project it sounds like you'll be in good shape. I just wanted to clarify any confusion in case you decide to try this out on your M Series.
Best Regards,