Measurement Method:2 Counters(High Frequency)
You can configure your task as image below
it will buffer your result every 0.001 second. Check it in the example finder:
hardware input and output->DAQmx->counter measurement->Digital frequence->Meas Dig Frequency-Buffered-Cont-High Freq 2 Ctr.vi
And for ok-forward:
You can check in your example finder, under DAQmx->counter, every example that has buffered in its name is hardware timed counter measurement.
You can refer to the examples.
High Freq 2 Ctr
转速是250r/min,≈2083Hz
0.0001s时,有error-200302,Measurements:Signal being measured is slower than the specified measurement time.
0.001s时,测出的数据错误,不是2000Hz就是3000Hz
Low Freq 1 Ctr
转速是250r/min,≈2083Hz
error-200474,the specified timeout expired.
Well, if you take a look at the frequence measurement basic, you should know why these error would happen.
SO:
1. You can never use a 10K read frequence to read a 2K signal, there is no result for you to read
2. If you want your result to be correct, use a measure period longer enough than your signal period, at least 5 times longer. You can image to use a 1K sample rate acquire 2K square wave, any disturbance will cause signal loose, not to speak of the rotation rate of a motor, its quite unstable.
3. This is because, I think, you are using a 20M timebase, you can caculate how many counts your counter should have. I suggest you input the frequence range, or use a 100K timebase
Just as I said before, use a 1 counter frequency should work, but I think you should change your timebase to 100KHz, by property node or by specifiying the frequency range, others may not work properly,
FOR the high or low frequency
There isn't a specific bandwidth that is defined for use with either the one-counter or two-counter method. However, located in the NI-DAQmx help file there is a section detailing the quantization errors that arise when using either method with a variety of input frequencies. By referring to this information you should be able to determine which method will produce the smallest error in your application and hence which method will be preferable. This help file also explains the errors associated with the large-range two-counter method.
To locate the help file, you should select Start»All Programs»National Instruments»NI-DAQ»NI-DAQmx Help, and search for 'quantization error'.
I hope this helps. And sometimes I think you can move on to try some more settings, because it will cost you nothing, nothing will damage.
轴是转的,用High Freq 2 Ctr可以测量,但用Low Freq 1 Ctr测不出数据。频率范围正确
because the specified timeout expired
What's your Low Freq 1 Ctr timebase? You checked it with the DAQmx property node?
According to the image below, the 100KHz timebase can measure from 10 to 10KHz, there's no reason you can not test the FREQ