Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Complicated equations

Pages: [1]
Author Topic: Complicated equations
dainichi
Member
Posts: 1
Post Complicated equations
on: May 15, 2013 (GMT)

What is the accepted format of the equations?
I would like to create a few HP guages through custom PID, but this require combining parameters from two separate PIDs
the dialog makes note of a format like [pid] + A + 10

I need something more like [pid1:paramA] * [pid2:paramB] * 2 * 3.1415/33000

is this possible?

y97olle
Member
Posts: 6
Post Re: Complicated equations
on: June 25, 2013 (GMT)

Bump, also interested!

Quote from dainichi on May 15, 2013
What is the accepted format of the equations?
I would like to create a few HP guages through custom PID, but this require combining parameters from two separate PIDs
the dialog makes note of a format like [pid] + A + 10

I need something more like [pid1:paramA] * [pid2:paramB] * 2 * 3.1415/33000

is this possible?

Capp777
Member
Posts: 2926
Post Re: Complicated equations
on: June 28, 2013 (GMT)

Hopefully this answers your questions…

Quote from admin on November 27, 2011
When you are calculating from other PIDs, you don’t need to worry about bytes in the response as they are already converted to a numeric value by the time you put in [0c] (etc) into the equation

If your PID asks the ECU for a response then your byte fields will be put into variables ‘A’ ‘B’ (etc).

So

For a plain old extended PID you may have:

Name: Cylinder 1 Misfire history
PID: 221201
Equation: (A*256)+B

If you were to use that PID in another equation, you may have:

Name: A new PID
PID: (leave blank)
Equation: [221201] + [0c]

Or you can try the best of both:

Name: A pid that makes a request and uses another PID
PID: 22199E
Equation: (A * 0.0195) + [0c]

piemmm
Administrator
Posts: 6332
Post Re: Complicated equations
on: June 29, 2013 (GMT)

Hi

It is very important to use brackets ( ) in the equation editor so the order of parsing is correct (it does not follow the normal method for parsing like you would get in a calculator)

Wrap brackets around the bits you want calculating first – this controls the order and is important when you have addition and multiplication present

(I’ll add a note about this in the equation editor as it should be a good idea)

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.018 seconds.

  Follow me on twitter