PID $23[edit]

PID $23 is not limited to diesel engines, any engine where the fuel rail pressure is greater than that allowed by PID $22 may use it, gasoline direct injection for instance. Manufactures are required to report on one of the 3 fuel rail pressure PIDs PIDs $0A $22 or $23 if a fuel rail pressure sensor is fitted to their vehicles.

Rich and Lean fuel trims were switched. A negative fuel trim means the initially calculated fuel amount is too much (Rich) to achieve the desired Air/Fuel Ratio (14.7:1 under most driving conditions), and the ecm has to remove (hence the negative) a percentage from the calculated fuel amount. 68.84.176.20 06:15, 5 May 2007 (UTC)[reply]

Doubts[edit]

I also have some doubts on the PID=0x23 line that is marked with "?". Some sources state that the return will be packed in 2 bytes. Some sources sugest a convertion factor of 10 to achieve a result in kPa.

Merger proposal[edit]

The Table of OBD-II Codes seems that it should merged into this article because there is more information here. — CZmarlin (talk) 04:21, 2 January 2008 (UTC)[reply]

-- Agreed! Davide Andrea (talk) —Preceding comment was added at 17:59, 6 January 2008 (UTC)[reply]

-- Comment The OBD-II codes themselves are property of the Society of Automotive Engineers. 64.26.98.90 (talk) 17:09, 19 January 2008 (UTC)[reply]

-- Done. Davide Andrea (talk) 20:53, 29 February 2008 (UTC)[reply]

Adding more PIDs, and Mode 22 PIDs?[edit]

This article is great, and I just added two new PIDs from the range 0x50-0x60. I'll go through my notes and add more mode 1 PIDs over the next few days.

However, I also would like to add mode 22 PIds from SAE J/2190. Those are vendor specific; and there's issues about addressing those and prioritizing those messages on the OBD bus. What is the right answer for these? I'll put the PIDs in as they are, but presumably more information on this addressing belongs in a separate article on PWM/CAN modulation etc...?

63.107.91.99 (talk) 14:58, 7 November 2008 (UTC)[reply]

PIDs Copyright[edit]

Adding non-standard/Vendor-specific PIDs?[edit]

kb, bits, Kilobits, baud and Baudot[edit]

The article needs standardization on data rates and abbreviations for such;

b/sec is bit rate per second. kb or kb/sec is bit rate in thousands of bits per second. B and kB are symbols for Bytes and KiloBytes. These Bytes typically contain 8 or 9 bits each and are used often when discussing "storage" of data, not serial transport as we discuss here.

"baud" is a way of expressing the speed of serial data in symbols per second. The term gives credit to a pioneer in serial data, Emiel Baudot, but the baud term is all lower case. In a given serial data line, bit rate is always higher than baud rate. For example, in a 64QAM modem, M=64, and so the bit rate is N=6 times the baud rate. It is common for authors who are unfamiliar with "baud" to mistakenly substitute the term in place of "bits per second". — Preceding unsigned comment added by 71.252.233.46 (talk) 23:53, 23 November 2011 (UTC)[reply]

Mode 3 Description[edit]

The description of Mode 3 DTC parameter data seems to be specific to CAN-bus OBD-II ECUs. Older, pre-2003 OBD-II ECUs (i.e., J1850 VPW/PWM, ISO 9142-2 and Keyword 2000) pack DTC data into multiple OBD-II response packets somewhat differently. --Bruce D. Lightner (talk) 17:00, 14 December 2011 (UTC)[reply]

PID $32[edit]

It's strange that this is the only magnitude signed, if it is, I guess formula shoud be a "(AB)/4 (being AB a 16bit signed value)" which is not the same than "((A*256)+B)/4 (A is signed)" J VEP (talk) 19:13, 27 August 2012 (UTC)[reply]

Actually, when you add an unsigned 8-bit value of the second half to the signed first half multiplied by 256, you get the correct 16-bit 2's complement value. Therefore given a function—signed(a)—that tells a calculator to take these 8-bits as 2's complement, the following expression results in a signed 16-bit value: signed(A)×256 + B

It would be easier, I agree, if OBD software makers were more widely able to take in two bytes directly as a 16-bit number. Vickas54 (talk) 00:52, 17 March 2016 (UTC)[reply]
Beware that you are answering a question from 8 years ago.
The standards are expressed in terms of bytes because there is no universal standard on how to send 16-bits across a serial link. Some vendors send the upper 8-bits first and some send the lower 8-bits first - see byte order. By expressing it in terms of bytes A and B they can specify that A represents always the higher order byte, even on CPUs that use the opposite convention. This is a common problem for computer data communications and also a common solution.  Stepho  talk  03:49, 3 January 2021 (UTC)[reply]
There must be a better way than writing (256*A+B)/4 (AB is two's complement signed). What exactly is A and B if AB is signed? I would like to reference the page to people who are not "versed in programming", but know how to use an online unsigned←→signed calculator[1]. As I understand, the intention of 256*A+B is to specify the byte order without using big words like Big Endian. How about signed16(256*A+B)/4 where signed16(n) is two's complement signed of 16-bit integer n? Levchenca (talk) 17:54, 6 September 2021 (UTC)[reply]
The typical way is to calculate 256*A+B as though it was unsigned and then assign it into a signed 16-bit variable. 2's complement arithmetic will do the unsigned to signed conversion automatically - both forms have the same bit-pattern in memory. If you can't declare the number of bits or signed/unsigned (typical of many scripting languages) then you do (256*A)+B as unsigned, then subtract 65536 (216) if the answer is greater than 32767 (215-1). Do the final divide by 4 after the unsigned/signed conversion.  Stepho  talk  13:45, 8 September 2021 (UTC)[reply]

References

"Modes"[edit]

ISO 15031-5:2006 refers to "services" rather than modes. — Preceding unsigned comment added by 116.90.136.74 (talk) 02:59, 19 December 2012 (UTC)[reply]

PID A6/166 Odometer[edit]

The calculation leads to 252645135 when I assume 15 (max) for all values and not 526 385 151.9 hm (km/10) — Preceding unsigned comment added by Ride4sun (talk • contribs) 17:03, 29 December 2020 (UTC)[reply]

4 bytes representing an unsigned 32-bit number goes from 0 to 4294967295. Since each value counts 0.1 metres, that means the max distance is 429496729.5 metres. I have no idea where that old value came from but it is clearly wrong. I have fixed the article.  Stepho  talk  03:42, 3 January 2021 (UTC)[reply]

S-01 PID-02[edit]

Service 1 PID 2 needs clarifying. The description of "Freeze DTC" with no units or formula leaves me confused about it's meaning. Is it a count of the number of DTCs for which there is a 'freeze frame' of associated data? DiscreetParrot (talk) 00:47, 21 March 2023 (UTC)[reply]

When a DTC is raised by the ECU it stores a freeze frame of data (eg rpm). This is often helpful when trying to figure out what caused the problem (eg maybe it raises a DTC for misfire but only when rpm is higher than 5000, which indicates maybe a weak coil). "Freeze DTC" merely indicates which DTC triggered the freeze frame data to be stored. This is explained in OBD-II_PIDs#Service_02_-_Show_freeze_frame_data. Maybe we can change the terse "Freeze DTC" to "DTC that triggered the freeze frame".  Stepho  talk  03:13, 21 March 2023 (UTC)[reply]

Ah, that makes perfect sense, thank you so much for explaining it. --DiscreetParrot (talk) 19:56, 21 March 2023 (UTC)[reply]

S-01 PID-5F[edit]

Service 1 PID 5F is described as bit encoded, but we're lacking an explanation of what the bits map to. DiscreetParrot (talk) 00:52, 21 March 2023 (UTC)[reply]

S-01 PID-7C[edit]

This is listed as being 9 bytes, yet it's described as a single temperature value and the formula only uses two bytes, which seems odd. DiscreetParrot (talk) 00:55, 21 March 2023 (UTC)[reply]