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: 

RMS PtByPt

I am having some probles with this vi.  Can someone explain exactly what the sample length is?  I'm trying to calculate the RMS value of data for only n loops at a time.  I want it to take in n data points, calculate the RMS for this set and then start over and calculate the RMS of another set of n data points.  Do I need to set the sample length to n? 

When I have set the sample length to n, it appears to work initially, but after 2n loops have occured, the indicator it is connected to shows an ever increasing number, clearly not an RMS value.

Thanks

0 Kudos
Message 1 of 8
(2,946 Views)
No VI came through. Did you use the "Add Attachments" link to add your attachment? Note: If you preview your post then the attachments are gone - you will need to reselect them. This is a known bug in the forum software.
0 Kudos
Message 2 of 8
(2,938 Views)
Sorry, I'm talking about the RMS PtByPt function.
0 Kudos
Message 3 of 8
(2,932 Views)
Yes, the sample size should be set to the expected number of samples. Are you using the initialize input to reset the VI? See attached example.
0 Kudos
Message 4 of 8
(2,924 Views)
When I set the initialize value to true the output of the function was just whatever number came in.  It didn't seem to be working properly.  What does it actually mean to initialize the value?
0 Kudos
Message 5 of 8
(2,898 Views)
The initialize input resets the internal buffer that's used to hold the individual samples. You only want to initialize when you want to reset the count, as I do in the example that I showed you.
0 Kudos
Message 6 of 8
(2,884 Views)
Can you send that example in version 7.1 please?
Thank you for your help
0 Kudos
Message 7 of 8
(2,847 Views)
Attached is the VI in 7.1.
0 Kudos
Message 8 of 8
(2,840 Views)