If you read in your data to a chart in LabVIEW, do you see the correct pulses?
What input range are you setting? Since you are reading in pulses in the mV range, set the range on th cFP-AIO-600 to 0-5V or +/- 5V, depending on your application. I would check the accuracy in the specs to make sure it is accurate enough.
Have a great weekend!
"If you read in your data to a chart in LabVIEW, do you see the correct pulses?"
I'm not sure if you mean I should use a chart instead of a graph. If so, it would display in real time and I would not be able to see the pulses, would I? Or did you have something else in mind?
"What input range are you setting? Since you are reading in pulses in the mV range, set the range on th cFP-AIO-600 to 0-5V or +/- 5V, depending on your application. I would check the accuracy in the specs to make sure it is accurate enough. "
In this case, I am acually reading current pulses in the millivolt range (attenuation on the line makes the voltage readings not as uniform as the current). I will attach a picture of the difference between the voltage waveform and the current waveform. I have set the Compact FieldPoint to be within the proper threshold: 0 to 0.024 amps.
Regardless of which one I look at, it is still counting pulses much quicker than the actual signals that I am expecting. I'm going to try to hook up a signal generator and see if I get the same response.
Thank you for your input!
What happened when you tried the function generator? Did you get better results? Do the waveforms look more like pulses? Have a great day!
Okay, I have proof that my FieldPoint is lying to me when I ask it to do 1000 iterations of 1 wait-until-next-ms loops.
I started with the very useful example in the RT package called "NI Timestamp Code Timer" which, I can only assume, calculates the known timestamp discrepancy caused by processor load. My attached picture (talyor_loop_vs_time_discrepancy2.JPG) shows that right before the cFP-AIO-600 module records a positive voltage, the normally 1 ms loop can take as long as 60 ms. That's fine, but the FieldPoint then reports that only 1 ms has occurred! As you can imagine, this has made pulse counting very difficult, for instead of measuring 10 pulses per second, it 'thinks' it is counting ~28-30 per second as each pulse causes a measurement delay that the FieldPoint treats as a regular 1 ms time interval.
I have also attached the Loop Test code, and a picture of the signal through an ocilliscope, proving it is a regular square wave.
Why does this occur with positive voltages only? Why doesn't it take the same amount of time to read voltages equal to zero? If the delay was constant on every read, I could compensate for it, but I can't compensate for this delay that only occurs on positive pulses!
I recommend using a Deadband filter set at 80%. Your square wave might have a little noise on it and as it passes 8V, you can get additional pulses. Have your considered using a counter module instead of an analog input module? The counter modules have the filter built into it in addition to other features as well. Have a great day!
Did you come up with anything to solve this issue? I am reading around 6Hz on one channel coming into my cFPAI-610 module and am having similar problems In general, they way I have my while loop counter configured I noticed that the cFP counter slowly looses drift from the actual # of counts that are being inputed into the module. In general I am have trouble with my counter keeping up with the input. I can make it do what you were talking about, where it counts more pulse than are actually occuring and believe that I have resolved this issue. I will attempt an 80Hz deadband filter, but if you have any ideas to get this working without purchasing some other hardware it is appreciated.