LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

counter,unstable result

Hi,I am using USB6218 counter to measure some frequencies. and the example of Meas Dig Frequency-Low Freq 1 Ctr.vi was used as suggested. But the result is very unstable.it can show the correct frequency, but only every few seconds ( for the rest of the time, there are random numbers). Can you tell me why? According to the specification,I only need to feed signal to the gate of Counter 0, and some frequency to the source of Counter 0, don't I?
 
2. Besides, I tried to put the signal to the analogue input channel, and the tone measurement VI can also measure the frequency, but when i disconnect the signal feed, the indicator still keeps the last reading instead of 0( that's why I decided to use counters). Could you please help me with these problems?Thanks
0 Kudos
Message 1 of 16
(3,845 Views)
What is your signal source? What kind of waveform does it produce?

It sounds like your counter is "seeing" some noise or a waveform it cannot interpret correctly. The counters expect a logic level signal. If the signal source is not compatible with the logic inputs of the counter, you will get erroneous readings. Grounding errors can also cause this type of problem.

Lynn
0 Kudos
Message 2 of 16
(3,820 Views)

Thanks, lynn. It is a square wave signal.According to the specification of USB6218, the gate of the counter should be fed with the signal to measure, and the source of the counter with a known frequency. Surprisingly, if I connect the source to the ground, the VI reading is the same as when I feed some known frequency to the source. It can also read the correct signal frequency but enormous other mumbers.

0 Kudos
Message 3 of 16
(3,814 Views)
I am not sure if this is your issur but one thing in daq mx if you are counting a slow source by default the counter will filter out zero events.  This can give some strange results. 
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 16
(3,806 Views)
Any more suggestions? Thanks
0 Kudos
Message 5 of 16
(3,789 Views)
Maybe you have a problem with very high impedance and signal reflections. Is your hookup properly terminated, e.g. with a resistor across the two wires?
0 Kudos
Message 6 of 16
(3,783 Views)
Or is it beacause of the measurement time a bit too fast? The default is once per 0.001s in the Meas Dig Frequency-Low Freq 1 Ctr.vi, and strangely, it will jump back to the default value if I change it to other numbers like 0.01s or something( can't be saved).
0 Kudos
Message 7 of 16
(3,743 Views)

Hi,

your problem sounds familiar to me, if this is what happens:

- you can measure your frequency properly using an analog input

but

- you are getting spurious results using the counter

As already mentioned above, this is a strong indication that there is noise on your signal which the ADC (1 MHz sample rate) doesn't mind but the counter (80MHz) does mind. The counter expects a proper TTL signal with very clean edges - have you checked with a scope ??

HU

 

0 Kudos
Message 8 of 16
(3,735 Views)
The signal I am measuring is an analogue signal, but when I use the counter to measure the frequency, it can give a correct reading, only with a lot of flashes . I think I should get back to use the analogue signal input channels again. The problem is if I disconnect the signal input, the reading stays the same as the last reading. How can I put it to 0?
0 Kudos
Message 9 of 16
(3,722 Views)
Please post the IVs you are using along with a sample of the data saved as default so that we can see what you are seeing. Verbal descriptions of problems like this are not very efficient ways of locating the source of your difficulty.

Lynn
0 Kudos
Message 10 of 16
(3,713 Views)