LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Averaged DC-RMS.vi Output Timestamp Issue

Solved!
Go to solution

I'm having an issue with the timestamps on the RMS value waveform output of the Averaged DC-RMS VI. For some reason, it acts as if time is going by in almost triple speed! This can be observed in on a waveform chart as well as when the data is stored to a file. When the Averaged DC-RMS VI is removed the timestamps return to the correct speed. 

 

See the timestamps in the bottom right corner of the attached data charts. The top plot is using the Averaged DC-RMS VI while the bottom plot  does not. Both were ran for the same amount of time but as you can see the top plot got about 18 seconds ahead of the bottom plot. 

0 Kudos
Message 1 of 7
(3,487 Views)

Please include a Snippet of your code, or attach your VIs, so that we can better assist you. We are here to help, but can't do much without seeing the code that you're working with.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 7
(3,469 Views)

My bad. Here is a snippet of my code.

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

That's not a Snippet. A Snippet allows us to actually import the code as LV code. But looking at the size of your block diagram, I'm thinking it might be best just to attach your VI.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 7
(3,431 Views)

Here is a trimmed down version that still exibits the problem. 

 

 

0 Kudos
Message 5 of 7
(3,413 Views)
Solution
Accepted by topic author kwalls007

You need to reset your averaging with each iteration. I'll be honest, I'm not exactly sure why you need to do this, but it solves the issue and you get a nice RMS curve that stays with the raw data timestamps. 

True RMS.PNG

 

Edit: It appears that something weird is going on with the t0 value after the RMS VI does it's thing. The t0 of the RMS waveform is jumping ahead of the raw data's t0 by 0.08 seconds each iteration. It should be always 0.08sec higher, but for some reason it's additive without resetting the filter.

 

Edit2: You also get a matching timestamp if you change the averaging type to Exponential instead of the default Linear. The curve is slightly different though because you're now getting an average including previous data, not just the most recent points being averaged.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 6 of 7
(3,400 Views)

@James.M wrote:

You need to reset your averaging with each iteration. I'll be honest, I'm not exactly sure why you need to do this, but it solves the issue and you get a nice RMS curve that stays with the raw data timestamps. 

True RMS.PNG

 

Edit: It appears that something weird is going on with the t0 value after the RMS VI does it's thing. The t0 of the RMS waveform is jumping ahead of the raw data's t0 by 0.08 seconds each iteration. It should be always 0.08sec higher, but for some reason it's additive without resetting the filter.

 

Edit2: You also get a matching timestamp if you change the averaging type to Exponential instead of the default Linear. The curve is slightly different though because you're now getting an average including previous data, not just the most recent points being averaged.


Thanks! This solved the problem. I'm going to stick with the linear averaging type and just keep resetting the filter as I want only the most current data points. 

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