User Manual Part 5

User Guide to Q4000/QPRO
Document Number 1135-4713 Rev G
THIS DOCUMENT CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION OF QUAKE GLOBAL CORPORATION. IT MAY BE USED BY
RECIPIENT ONLY FOR THE PURPOSE FOR WHICH IT WAS TRANSMITTED AND WILL BE RETURNED UPON REQUEST OR WHEN NO LONGER NEEDED
BY RECIPIENT. DISCLOSURE TO UNAUTHORIZED THIRD PARTIES OR DUPLICATION WITHOUT THE EXPRESS WRITTEN PERMISSION OF QUAKE
GLOBAL IS PROHIBITED.
Page 107
CONFIDENTIAL
Information classified Confidential
-
Do not copy (See last page for obligations)
12.4.4 DemoAppCAN
The DemoAppCAN sample application demonstrates how the Q4000/QPRO receives Society of
Automotive Engineers (SAE) J1939 messages on the CAN bus. SAE J1939 is the vehicle bus
standard used for communication and diagnostics among vehicle components, originally by the
car and heavy duty truck industry in the United States. Note that this sample application uses
network-specific calls.
All J1939 packets, except for the request packet, contain eight bytes of data and a standard
header which contains an index called a PGN (Parameter Group Number). A PGN identifies a
message's function and associated data. J1939 attempts to define standard PGNs to encompass
a wide range of automotive, agricultural, marine and off-road vehicle purposes. PGNs define the
data, which are made up of a variable number of Suspect Parameter Number (SPN) elements
defined for unique data.
An instrument cluster PGN may be received where the SPNs in the group are fuel level, oil
pressure, and coolant temperature. Some of the parameters are 8 bits, some are 3 or 4 bits, and
some could be 16 bits. The offsets and size of each parameter within a particular group are
specified, like the PGNs, in the SAE documentation.
For example, SPN 184 of PGN 65266 is the "Engine Instantaneous Fuel Economy.” PGN 65266
may be obtained from the CAN bus and parsed to get SPN 184 (two bytes at byte positions 3-4,
numbering from byte position 1). Based on the SAE documentation, the data may be converted
to the appropriate units (1/512 km/L per bit).