Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

mesuare sine wave

Solved!
Go to solution

Plese help me!!!

 

I'm trying to read the RMS value of a sinusoid in Myrio input (AI0 and AI1 - Conector C), but I can not. I need only read this value and convert to tension to finish my master's work. I'm doing the integration of a flight simulator (X-plane) with Myrio and a hydraulic platform. Follow my code.

 

2015-12-01.png

0 Kudos
Message 1 of 2
(4,429 Views)
Solution
Accepted by topic author Lucas_Tadeu_Salomao

in order to use the built in RMS function, you must either set the parameters of the RMS function to match your use case of sample rate and measurement time to coincide with an integer number of periodic cycles or if set the "apply hanning window" option on the express VI.

 

Is you underlyuing signal periodic?  what frequency?

 

use the loop timer function to pace your loop and use that frequency in the RMS configuration. 

compute the time of an integer number of cycles of your friequency and use that in the RMS configuraiton.

 

Remember that you will only get one RMS measurement value per time period using the NI RMS function.

 

we quite often verify the FPGA math by using the same algorithm with known data sets in high level labview.  maybe you can try that too.

Stu
0 Kudos
Message 2 of 2
(4,390 Views)