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: 

add root mean square function

hi
 
i got the NI-4070 and i got the demo example called NI-DMM Waveform demo. I want to add a functino to measure the root mean square of the waveform? how to do so? i've search a function and put on the block diagram call cycle average and rms .vi but i don't know how to connect it. can anyone help? thanks
0 Kudos
Message 1 of 16
(4,578 Views)

You can wire the Waveform output from the DMM VI directly into the rms.vi, I think...

If your waveform putput function from the DMM is a 1D array, there should not be any problem in feeding it into the rms.vi.

Try it out & repost here...

- Partha ( CLD until Oct 2024 🙂 )
Message 2 of 16
(4,566 Views)
hi

I've try the RMS and the waveform measurement rms average and basic one

they give me a very low value while i am having a 80V trapezoid waveform, which is about 1.7 like

I am using the example and just add this function.
 
 
0 Kudos
Message 3 of 16
(4,506 Views)
Can you post the code?
- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 4 of 16
(4,496 Views)
i got the rms but it is wrong.

I am having a signal that is 126V peak to peak and the Vrms shoudl be about 60V, however, what i have right now  is only 2.6Vlike.

I don't know if the sampling rate affect them, also my data is going to change by some times eg 10ms, HOw can i write the program to capture certain Vrms within a period of time?

thanks alot

Message Edited by kawaiicat on 09-24-2007 10:25 PM

0 Kudos
Message 5 of 16
(4,467 Views)
Hi kawaiicat,
Have you tried to use get waveform components and pass the Y array into the RMS function? The waveform is basically an array of clusters that contains data on each data point.  The RMS processes however many data points that gets passed to it in an array.  It doesn't really care about time, it only cars about the data and the number of data points.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support

P.S. check out cuteoverload.com if you are looking for "kawaii cat" 🙂
0 Kudos
Message 6 of 16
(4,440 Views)
honestly i have no idea about using labview and that's why i can only try to add some function to the example.

i've found the amplitude and level measurements in the signal analysis but i donno what to connect of signals.
or the get waveform component of waveform. I have no idea how to give a input to that function ( e.g. my 4070 card)
i guess i should use a I/O but they cannot connect or use Di-MMX.

I see the example like ni-scope ex measurement library.vi. They need to use nearly each of the component. init, vert, acq..etc. while the Ni-MMX demo waveform only use acquire and update those element. There's too much function that i donno which one to use and i can complete my program.

can you advice?
0 Kudos
Message 7 of 16
(4,421 Views)
Hi kawaiicat,
I wrote a quick example to demonstrate how to get components of a waveform. I'm not too familiar with the 4070, but I'm passing the message along to the DMM supporters and maybe they can give you more pointers.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 8 of 16
(4,398 Views)
Hello kawaiicat,

Thank you for contacting National Instruments. I ran your vi with a simulated device and it appeared to work correctly, even without separating the waveform.  If you enable the simulated device and then run the program,  you should see that the vi correctly calculates the RMS value of the simulated signal.



To answer your question about how the sampling rate affects the RMS value, as long as the sampling rate is significantly above the Niquist Frequency (2x the frequency of the signal), it should not affect the RMS value.  In other words, as long as the signal appears as it should on the graph, the RMS value should reflect the RMS value of the signal.

If you could take several screenshots showing the signal and the RMS value, both with the simulated device and your signal, that might help with troubleshooting.

Neal M.
NIC AE
www.ni.com/support
SR#: 1028611

Message Edited by Neal M on 09-28-2007 11:31 AM

Neal M.
Applications Engineering       National Instruments        www.ni.com/support
0 Kudos
Message 9 of 16
(4,376 Views)
RMS calculations can appear to give errors if the number of cycles of the waveform being measured is small and the dataset does not include exactly an integer number of cycles. I won't go into mathematical detail now, but if this appears to be related to your problem, we can discuss it in more detatil.

Lynn
0 Kudos
Message 10 of 16
(4,366 Views)