Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

daq assistant vi frequency measure malfunction

hi, im working with a digital signal between 0-5volts and its usefull information is coded in frequency, this frequency goes between 0-100hz but in my aplication range goes between 12-41hz and i have to be able to measure 0hz that means no water flow.
so, im working with ni pci 6221, labview 8.6 and windows xp, i used daq assintant vi to measure frequency with ctr0 counter input with measure low frequency with one counter and i conected my digital signal to gate as m-series manual says and i used a timeout of 10 seconds, enough to acquire an 12hz signal but my system reports expired data timeout or measures frequency above 400hz, i used ai0 analog input, 200 samples with 1khz as sample frequency and tone measurements vi express and is getting a good measure, the same as oscilloscope, but my thesis director says it is not an appropriate sollution, what do you think about it?, why frequency measurement is not working?
now, pics of signals in oscilloscope, division per volt is not that one, so dont take care of P-P voltage values
13 hz.jpg
41hz.jpg
thanks for help
Pedro Rivera
.:. Pedro Rivera .:.
i love to work and develop on labview, this is real fun!!!
Photobucket
0 Kudos
Message 1 of 4
(6,036 Views)

Hi Pedro,

 

When you set the frequency range, did you select the lower limit of the frequency range to be 0Hz? You have to set the lower limit for frequencies higher than 0Hz because it's not possible to measure 0Hz. It is impossible because you would have to measure the signal indefinitely to ensure it didn't change its value.

 

Can you try measuring a fixed frequency signal (12Hz, for example) to see if the same error occurs?

 

If you don't get the same error, the problem is when you sensor measuring reaches 0Hz at a given moment of your aquisition. So, you'll have to change a little your programming.

 

Regards.

 

Felipe Flores
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 4
(6,007 Views)

hi felipe, well, is not possible set lower frequency limit on 0Hz because of labview dont let you to do that, but consider that, if i know my frequency range, i know which is the lower limit of frequency i'll acquire, so i can predict how many time the lower frequency period takes and if i measure my signal during a time three times bigger than the period of my lower frequency i can completly be sure that if i can`t get at least two upper or lower edges the signal im measuring is a 0hz frequency for my system.

 

i tryed with 12hz frequency and sometimes it doesnt work, but i've worked just with internal clock frequency, i want to try an exterior clock signal before asking for more help, perhaps i dont understand well how to connect counter input signals or how to configure internal clock.

 

thanks for your help felipe

 

Pedro 

.:. Pedro Rivera .:.
i love to work and develop on labview, this is real fun!!!
Photobucket
0 Kudos
Message 3 of 4
(5,989 Views)

Hi Pedro,

 

One reason that the counter solution would be more desirable than the analog input solution is that you can get a much higher resolution (using the 80 MHz timebase).  If I'm not mistaken the tone measurement that you are currently using would only give a 5 Hz resolution--you could acquire for a longer time duration to get higher resolution but the better approach is probably going to be with the counter.

 

Judging from the scope plots, it looks like the signal is rather noisy.  If it is not possible to easily clean up the external signal, you'll probably want to enable digital filtering (see the PFI Filters section of the M Series User Manual) on the counter input terminals.  However, you cannot do this through the DAQ Assistant.  Here is a simple example showing the lower level DAQmx API that you can get started with.  To enable digital filtering you need to add the following DAQmx Channel Property Node to the configuration section:

 

2012-02-27_130733.png


The noisy signal would explain why you would be measuring frequencies much higher than you expected, but does not explain the timeouts (assuming the signal is present).  If you continue having difficulties measuring your signal at all, you should probably post more information about how you are connecting the signals and if possible provide a link to a specs page of your signal source.

 

 

Best Regards,

John Passiak
0 Kudos
Message 4 of 4
(5,965 Views)