LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Period measurement Error 20308

Solved!
Go to solution

I'm trying to measure the period of a very slow frequency (0.083 Hz) coming into my DAQ(6009).

 

However it comes with "Error -20309 occurred at  "NI_MAPro.lvlib:Pulse Measurements 1 chan.vi:2" when called from "NI_MAPro.lvlib:Pulse Measurements N chan.vi:1"  (waveform index 0 of 1)".

 

The DAQ is capturing method is set to "on demand" however I have also tried various (frequency + buffer)  such as 10k by 2k.

 

but it  still comes up with the error.

 

I know why it comes up with this error but don't know how to fix it.

 

I have attached the vi (the simulate signal is replicating my DAQ)

 

 

Download All
0 Kudos
Message 1 of 7
(3,944 Views)

The error is explaining that not the wave didn't cross the reference levels enough times to do the calculations. Check that your signal reaches both the high and the low levels and that you have enough data in your signal to do a couple of whole signal periods. (with a signal frequency of 0.8 it will take 12 seconds to do a whole cycle) In the simulated example, I got it to work just by increasing the number of samples to 100. 

Ian S
Applications Engineer CLA
National Instruments UK&Ireland
0 Kudos
Message 2 of 7
(3,900 Views)

On this example I included the 'simulate signal' as an example however what I'm struggling with is telling the DAQ to take enough sample before measuring the period.

 

On the DAQ assist (continuous mode) I only have 2 clock settings; "samples to read" and "Rate(Hz)". what settings would you use for the DAQ assist to get a period of the signal (its 0.08Hz).

 

So in another word what you'd you set the "samples to read" and "Rate(Hz)" in order to measure the period of a 0.08Hz signal?

 

appreciate your help

0 Kudos
Message 3 of 7
(3,894 Views)
Solution
Accepted by D_Raz

Given that you will probably want at least 2 whole cycles to do your measurements, and each cycle takes around 12 seconds, I would get 25 seconds of data at 50Hz (1250 samples)

Ian S
Applications Engineer CLA
National Instruments UK&Ireland
0 Kudos
Message 4 of 7
(3,880 Views)

yes it works,  thank you.

 

One question though. what made you decide the 50 Hz as the frequecy sample?, i undrestand that you need 2 cycles of the signal as minimum but i'm not sure about the 50 Hz.

 

0 Kudos
Message 5 of 7
(3,842 Views)

twice the frequency is the minimum to get just an idea of the frequency. To get a good idea of the shape of the wave you need at least 10 times. 

I just picked 50Hz so you get lots of data.

Ian S
Applications Engineer CLA
National Instruments UK&Ireland
0 Kudos
Message 6 of 7
(3,840 Views)

Hi

 

I have another issue very similar to this, i'm trying to measure the period of signal that has of 1min (1Hz) , what frequency & sample rate would you choose?

0 Kudos
Message 7 of 7
(3,684 Views)