01-21-2009 03:12 AM
I am using the "Averaged DC-RMS" vi (LabView 8.0.1) and there is an odd
behaviour that I do not understand.
When dealing with low scan rates I have remarked that the timestamp of
the returned average waveform can be higher than the timestamp of the
last value of the input waveform. For example:
Average type=Linear
Average time=20
Signal In
t0=16:10:00
dt=10
Y[0]=1.0
Y[1]=2.0
DC value Waveform
t0=16:10:20
dt=20
Y[0]=1.5
How is that possible? Shouldn't the timestamp of the returned waveform
be the same that the timestamp of the last value of the input waveform=
16:10:10?
01-21-2009 04:36 AM - edited 01-21-2009 04:36 AM
To me it looks as an 'expected' behaviour.
You have speciofied averaging time as 20 sec. So the first value will be available after 20 seconds from the start time. So if your start time is 16:00:00, average will start coming after 20Sec. Hence the start time will be 16:00:20.
01-21-2009 04:57 AM
I do not agree, the first value is already available after 10 seconds.
The extreme case is if you average a single value.
Signal In
t0=16:10:00
dt=10
Y[0]=1.0
DC value Waveform
t0=16:10:10
dt=10
Y[0]=1.0
Input time:16:00:00 -> Output time 16:00:10
You get the first "average" value at initialisation time, not after 10 seconds.
01-21-2009 05:29 AM - edited 01-21-2009 05:35 AM
01-21-2009 05:32 AM
The help for Averaged DC_RMS VI says this...
DC value waveform indicates DC values of signal in computed over averaging time seconds and time stamped continuously from the last reset.
This means that if t0 is the start time, first result will be available after 't0+ averaging time'. So the first point of the averaged data will be at 't0+averaging time'. Hence that waveform's start time will be 't0 + averaging time' and not t0 since at t0 that (averaged) value was not available. In your first example, averaging time is 20sec, hence t0 of result will be (initial t0 +20). In the second example that you mentioned, averaging time is 10sec, so t0 of result will be (initial t0 + 10).
01-21-2009 07:00 AM
Thank you for your replies.
You all are right, but from my point of view there is still an inconsistency. According to the help :
DC value waveform indicates DC values of signal in computed over averaging time seconds and time stamped continuously from the last reset.
you should get the data after the computed averaging time so if t0 is the start time, the first result should be available after 't0+ averaging time'. The timestamp of the first point of the averaged data is 't0+ averaging time' but it is returned at t0 and not t0+averaging time.
In my second example, shouldn't I get the average at the second call when t=t0+10 time instead of the first one t0?
What disturbs me is that I get data with a "future" timestamp!