612699
53
Verklein
Vergroot
Pagina terug
1/94
Pagina verder
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

Hulp nodig? Stel uw vraag in het forum

Spelregels
1

Forum

Elm-327

Zoeken resetten

Misbruik melden

Gebruikershandleiding.com neemt misbruik van zijn services uitermate serieus. U kunt hieronder aangeven waarom deze vraag ongepast is. Wij controleren de vraag en zonodig wordt deze verwijderd.

Product:

Bijvoorbeeld antisemitische inhoud, racistische inhoud, of materiaal dat gewelddadige fysieke handelingen tot gevolg kan hebben.

Bijvoorbeeld een creditcardnummer, een persoonlijk identificatienummer, of een geheim adres. E-mailadressen en volledige namen worden niet als privégegevens beschouwd.

Spelregels forum

Om tot zinvolle vragen te komen hanteren wij de volgende spelregels:

Belangrijk! Als er een antwoord wordt gegeven op uw vraag, dan is het voor de gever van het antwoord nuttig om te weten als u er wel (of niet) mee geholpen bent! Wij vragen u dus ook te reageren op een antwoord.

Belangrijk! Antwoorden worden ook per e-mail naar abonnees gestuurd. Laat uw emailadres achter op deze site, zodat u op de hoogte blijft. U krijgt dan ook andere vragen en antwoorden te zien.

Abonneren

Abonneer u voor het ontvangen van emails voor uw Elm 327 bij:


U ontvangt een email met instructies om u voor één of beide opties in te schrijven.


Ontvang uw handleiding per email

Vul uw emailadres in en ontvang de handleiding van Elm 327 in de taal/talen: Engels als bijlage per email.

De handleiding is 0,23 mb groot.

 

U ontvangt de handleiding per email binnen enkele minuten. Als u geen email heeft ontvangen, dan heeft u waarschijnlijk een verkeerd emailadres ingevuld of is uw mailbox te vol. Daarnaast kan het zijn dat uw internetprovider een maximum heeft aan de grootte per email. Omdat hier een handleiding wordt meegestuurd, kan het voorkomen dat de email groter is dan toegestaan bij uw provider.

Stel vragen via chat aan uw handleiding

Stel uw vraag over deze PDF

loading

Uw handleiding is per email verstuurd. Controleer uw email

Als u niet binnen een kwartier uw email met handleiding ontvangen heeft, kan het zijn dat u een verkeerd emailadres heeft ingevuld of dat uw emailprovider een maximum grootte per email heeft ingesteld die kleiner is dan de grootte van de handleiding.

Er is een email naar u verstuurd om uw inschrijving definitief te maken.

Controleer uw email en volg de aanwijzingen op om uw inschrijving definitief te maken

U heeft geen emailadres opgegeven

Als u de handleiding per email wilt ontvangen, vul dan een geldig emailadres in.

Uw vraag is op deze pagina toegevoegd

Wilt u een email ontvangen bij een antwoord en/of nieuwe vragen? Vul dan hier uw emailadres in.



Info