12-06-2012 04:17 PM - last edited on 12-18-2024 02:21 PM by Content Cleaner
I have a PCI-6601 counter card and I'm running LabVIEW 8.2.1 and DAQmx 8.5.0f5.
I have a counter task set up to continuously acquire the time that a button is pressed with respect to the time the task is started. I used this article in developer zone as a guide. I have attached a simplified version of the program that I'm running.
The VI works fine in collecting the data I want. The button is bouncy, so on ever click I get about 15 data points. That's not a problem, since I am debouncing in software. However, intermittently, I get error -200141. This problem is described very will in this forum thread, in which the consensus workaround is to filter the input (note that another solution would be to use DMA for the data transfer, but I don't have enough available DMA lines to do this). I can wire up a passive analog filter on the input line, but I would rather try digital hardware filtering first. You can set up digital filtering on PFI lines with a PCI-6601, which I have attempted to do (following this knowledgebase article). This is where I am getting error -200772, and you can see in the screenshot that it has configured the filter on the 100kHz Timebase, which is not what I want to do. I want to set up the filter on the PFI line that the button is attached to.
Does anybody know how to configure a digital filter for the source input to a counter that is configured to count edges?
12-07-2012 08:35 AM
I might have found the solution by inspiration from this thread. Setting up the filter using the DAQmx timing property node. Will test it today.
12-10-2012 08:14 AM
Enabling the digital filter on the sample clock using the daqmx timing property node appears to be what I want, but I am still getting error -200772 (see attached screenshot).
The PCI-6601 manual states that I can enable digital filtering on every PFI line, but this error is stating that I cannot enable digital filtering on PFI9.
Perhaps this is a problem with the DAQmx driver?
Does anybody have a solution to this problem?
Thanks.
12-10-2012 12:37 PM - last edited on 12-18-2024 02:22 PM by Content Cleaner
Please download the latest version of DAQmx that you are able to run with your LabVIEW. NI-DAQ and LabVIEW Version Compatibility (for Windows)
You should be able to download it from ni.com/drivers, in your case I think you need to install the DAQmx9.1.1
12-10-2012 02:22 PM
Which device is the 6601? The counter in your task is on Dev 3 but the PFI line that you are specifying for your sample clock is on Dev 2 (according to the error message anyway).
Best Regards,
12-10-2012 02:34 PM
To expand upon that, the digital filtering hardware is part of the PFI front-end. So, if you are routing the trigger from another device to the PCI-6601 via RTSI, the PFI filter on the 6602 wouldn't be an option.
To complicate the matter, the filter is specified in software for a specific destination terminal (rather than the PFI line). With the release of X Series, many new terminals received software support for PFI filtering (e.g. AI Sample Clock) but I don't believe older hardware has this same support. You might have to go with a workaround such as this in order to activate the filter (depending on what device Dev 2 is).
Best Regards,
12-10-2012 08:33 PM
I believe John hit the nail on the head there. I also noticed that today. I was trying to set digital filtering on the PFI line on a different device (Dev2; PCI-6711). I can't move the button to Dev3 (PCI-6601), because I want to maintain backward compatibility with other software running on the PC. However, I used the "DAQmx Connect Terminals" VI to internally route Dev2/PFI9 to Dev3/PFI9, which I can then set digital filtering on. Everything was working using simulated devices. Will test on the production PC tomorrow.