VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure the period and peak to peak value of a sinewave

Solved!
Go to solution

Hi

I am new to Veristand and Labview and I was wondering if there's the possibility to do the following:

 

I would like to measure the period of a sinewave I capture from the analog input of my DAQ (PXIe-6363). Apart from that i would also like to measure the peak to peak value (Vpp) of that sinewave.

 

I hope you can help me out.

 

Thanks.

0 Kudos
Message 1 of 7
(8,040 Views)

Hello,

 

Of course its possible but i think its not possible natively. To do this, you have to develop your own Custom Device.


Bye,

 

CFOE

0 Kudos
Message 2 of 7
(8,038 Views)

You might look into using the Peak and Valley calculated channel type available in the System Definition. This will help you calculate the peak to peak value. It doesn't give you the period of the sinewave, but you might be able to detect that with other calculated channels by monitoring when the value changes on the peak channel.

 

Also, you could perhaps use the FFT graph in the Workspace to get the frequency of the sinewave.

Jarrod S.
National Instruments
0 Kudos
Message 3 of 7
(8,029 Views)

Hello 

 

I have used the Peak and Valley calculated channel to calculate the peak to peak value and it works fine at low frequencies, but when I increase the frequency, the peak to peak value decreases significantly due to valley and peak values decrease too. How can be this solved?

 

Thanks.

0 Kudos
Message 4 of 7
(8,010 Views)

You could just make a veristand model.  Develop everything as a labview VI, have the input to the VI be the analog signal, and the ouput be your peak to peak and frequency.

0 Kudos
Message 5 of 7
(7,985 Views)

In order to get a good characterization of the period wave, you probably need to be sampling about 10x faster than its frequency. What are the frequencies of the Primary Control Loop and the signal you are measuring?

Jarrod S.
National Instruments
0 Kudos
Message 6 of 7
(7,978 Views)
Solution
Accepted by topic author izabaleta

if the sinewave is of significantly higher frequency than the primary control loop can run... The best way to do this would be to put the DAQ device into waveform input mode and use a custom device to read the waveform and perform analysis.

 

an example is here: requires some labview skills

 

<LabVIEW>\examples\NI VeriStand\Custom Devices\waveform analysis

Stephen B
0 Kudos
Message 7 of 7
(7,970 Views)