Hi, I'm having difficulty with Pi syntax. I created a mathematical channel that is a condition.

[Speed]> 150. Whenever this condition occurs, it will marke "1".

Now I need to calculate how many meters the car be in that condition(speed>150).

In the other software I used we used this formula:

integrate(Speed[m/s], channel=1, range_change(‘outings:laps’)) 

If anyone can help me, I'm grateful.
Quote 0 0
        I am no Guru on Pi maths but this will give you a indication to use in overlays.. Unfortunately if you want the exact distance each time (starting from 0m) you will need to use the R key to highlight the start point and move to the end point. I can only get it to calculate from the total distance.. you will see when you apply.  choose(([Speed150]>0),integral([Speed],Reset),0)   Choose is something like If..  If Speed150 is greater than 0, return Integral of speed, otherwise return 0..   Then Click on More (bottom left) and set Quantity to Length, Units to Metres.   to do speed integral to get distance...   integral([Speed],Reset)

At least it is something..  Pi help is good with the syntax's.
Quote 1 0
or you could just use choose(([Speed150]>0),[Distance],0)  if you are logging distance.. Be very careful with Pi Syntax.. if you want to select a channel say [Distance] the maths will also allow [distance] but the channel will not calculate. Case sensitive but the channel will still come up brown even if it does not exist.

Quote 1 0
Hi Both,

The main way I do these integral based channels are shown below,

Set the speed threshold using a choose and the gate to split the laps using a small discontinuity.
Then apply the integral to this function giving the distance within the speed threshold/lap.
dist cap.png 
please note that the Reset the integral at each discontinuity, the hold will continue this across discontinuity.  

The output shows something like this

Attached are the math channels used


Cosworth Support
Cosworth Electronics 


Quote 1 0