Torque

Forums

Forums

Guest  

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




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » PID equation info

Pages: [1]
Author Topic: PID equation info
tokie
Member
Posts: 8
Post PID equation info
on: October 16, 2014 (GMT)

Hello, I’m new to PIDs. I have two for tranny info for my Ram 3500. I do not know what I’m to input in the equation area. Can anyone explain or direct me to somewhere that explains what is wanted by the equation field?
Thanks.

Capp777
Member
Posts: 2993
Post Re: PID equation info
on: October 16, 2014 (GMT)

Maybe this link can help…

http://torque-bhp.com/forums/?wpforumaction=viewtopic&t=5211.0

You can also look at the equations of some of
the predefined pids for additional examples.

There is also a thread on math functions available
in Torque which typically is found within the first
five forum pages.

tokie
Member
Posts: 8
Post Re: PID equation info
on: October 18, 2014 (GMT)

Thanks cap777.
So if I’m understanding correctly the equation is not an equation for determining the function wanted, such as in my case I’m wanting the line pressure from my transmission when running. The equation is to interpret the output hexidecimal code into useful information for the recipient. Is this correct?
Thanks.

Capp777
Member
Posts: 2993
Post Re: PID equation info
on: October 18, 2014 (GMT)

Your adapter will request info from
your vehicle by mode/pid in hex and
the data is returned in hex.

Torque assigns variables to the data bytes
returned in the form of A, B, C,…Z, AA, AB,
etc. where variable A is the first data byte
after the non data bytes.

Torque is converting the byte’s contents to
decimal for use in the equation.

For bytes A=FF and B=FF in hex …

then A=255 and B=255 in decimal …

(A*256)+B)=(255*256)+255=65535=FFFF hex

You will need to specify the correct mode/pid
to retrieve the line pressure. The equation then
scales the resulting data to usable units.

tokie
Member
Posts: 8
Post Re: PID equation info
on: October 19, 2014 (GMT)

As I understand about the two PID codes that I have to attain the info from the OBD2 system for the line pressure, they will return a 1-byte result that is the pressure in psi. The hex value must be converted to a decimal value, so a response of 5A [hex] would be 90 [decimal] psi). Does this correlate with what you are telling me?

I don’t mean to be so dumb about this as I’m a Civil Engineer and pretty good at math but I have no background in PID or hexadecimal stuff so I feel quite lost and not grasping the understanding you are graciously trying to get me to understand. I grasp the hexidecimal number system but I’m not grasping all that you provided in the most recent post. I’ve done some online reading of PID’s but am just scratching the surface as far as understandng what the Torque app is wanting from me regarding the equation, or what I need to provide for the equation. If the PID code I have returns a hex value then converting to decimal that is straight forward. But as I read through your post i am not so sure it’s that straight forward. I’m going to study your post at greater length shortly and see if can extract more from it.

Thanks for your help. It’s truly appreciated.

Capp777
Member
Posts: 2993
Post Re: PID equation info
on: October 19, 2014 (GMT)

For example…

(Just making this up since I dont know
the real pid)

Request:

221234

Response:

6212345A

where 5A is the only data byte.

Then equation A would return 90 decimal.

If the response was two bytes…

6212345A01

Then equation (A*256)+B would return 23041.

If the data of interest is further into the hex
response then you would use appropriate Torque
variables to retrieve…

62123400005A01

(C*256)+D would return 23041.

tokie
Member
Posts: 8
Post Re: PID equation info
on: October 20, 2014 (GMT)

Thank you. I’m beginning to understand.

tokie
Member
Posts: 8
Post Re: PID equation info
on: November 4, 2014 (GMT)

Well I thought I was beginning to understand, but no.
My PID resembles this: 23B01A and should return a 1-byte value. For the equation I’ve tried “=A”, “A”, “1A”, “5A” “=1A”. Some return that the equation is not correct. If I remember correctly using “a” did return a string of characters about 8 or 9 long, but didn’t make any sense to me or what I was to extract from it.
Anyone have thoughts on what the equation should be for this PID?
Secondly, where can I find info on the start and end commands? I don’t know how to start or stop the action, or if I even need to command it to start or stop.
Thanks.

Capp777
Member
Posts: 2993
Post Re: PID equation info
on: November 4, 2014 (GMT)

Your pid is not mode 22 and maybe using
physical addressing. Not sure how Torque
would handle that mode.

Can you post the test response?

I would create test pids using
equation A
equation B
equation C
etc.

to see how Torque is handling the
response.

Assuming your data of interest is embedded
in the response string, the fun part is trying
to figure which byte(s) and what value it may
represent.

Edit:

The diagnostic start/stop fields in the pid
editor are experimental. I suggest these be
left alone until further notice from Ian.

Most diagnostic tests involve the user doing
an action during the test, i.e., turn the steering
wheel, press the brake pedal, shift thru the gear
positions, etc. It is not clear how the pid editor
fields will accomplish user interaction and
diagnostic DTC reporting.

tokie
Member
Posts: 8
Post Re: PID equation info
on: November 4, 2014 (GMT)

What I have is the PID for the transmission line pressure for my Dodge ram (not exactly the one I provided, but character-ily similar). Its from a Chrysler friend but I must keep the real PID to myself. After looking at the Torque information I gave him (mostly this Forum string) he started out would be a service ID 22. I have no idea what the “mode” means in the PID world. He thought after looking at the forum info I sent him he sent me what he thought the Chrysler PID would be proceeded by service I’d 22. (I’ll have to finish this post shortly).

Capp777
Member
Posts: 2993
Post Re: PID equation info
on: November 5, 2014 (GMT)

Modes are the commands used by OBD
to perform certain actions/commands.

Most extended pids typically use mode
21 or 22 to return data by offset or
parameter i.d.

I believe mode 23 returns data by physical
addressing.

The first two hex characters are the mode.
The remaining hex characters are used by
the mode for offset, parameter i.d. or memory
addressing.

Your pid example minus the 23 is very close to the
TFT pid for pre2012 jeeps included in Torque’s
predefined pid list. Except it uses mode 22.

moreause
Member
Posts: 637
Post Re: PID equation info
on: November 5, 2014 (GMT)

this help me to begin with
http://en.wikipedia.org/wiki/OBD-II_PIDs

these are the standard modes

Mode (hex) Description
01 Show current data
02 Show freeze frame data
03 Show stored Diagnostic Trouble Codes
04 Clear Diagnostic Trouble Codes and stored values
05 Test results, oxygen sensor monitoring (non CAN only)
06 Test results, other component/system monitoring (Test results, oxygen sensor monitoring for CAN only)
07 Show pending Diagnostic Trouble Codes (detected during current or last driving cycle)
08 Control operation of on-board component/system
09 Request vehicle information
0A Permanent Diagnostic Trouble Codes (DTCs) (Cleared DTCs)

so normally you want mode 01

so torque send

21 and 22 is the bit of the same as 01 but a bit less standard

this is the one a use

i ask for 2101

if you do TEST in the PID you will see what is the full answer to that request

in my case

the response is a bunch of line

i start with 06101 to say it a response to 2101,,it add 40 to the request so 6101
after that you need to know a bit for what you are looking for

A is the value of the next 2 digit, B the 2 after that ect

in my case the response was five row

and the response was way back there

in my case it was to get boost pressure to find it i used a 10k trim pot instead of the sensor and was moving value from 0 to 5V so i could see the full range

my math was ((45.6124/1023)*(O+P*256))-([33]*0.14503)

in my case the response is in two byte O and P
O increase from 0 to FF (255) and the roll over to 0 but P increase of 1

sometime you lucky and the value get out in standard form

in my case it was not

45.6125 is the psi range of the sensor (3 bar so 0 to 45.6125 psi)

divided by 1023…when i was at max it would gave me 1023 and 1024 is common any way like 255

O+P*255 to get the current result

[33] if found in torque while playing it’s atmopherique pressure in kpa i think…multiply by 0.14503 to put in psi

so like that i have neg value in vaccum and plus in boost

before i did that i even did some trick with my arduino…
i was reading the 0-5V signal from the sensor

and using torque to request an adress with no response, the arduino was responding instead of the pcm…torque was good with that lol he had a response…

tokie
Member
Posts: 8
Post Re: PID equation info
on: November 5, 2014 (GMT)

Moreause, thanks for all that. I’ve not had time to set down and read thru it with depth yet but wanted to get back to finishing my last post. After reading it, the end was somewhat confusing.

Actually, I gave my PID the 23 mode. It should be 22. I was trying to protect the true characters in the PID, upholding my non-disclosure promise to my friend.

Using the PID 22b0#@ (#= a number, @= a letter) with the equation defined as “a” and as “0a” I get a response from the TEST of 7E9037F2280 and 7E8037F2212.

Do they mean anything close to a one byte answer representing a pressure value (psi)?

Thanks.

Capp777
Member
Posts: 2993
Post Re: PID equation info
on: November 5, 2014 (GMT)

.
I believe the 7F22.. were unsuccessful for
7E0 and 7E1. (ECU and TCM).

Just a heads up… A response from a successful
call will include the pid that you are trying to
protect.

For the Jeep TFT pid to work, a tester present
command (or diagnostics enable command) had
to be issued first… not sure if this could be an
issue for you.

Suggest you edit the jeep predefined list pids
just to see how it was accomplished.

moreause
Member
Posts: 637
Post Re: PID equation info
on: November 5, 2014 (GMT)

ps i have edited my post to hide your adress..you can do the same in your post

when you do test is show you the the full answer and the result of the equation also

7E8034XXX12

is
7E8 us the response from 7E0 request (original plus 8 )
03 is how much byte the message as if i remember correctly..so you will have 6 caracters after this one
4XXX is saying it your reponse from your undisclosed adress plus 4000 (normally) ..oups
12 in hex is the result of the request…

7E9034XXX80

is
7E9 us the response from 7E1 request (original plus 8 )
03 is how much byte the message as if i remember correctly..so you will have 6 caracters after this one
4XXX is saying it your reponse from your undisclosed adress plus 4000 (normally) ..oups
80 in hex is the result of the request…

so unluncky for you you have 2 device that respond to that adress request

but if i remember 7e9 is normally the transmission

since you just have one BYTE at the end you just need to use A in your formula…if you had 2 byte then it would be A for the first and B for the second

for what is exactly the exact value …. that is the issue in those area there is no specific standard for X equal what pressure….but they normally don’t reinvent the wheel

so you can start with the standard stuff

0A 1 Fuel pressure 0 765 kPa (gauge) A*3
0B 1 Intake manifold absolute pressure 0 255 kPa (absolute) A

see if they look good in kpa or need to multiply

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

  Follow me on twitter