Torque

Forums

Forums

Complicated equatio...
 
Notifications
Clear all

Complicated equations

4 Posts
4 Users
0 Reactions
1,299 Views
(@dainichi)
Posts: 1
New Member
Topic starter
 

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?

 
Posted : 15/05/2013 9:18 pm
(@y97olle)
Posts: 6
Active Member
 

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?

 
Posted : 25/06/2013 11:50 am
(@capp777)
Posts: 2999
Famed Member
 

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]

 
Posted : 28/06/2013 2:12 am
(@admin)
Posts: 6550
Member Admin
 

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)

 
Posted : 29/06/2013 7:46 am
Share:

  Follow me on twitter