612699
53
Zoom out
Zoom in
Vorherige Seite
1/94
Nächste Seite
SAE J1939 Messages
The SAE J1939 CAN standard is being used by
many types of heavy machinery – trucks, buses, and
agricultural equipment, to name a few. It uses the
familiar CAN (ISO 11898) physical interface, and
defines its own format for data transfer (which is very
similar to the ISO 15765 standard that is used for
automobiles).
The following will discuss a little of how data is
transferred using the J1939 standard. Considerably
more information is provided in the Society of
Automotive Engineers (SAE) standards documents, so
if you are going to be doing a lot of work with J1939, it
may be wise to purchase copies of them. At minimum,
the J1939-73 diagnostics, the J1939-21 data transfer,
and the J1939-71 vehicle application documents
should be purchased. Another great reference for this
work is the HS-J1939 two book set, also available from
the SAE.
The current version of the J1939 standard allows
only one data rate (250 kbps), but work is underway to
amend the standard so that an alternate rate of
500 kbps will also be allowed. For the purpose of this
discussion, the data rate is not important - it is the
format of the information that we will discuss.
All CAN messages are sent in ‘frames’, which are
data structures that have ID bits and data bytes, as
well as checksums and other items. Many of the J1939
frames are sent with eight data bytes, although there is
no requirement to do so (unlike ISO 15765, which
must always send eight data bytes in each frame). If a
J1939 message is eight bytes or less, it will be sent in
one frame, while longer messages are sent using
multiple frames, just like ISO 15765. When sending
multiple frames, a single data byte is used to assign a
‘sequence number’, which helps in determining if a
frame is missing, as well as in the reassembly of the
received message. Sequence numbers always start
with 01, so there is a maximum of 255 frames in a
message, or 1785 bytes.
One major feature of the J1939 standard is its very
orderly, well defined data structures. Related data is
defined and specified in what are called ‘parameter
groups’. Each parameter group is assigned a
‘parameter group number’, or PGN, that uniquely
defines that packet of information. Often, the
parameter groups consist of eight bytes of data (which
is convenient for CAN messages), but they are not
restricted to this. Many of the PGNs, and the data
within them (the SPNs) are defined in the J1939-71
document, and manufacturers also have the ability to
define their own proprietary PGNs.
The ID portion of a J1939 CAN frame is always 29
bits in length. It provides information as to the type of
message that is being sent, the priority of the
message, the device address that is sending it, and
the intended recipient. Information within the ID bits is
divided roughly into byte size pieces as follows:
Priority
PDU
Format
Destination
Address
Source
Address
8 bits 8 bits 8 bits2 bits3 bits
PDU1 Format
The data structure formed by the 29 bit ID, and the
associated data bytes is called a Protocol Data Unit, or
PDU. When the ID bits have a destination address
specified, as is shown above, it is said to be a PDU1
Format message.
The two bits shown between the Priority and the
PDU Format are known as the Extended Data Page
(EDP), and the Data Page (DP) bits. For J1939, EDP
must always be set to ‘0’, while the DP bit is used to
extend the range of values that the PDU Format may
have. While the DP bit is typically ‘0’ now, that may not
be true in the future.
Not all J1939 information is sent to a specific
address. In fact, one of the unique features of this
standard is that there is a large amount of information
that is being continually broadcast over the network,
with receivers using it as they see fit. In this way,
multiple devices requiring the same information do not
have to make multiple requests to obtain it, information
is provided at regular time intervals, and bus loading is
reduced.
If information is being broadcast over the network
to no particular address, then the Destination Address
field is not required. The eight bits can be put to better
use, possibly by extending the PDU Format field. This
is what is done for a PDU2 Format frame, as shown
here:
Priority
PDU
Format
Group
Extension
Source
Address
8 bits 8 bits 8 bits2 bits3 bits
PDU2 Format
So how does one know if they are looking at a
PDU1 Format frame that contains an address, or a
PDU2 Format frame that does not? The secret lies in
ELM327
53 of 94ELM327DSJ Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
53

Brauchen Sie Hilfe? Stellen Sie Ihre Frage.

Forenregeln

Missbrauch melden von Frage und/oder Antwort

Libble nimmt den Missbrauch seiner Dienste sehr ernst. Wir setzen uns dafür ein, derartige Missbrauchsfälle gemäß den Gesetzen Ihres Heimatlandes zu behandeln. Wenn Sie eine Meldung übermitteln, überprüfen wir Ihre Informationen und ergreifen entsprechende Maßnahmen. Wir melden uns nur dann wieder bei Ihnen, wenn wir weitere Einzelheiten wissen müssen oder weitere Informationen für Sie haben.

Art des Missbrauchs:

Zum Beispiel antisemitische Inhalte, rassistische Inhalte oder Material, das zu einer Gewalttat führen könnte.

Beispielsweise eine Kreditkartennummer, persönliche Identifikationsnummer oder unveröffentlichte Privatadresse. Beachten Sie, dass E-Mail-Adressen und der vollständige Name nicht als private Informationen angesehen werden.

Forenregeln

Um zu sinnvolle Fragen zu kommen halten Sie sich bitte an folgende Spielregeln:

Neu registrieren

Registrieren auf E - Mails für Elm 327 wenn:


Sie erhalten eine E-Mail, um sich für eine oder beide Optionen anzumelden.


Das Handbuch wird per E-Mail gesendet. Überprüfen Sie ihre E-Mail.

Wenn Sie innerhalb von 15 Minuten keine E-Mail mit dem Handbuch erhalten haben, kann es sein, dass Sie eine falsche E-Mail-Adresse eingegeben haben oder dass Ihr ISP eine maximale Größe eingestellt hat, um E-Mails zu erhalten, die kleiner als die Größe des Handbuchs sind.

Ihre Frage wurde zu diesem Forum hinzugefügt

Möchten Sie eine E-Mail erhalten, wenn neue Antworten und Fragen veröffentlicht werden? Geben Sie bitte Ihre Email-Adresse ein.



Info