I'm trying to enable the digital filter on one of the counters (ctr2) on a PCI-6602 while using the session based data acquisition toolbox in Matlab 2012b. It seems a bit difficult.
I would like to use the 5us line filter on the line connected to counter 2, which in my case is PFI31. I have created a session in Matlab using the following Matlab code:
device = daq.getDevices;
vendorID = device.Vendor.ID;
deviceID = device.ID;
global mySession
mySession = daq.createSession(vendorID);
mySession.IsContinuous = true;
progressCounter = mySession.addCounterInputChannel(deviceID,'ctr2','EdgeCount');
With that I'm able to poll the counter when it measures flanks in output of an optic sensor succesfully, but I get a lot of false positives relating to noise in the signal. These would disappear if I was able to enable the said input line filter.
I say this with some confidence since it works great when using the exact same hardware except a switch of computers that the PCI-6602 is installed in. The old computer ran the old NI-DAQ legacy drivers, which I am unable to run on the new computer since 64bit Win7 is not supported even in the new (7.50) beta drivers, and had pre-compiled mex files using C commands calling the NI-DAQ interface.
Is it possible in some easy way to enable the filter with the session basedMatlab implementation? Or is my only choice to port the old code, if I can find it, to the new NI-DAQmx C implementation?