LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average Data

Solved!
Go to solution

Sorry, I was being a narcisist, attached file may better suit you.  Yes, I plan to delete the beginning and ending data.

 

Thanks!

Christian

0 Kudos
Message 11 of 20
(1,400 Views)

Hi cseamour,

 

try this:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 20
(1,366 Views)

Gerd, the ptbypt VI does not look forward as required.

Message 13 of 20
(1,344 Views)

@altenbach wrote:

Gerd, the ptbypt VI does not look forward as required.


But his current setup will do the 10 before, 10 after, and the current.  Somebody just needs to snip off the ends that are invalid.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 20
(1,338 Views)

@crossrulz wrote:

@altenbach wrote:

Gerd, the ptbypt VI does not look forward as required.


But his current setup will do the 10 before, 10 after, and the current.  Somebody just needs to snip off the ends that are invalid.


That's what I meant. it requires some trimming and re-aligning of the outputs. In the current form it is incomplete.

0 Kudos
Message 15 of 20
(1,332 Views)

Hi to all,

 

yes, my snippet does not "look forward".

I provide hints to the OP, but I leave them something to think about it! (And I never said that I gave them a complete solution!)

 

In this case it's a simple matter of counting up some elements of an array. I hope the OP can count, right now (s)he can still use all fingers and toes if needed for… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 20
(1,318 Views)
Solution
Accepted by topic author cseymour05

There are many ways to apporach this and the attached VI will show some possibilities (adapted from here)

 

The explicit subset average is probably closest to the desired functionality, it simply takes an average of fewer points near the ends, keeping the data size constant.

 

Here is a quick comparison. Modify as needed.

 

 

 

 

Message 17 of 20
(1,310 Views)

Thanks "altenbach".

0 Kudos
Message 18 of 20
(1,303 Views)

Hi, I'm acquiring data from cRIO at 40Hz and put into a queue, the queue go to another while loop for calibration and write to text file. I attached the calibration for loop, I want some of the data written to file at 1 sample/second, the others at 40 samples/second. So, can I just add another for loop inside it and use the mean function to average 40 samples? Thank you, dude. average.JPG

0 Kudos
Message 19 of 20
(1,134 Views)

Xiao@Gemini wrote:

Thank you, dude. 


Nobody here is named dude and appending to a 4 year old thread that is already marked as solved does not seem to be such a great idea. Please start a new thread and attach your actual VI instead of a blurry and truncated picture. Why not just take the plain mean (i.e. not ptbypt) of the array?

 

 

 

0 Kudos
Message 20 of 20
(1,127 Views)