Torque

Forums

Forums

Guest  

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




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Custom PID codes

Pages: 1 2 3 4 5 6 [7] 8
Author Topic: Custom PID codes
piemmm
Administrator
Posts: 6080
Post Re: Custom PID codes
on: July 20, 2011 (GMT)

Er,

PID: 0104 only returns a single value, so you have ‘A’ and that’s about it so I’m confused as to how you’re saying that it has 32 variables which isn’t the case for a Mode 1 PID….

usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 20, 2011 (GMT)

Ian,

Thanks for pointing that out. I thought the mapping of the variable is the same for both mode 1 and mode 21.

So in mode 1, A = Data[3] and in mode 21, A = Data[4]?

21C3 has 6 frames with 57 variables but the data starts from Data[4].

The data for 21C4, 21D0, 21CE and 21CF start from Data[4] also so we should be good.

piemmm
Administrator
Posts: 6080
Post Re: Custom PID codes
on: July 20, 2011 (GMT)

in mode 1 pid 04, A should be the first data value returned (but not the response ie: we ignore ’41 04′, so A starts at the next byte.

Same should be true for the other modes as well, so for 21 C3, you won’t be able to reference the ’61’ or ‘C3’ return values, but the next value should, and it should be A

When a multi frame is received, an extra byte is skipped as well at the start of the response

or at least that’s how it’s supposed to work (it seemed to obey this when I was running it on the test setup I had)

usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 20, 2011 (GMT)

I found Air-Fuel Ratio in mode 21 that uses Data[3].

PID: 2144
Unit: Volts
Equation: (Data[3] * 0.0078) + (Data[4] * 0.000030487060546875)
Header: 7E0

In that case, A = Data[4] and Data[3] = ??

usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 20, 2011 (GMT)

Thanks for the explanation. I will add more custom PIDs and will let you know if there is anything unexpected.

Any question for issue#1? Weird, it only happens to certain custom PIDs.

piemmm
Administrator
Posts: 6080
Post Re: Custom PID codes
on: July 21, 2011 (GMT)

Hm

You may need to recreate the display if you have changed the units in the extended PID (though it should update the units when the display has fresh data anyway). This is a ‘feature’ not really a bug, but I’ll have a look to see if I can make it less confusing.

usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 21, 2011 (GMT)

The units are correct in the extended PID editor. In fact MG2 Torq is the predefined one that you added. If I delete and add it (disconnected from the car) in the realtime information screen, the units are correct. The moment it receives data from the car, the unit got messed up.

piemmm
Administrator
Posts: 6080
Post Re: Custom PID codes
on: July 21, 2011 (GMT)

Spot on! That’s the bit of useful information that’s just helped me find this, thanks!

Yes, it’s a bug. Fixed here, so you’ll get it in the next update

usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 22, 2011 (GMT)

Ian,

Some of Prius PID need a bit from a response byte. Is there a way to do it?

piemmm
Administrator
Posts: 6080
Post Re: Custom PID codes
on: July 22, 2011 (GMT)

Hi

Is that for an on/off sensor?

usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 22, 2011 (GMT)

I have not seen the data but it appears to be On/Off or 0/1 type.

    Smart Key Status
    Aircon Request
    Engine Idling Request
    Engine Stop Request
piemmm
Administrator
Posts: 6080
Post Re: Custom PID codes
on: July 22, 2011 (GMT)

Hm, I’m really going to need to document the equation parser on the wiki :-)

Okay, you may need a new display type (but I will definately need to modify the equation parser to do this). Should be fairly straightforward. I’ll think what needs to be done over this weekend and come up with something easy to use

Ian

usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 22, 2011 (GMT)

I shared the spreadsheet with over 120 PIDs for Gen2 Prius. I don’t know if you want to add them to the predefined list.

https://spreadsheets.google.com/spreadsheet/ccc?key=0AkFZW7FRTY-tdHVEWFRPVElxdG9MRmtYaHUxM2E5NEE&hl=en_US#gid=0

piemmm
Administrator
Posts: 6080
Post Re: Custom PID codes
on: July 24, 2011 (GMT)

Hi

I’ve finished the mods to the equation parser – in the next update, you can pull individual bits from values returned from the ECU – the format for the equation is:

Equation: {A:4} (note the use of curly brackets)

Pulls the 4th bit from value A. Which will be ‘1’ if set and ‘0’ if not set. This should help you with the bitwise stuff. Also, I’ve added a new display – an on/off style widget which returns ‘on’ for any PID whose value is greater than 0

The predefined list is good, though not ideal, I’m in the middle of adding ‘load from file’ functionality into the editor so people can just drop a file on their SD card. You’ll then be able to post your PIDs for people to use in the app (you can also write a small market app to do this and put the file in the correct location). I have a mazda user who wants me to do this, so expect it to happen in the next week.

EDIT: Scratch that, just finished adding it. There will be a folder called ‘.torque/extendedpids’ in the next update on your SD card to which you can put CSV files inside.
The structure of the CSV file will be:

 "Name", "ShortName", "ModeAndPID", "Equation", "Min Value", "Max Value", "Units", "Header"
 "Transmission Temperature(Method 3)", "Trans", "0105", "A-40", 0, 200, "C", "TCM"
usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 28, 2011 (GMT)

Gotta love you, Ian. I was able to add 117 PIDs so easily with the CSV import approach.

I found the “.torque” folder but there was no “extendedpids” folder inside it. I manually created and copied my CSV file there. It worked perfectly.

Did you intentionally leave out (not that I use it) the Scale Factor in the CSV format?

Hondacrzy
Member
Posts: 7
Post Re: Custom PID codes
on: July 28, 2011 (GMT)

USB
How many of the PIDS have you confirmed to work. I tried the original few that you made and had trouble getting the proper readings. I was not sure if was the pid or possibly my cheep adapter? I have not tried any lately. Thanks for all the work you have put into this.

piemmm
Administrator
Posts: 6080
Post Re: Custom PID codes
on: July 28, 2011 (GMT)

I didn’t put the scale factor in as I didn’t think anyone used it :-)

I’ll see if I can tag it to the end of the CSV file in a later version – though end of next week I’m going on holiday so will be away from the machine for about 3 weeks (my better-half enforcing no internet on holiday ;-))

von jot
Member
Posts: 23
Post Re: Custom PID codes
on: July 28, 2011 (GMT)

Are there any BMW specific PID’s available yet? Would be nice… I really wouldn’t know how to create them myself.

usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 28, 2011 (GMT)

@Hondacrzy – All of them returns data. I have looked at the data and 75% of them makes sense. The rest of them probably needs to verify with the car moving.

The cheap clones I also have cannot read hybrid specific data on CAN Bus. I have Kiwi and it works great!

usbseawolf2000
Member
Posts: 34
Post Re: Custom PID codes
on: July 28, 2011 (GMT)

Ian,

With so many PIDs to choose from, a search or filter feature would be nice. 😀

Pages: 1 2 3 4 5 6 [7] 8
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.461 seconds.

  Follow me on twitter