English
Language : 

ELM322_09 Datasheet, PDF (13/18 Pages) ELM Electronics – OBD (VPW) to RS232 Interpreter
ELM322
Advanced Data Retrieval – Setting the Headers
Prior to v2.0, the ELM322 used a fixed format for
the message headers, allowing only for the retrieval of
the mandated diagnostic codes, not allowing the user
to change them. The IC is now fully programmable,
however, allowing the headers to be changed and a
great deal more information to be obtained, if your
vehicle supports it. Note that only the OBDII diagnostic
codes have been mandated, so there is no
requirement for all vehicles to support these extra
capabilities.
The diagnostic trouble codes that most people are
familiar with are described by SAE standard J1979
(ISO15031-5). This is really a specific instance of the
many modes allowed by the J2178-4 standard, which
provides for information transfer through what is
known as ‘functional addressing’. For the OBDII
mandated diagnostics, requests are actually made to
the functional address 6A, with whatever processor is
responsible for this function answering the request.
Theoretically many different processors can respond
to a single functional request, each contributing their
insight as to the information requested.
To retrieve some of this extra information, the
function being addressed needs to be known. For
example, consider that you have studied the J2178
standards and want to request that the processor
responsible for Engine Coolant provide the current
Fluid Temperature. You determine that Engine Coolant
is functional address 48, you know that your address
as a scan tool is normally F1, and knowing that the
ELM322 does not generate In-Frame Responses (so
only supports message types 8 to 15), you choose A8
as the initial priority/type byte.
Combining the above, then, it is desirable to set
the three header bytes to A8 48 F1. This is done with
the Set Header command, which would be issued at
the prompt as follows:
>AT SH A8 48 F1
The three header bytes assigned in this manner
will stay in effect until changed with another AT SH
command, a reset, etc. If the default Auto Receive
mode has been selected, the receive address will
automatically be set to 49 (the second byte plus one).
This is consistent with the functional pairs assigned by
J2178-4. If you decide that this is not appropriate for
your case, you can always set the receive address to
what you wish using the AT SR command. For
example, if you wanted to obtain a response that is
being sent to address 6B instead, you would use AT
SR 6B to override the automatic receive mode. Any
receive address selected stays in effect until changed
by another AT SR, or reinstatement of the automatic
mode.
Having set the headers, all one needs to do is
issue the secondary ID for fluid temperature (10) at the
prompt. If the display of headers is turned off, the
conversation could typically look like this:
>10
10 2E
The response to ID 10 is the byte 2E, in this case.
You may find that some requests, being of a low
priority, may not be answered immediately, possibly
causing a ‘NO DATA’ result. In these cases, you may
want to adjust the timeout value, perhaps first trying
the maximum (with AT ST FF).
Using the physical addressing modes described
by the J2190 standard involves an almost identical
process. The main difference is that you must know
the physical address of the device that you want to
speak to. This address is always the third byte of a
message sent by that device, so can be determined by
monitoring the headers. Knowing that you wish to talk
to address 10, for example, that your physical address
is F1, and that for physical node to node addressing
EC may be appropriate for the first byte, you would
change the header bytes using AT SH EC 10 F1. If
Auto Receive is enabled, the receive address will
automatically be set to F1, your physical address (the
ELM322 knows to do this from the first byte). As
before, this header will remain in effect for every
message sent until changed to something else.
One caution to note with physical addressing.
There are modes which initiate the constant sending of
data, and if the ELM322’s timeout is set longer than
the duration between responses, the ELM322 may
return messages forever. In these cases, just like in
the monitoring modes, a single character will have to
be sent to interrupt the process.
Finally, please note that while we have provided
some information on the SAE standards for the
examples, Elm Electronics will only reply to requests
for clarification on our product’s operation, and not on
the standards. It is the customer’s responsibility to
obtain their own information on the relevant standards,
and on their vehicle. Requests to Elm Electronics for
this information will go unanswered.
ELM322DSF
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
13 of 18