Average calculation only on a part of the data

  • Software
  • Average calculation only on a part of the data
Alexandre CHENIEZ

Posted on 29.05.2018 13:53

Hi !

I would like to know if there is an option to calculate the average of a channel, but only for one part of the channel data.

Like if I have 100000 samples and I would like to calculate the average only on the first 400 samples...

Thanks for your reply,

Alex

Urban Baš
Software Test Engineer I
Posted on 29.05.2018 17:00

Hello,

yes this is possible, you just need to add some math formulas. One for sample counting (scnt), two logical formulas which give you 1 when you reach your sample count and the statistic, which is set on start-stop blocks. You can add all this in analysis, you don't need to do this in measure. Attached you'll find a setup, with two formulas for triggers, a sample counter, a sample counter for a async signal, a signal, and the statistic.

Hope this help you with your project.

Urban



Attached files:
Alexandre CHENIEZ

Posted on 30.05.2018 09:24

Hi !

I tried it with the Stat. basic. function with a bloc of 400 samples without recoupling.

It works, but I didn't succeed in analysing only the first bloc so on the 400 first samples...

I used this formula : AverageValueEvery400Samples.data(0), but it didn't work...

It seems that this only copies my average signal already obtained.

Do you have any clue to just grab the first block of this average ?

Thank you !

Alex

Urban Baš
Software Test Engineer I
Posted on 30.05.2018 10:00

Hi,

can you please send your setup file and explain more what you want to do, because I don't completely understand the issue in your last post.


Alexandre CHENIEZ

Posted on 30.05.2018 10:10

Here is the setup file.

I just want to calculate the average on the first block (the average for the 4 first milliseconds of the "Pression" signal).


Attached files:
Urban Baš
Software Test Engineer I
Posted on 30.05.2018 10:34

I attached an edited version which calculates the average of the section which is marked on the picture. You can change this window by tooning the Trigger1 and trigger2 formulas.

Alexandre CHENIEZ

Posted on 30.05.2018 10:40

That wasn't that part, but I should be able to do something with your formula.

Thanks a lot for your fast answers !

Login to reply to this topic. If you don't have account yet, you can signup for free account .