09-02-2009 09:52 AM
I am using a PCI-6221 (37-pin) to count a digital signal from a flow meter over a 5 second period. I am using PFI 0 (pin #13).
The signal uses a pull-up resistor connected to a 5 volt power source to bring up the signal to 5 volts during the on-phase of the cycle.
I do not have the power supply ground connected in any way to the PCI-6221 ground,
but I measured the voltage difference between the two grounds and found it to be only 1.4 mV.
The maximum count should be roughly 750 in five seconds (~150 Hz).
PROBLEM: sometimes the signal wanders up to 1,000 or even upwards of 10,000 , immediately, after 1 or 2 or 5 minutes, or the signal may not wander even after 40 minutes. I am not sure, but this wandering behavior seems to happen more soon after startup of Labview.
Any ideas?
Solved! Go to Solution.
09-03-2009 04:58 PM
Hi jsnyder,
How exactly do you have your signal connected? Make sure to reference your signal to the digital ground (pin 16). I would also try running your setup with an example program. You can find the examples at Help >> Find Examples. Once the Example Finder opens, make sure the Browse tab in the top left is selected the open Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events >> Count Digital Events.vi. 150 Hz should be no problem for the counter.
09-03-2009 05:42 PM
Hi jd,
It sounds like you may be counting duplicate edges due to possible noise on the line. One thing you might want to try is to enable the Digital Filtering on the 6221. To enable the filter in LabVIEW, insert the following DAQmx Channel Property node into your task before starting it:
If you're interested in the details of how the digital filtering is implemented, you can find more information in the M Series User Manual (page 7-33).
Best Regards,
John
09-08-2009 02:43 PM
Since writing my initial message, I haven't seen the problem again. there are three wires to/from the digital device
ground, power, and signal. Therefore, the only connection to Labview is the signal wire. With my older Camile DAQ system, the system provided the power - therefore no problem hooking up ground and power of the DAQ to ground and power for the digital device. I am leary of directly hooking up to grounds that have different voltages. If the probelm arises again, I'll put a resister between the two grounds.
09-08-2009 02:48 PM
I think you are probably correct in your analysis I haven't been able to try it out for comparison because since sending my original message I haven't experienced the problem again. If/when that happens - I'll verify the problem by inserting the filter.
Thanks,
Jon