12-04-2012 07:40 AM
Hello everyone.
Can i make a time interval, where i can measure average value for a waveform chart ?
for example fom 0:30 to 0:45
I have uploadet my VI
:
Thanks in advance
Oesen
Solved! Go to Solution.
12-04-2012 09:00 AM
Oesen,
With a graph it is very easy - use cursors. However, charts do not have cursors. You can use a property node to get the chart history data and use array subset to extract a portion of that. This will not give you a visual indication on the chart of the data you want to average.
What happens if you are selecting some data to average and it "slides" off the chart while you are selecting or after the selection but before the average?
Lynn
12-04-2012 03:42 PM
Thanks for the answer johnsold
I don't really understand your question. Can you go more thoroughly into the question please
Thanks in advance
Oesen
12-05-2012 05:17 AM
Can someone help please ? 😞
12-05-2012 05:27 AM
HI I have attached a VI. Is that you were looking for?
12-05-2012 05:28 AM
Oesen,
When you are displaying data on a chart, the newest data is appears at the right of the previous data. When the chart history buffer is full (default length = 1024), adding a new point deletes the oldest point. Visually it appears that the data slides to the left as new data is added to the right end.
My question relates to how the user would "tell" the program what data to average. In the image you posted you marked a segment of the data to be averaged. Suppose the user marks point "A" as the beginning of the segment. While the user is deciding where to put mark "B" additional data is acquired and point "A" disappears because it is beyond the history length. What does the program do in such a case? A slight variation is the situation where both "A" and "B" have been marked but some of the data is deleted from the history before the averaging or other processing has begun.
Lynn
12-05-2012 05:45 AM
Thanks for the answers
If my measurement test is about 1 hour, then i can set X.Min to 0 and X.Max to 60*60. I think i can ret rid of "sliding" when i use that method ?, so the chart automatically stops after one hour.
12-05-2012 05:51 AM
Thanks for the answer Aojha
I don't really need a running average, but a average between a Min.Time and Max.Time i will adjust from the Time-axis.
12-05-2012 05:56 AM
If you are doing post processing then, just put every data in an array.
Find its subset by taking indexes corresponding to Min. Time and Max. Time and caculate average.
12-05-2012 06:06 AM - edited 12-05-2012 06:07 AM
Thanks for the answer Aojha
I really want to determine the average value from the peaks in the chart (i'm measuring pressure), so it will be a long way, if i'm going to find the Min.Time and Max.Time from the numbers in the array.