Thanks that helps. But I wish to add it with sample time. I want to see time in the saving file also as 1, 2, 3, 4ms...so on with data file.
See this thread here for discussion on using lossy enqueue element to keep a running average. If the number of points you want to average changes you can destroy the queue, take the elements remaining and queue them back up in a new queue which has a different size configured.
Specifically see the post by Jeff B.