01-26-2016 02:22 PM
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.
Solved! Go to Solution.
01-26-2016 02:36 PM
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> ---'
01-26-2016 03:04 PM
My bad. Here is a snippet of my code.
01-26-2016 03:08 PM
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> ---'
01-26-2016 03:50 PM
Here is a trimmed down version that still exibits the problem.
01-26-2016 04:08 PM - edited 01-26-2016 04:25 PM
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.
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> ---'
01-26-2016 04:42 PM
@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.
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.