From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measure frequency by MCC daq

Hi
I have a trouble using MCC DAQ to measure the frequency of an TTL signal by labview using Ulx library.
I tried different configurations but they don't work well:
 
1, In the first picture, I tend to count edge and devided it by the period of time. It works, but the measured frequency jumps up and down and it's not precise. I guess because the timing isn't precise. I am not sure how to improve it.
 
2, In the second picture, I tried to use the built-in CI Frequency block. I believe it can measrue the frequency precisely. However, it doesn't work and there is no error in my attaced configuration
 
Is there anyone have idea about this?
 
 
 
Thanks
Download All
0 Kudos
Message 1 of 5
(1,955 Views)

To directly measure frequency, your DAQ device should have a counter/timer (such as the USB 6212).  Some DAQ devices (USB 6008) have a counter, but not a timer -- you can get an estimation of frequency by using the counter to "count rising edges" for a period of time measured by LabVIEW's "Wait" clock (with millisecond resolution).  Of course, it also depends on how high a frequency you are trying to measure (I can imagine that you could do a few kHz, but possibly not a few MHz, with inexpensive DAQ devices).

 

Bob Schor

0 Kudos
Message 2 of 5
(1,937 Views)

Hi Bob

 

Thanks a lot.

I am using USB-1604HS, and it has a timer and counter.

Maybe my programming is not correct.

How should I make it directly measure frequency?

 

Thanks

0 Kudos
Message 3 of 5
(1,925 Views)

Attach the VI or VIs.  Look for example code.  You should carefully read the manual of your device -- it may well have methods for using the counter-timers to measure frequency (the optimal method varies depending on the properties of your device, the frequency you are trying to measure, the accuracy and precision you require, and whether or not the signal has a relatively constant or significantly-time-varying frequency.

 

Bob Schor

0 Kudos
Message 4 of 5
(1,898 Views)

Hi Yi-Chung, 

Did you solve the problem on this post? Can you please update it here on how you wrote the code?

 

Thanks. 

0 Kudos
Message 5 of 5
(1,291 Views)