Page 1 of 1

i2 Pro - automatically measuring times

PostPosted: Thu Sep 04, 2008 10:01 pm
by Robin Poenisch
Hi everybody,

i'd like to have the i2 automatically doing time measurements for me.
e.g. measuring time of "Throttle Position > 90%" with a maths channel. is there a simple way to do this? i didn't find a proper function.

for now i tried it with "integrate". but integrate(1, "TPos" > 90, "TPos" < 80) doesn't work. a constant with "1" doesn't work too. so i tried integrate("TPos" / "TPos", "TPos" > 90, "TPos" < 80), this works like i wanted it. but it is not really the simplest way :) in germany we say "pfusch", i think translated would be "botch job".

i am sure MoTeC guys implemented a better way to do this in i2 Pro?!

greets
Robin

Re: i2 Pro - automatically measuring times

PostPosted: Fri Sep 05, 2008 2:35 pm
by DarrenR
Hi Robin,

There possibly is a better way to do what you want, but i don't see anything wrong with what you have. If it gives the correct result then you can't ask for much more.
No you can't use a constant in this function as it needs to be passed an array of data for the it's sample rate. It would be good in this case to use '1' but 'channel / channel' gives the same result.

Re: i2 Pro - automatically measuring times

PostPosted: Fri Sep 05, 2008 6:45 pm
by Robin Poenisch
Hi,

yes it works. and im glad that its possible to do such things easily with i2 Pro! I just thought there could be a function i didn't find.

thanks
Robin

Re: i2 Pro - automatically measuring times

PostPosted: Wed Feb 11, 2009 2:02 am
by Fermin
This is other way:

You do this once:

A: 1
B: integrate('A') [Rate:1000Hz]
Time: 'B' - stat_min('B') [Rate:1000Hz]

And after you do this by each parameter that you want measure the time

Z: 'Throttle Pos' > 90
Time with Throttle Pos > 90%: stat_mean('Z') * 'Time'

(You need only one integrate for everyone the parameters)