Torque

Forums

Forums

Guest  

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




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » How are PIDs calculated and made?

Pages: [1]
Author Topic: How are PIDs calculated and made?
timmyjane
Member
Posts: 1
Post How are PIDs calculated and made?
on: September 4, 2014 (GMT)

I have googled and searched this forum for my answer. Perhaps someone can explain what I’m looking at. It seems all the equations contain A and B variables. Where are these numbers coming from? Let say I had a custom PID that wasn’t working quite right, how would I go about decoding the formula to be able to make changes or additions? Is there a how to guide anywhere?

Thanks for the help.

Capp777
Member
Posts: 2993
Post Re: How are PIDs calculated and made?
on: September 4, 2014 (GMT)

A & B variables are simply values (bytes)
returned in the hex response to your pid
request.

Byte A is the first data byte, Byte B is the second,
Byte C is the third, etc.

For example:

For pid request 221674… a response will be
621674AABB.

where 621674 are non-data bytes and
AABB are data bytes.

Each byte is a value from 0-255 decimal
(0-FF hexdecimal).

Two bytes is a value from 0-65535 decimal
(0-FFFF hexdecimal).

Some values are returned in one byte,
e.g., A*(9/5)-40.

Others may be represented in two bytes,
((A*256)+B)*10*0.145038.

It depends on how your vehicle is reporting
the data.

The formula is used to convert the decimal
equivalent of the raw hex bytes into a correctly
scaled value for the pid.

A response may return data for more than one
sensor.

An important point to make is that if the data
bytes for the sensor of interest are further into
the hex response then you would need to use
the correct variable byte(s). e.g., ((C*256)+D)*10*0.145038.

It all depends on how the value is returned in your
vehicles hex response.

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

  Follow me on twitter