Skip to content
You Start with one site
Amounts in Start with one site
Control, Measurement & Energy · Course

CAN and J1939 on Engines and Generators

Lesson 6 of 10 24 min read
Found this useful?

A standby generator starts during a power cut, runs for forty minutes and stops on low oil pressure. The pressure had been falling for three weeks, and the engine controller had sent it on its network about twice every second for all of that time. Nobody was listening. A second site did connect a monitor, set it up wrongly, and the engine controller reported a communication fault and refused to start. This lesson shows how to read an engine’s CAN network with J1939, and how to do it without disturbing the engine. #CANbus #J1939 #GeneratorMonitoring

Learning Objectives

By the end of this lesson, you will be able to:

  1. Explain how CAN nodes share one pair of wires by dominant and recessive bits and arbitration
  2. Split a 29-bit J1939 identifier into priority, parameter group number and source address
  3. Decode a parameter from the data bytes with its resolution and offset
  4. Recognise the raw values that mean “not available” or “error”, and keep them out of a record
  5. State why a monitor on an engine network must only listen, and what a wrong connection can do

Real-World System Problem: A generator that already measures everything



A diesel generator set has an engine controller that measures speed, coolant temperature, oil pressure and many other quantities to run the engine. It shares them with the generator set controller on the front panel over a CAN network, in the format of SAE J1939, at 250 kbit/s. The network is a pair of twisted wires inside the set, usually a few metres long.

Unlike a Modbus server, the engine controller does not wait for a question: it broadcasts each group of values at its own rate, whether anyone reads them or not. A monitor needs only to hear the frames and to know what the bytes mean.

This carries a risk that a Modbus bus does not have: the network is part of the engine’s own control and protection, and a device connected wrongly can disturb it. The task is to read everything and change nothing.

endendMonitorlistensonlyGeneratorsetcontrollerEnginecontrolleraddress 0120 Ω120 ΩCAN_H and CAN_L, twisted pairshort stubbroadcastsreads andacknowledges
The engine network and a listen-only monitor

Fundamental Theory: From a CAN frame to an engine value



Two wires and two states

CAN (Controller Area Network, ISO 11898) uses a differential pair, CAN_H and CAN_L, like RS-485. The receiver reads the difference between the two lines, so noise that reaches both lines equally is rejected, as a wave lifts two boats side by side and leaves the distance between them the same.

The bus has two states. In the recessive state no node drives the bus: both lines rest near 2.5 V and the difference is about 0 V. In the dominant state a node drives CAN_H up to about 3.5 V and CAN_L down to about 1.5 V, a difference of about 2 V. Recessive is logic 1 and dominant is logic 0.

3.5 VCAN_H2.5 V2.5 VCAN_L1.5 Vrecessivedominantrecessivelogic 1logic 0logic 1difference0 V2 V0 V
The two bus states (typical levels)

The rule that makes CAN work is this: if one node sends dominant while another sends recessive, the bus is dominant. A dominant bit always wins, and nothing is damaged.

Arbitration by identifier

A CAN frame has no address of a sender or a receiver. It begins with an identifier that says what the frame contains, followed by up to 8 data bytes and a 15-bit CRC. J1939 uses the extended frame format, with a 29-bit identifier.

Any node may start to send when the bus is idle. If two start together, each sends its identifier bit by bit, highest bit first, and reads the bus as it sends. A node that sends recessive and reads dominant knows that another node has a lower identifier: it stops at once and tries again after the frame. The other node notices nothing, and its frame arrives undamaged.

So the lowest identifier always goes first, and no time is lost. This is arbitration.

Termination

The pair is one line with a 120 Ω resistor between CAN_H and CAN_L at each end, and nodes on short stubs along it. The two resistors do two jobs: they stop reflections, and they pull the bus back to the recessive state when no node drives it. A CAN bus has no bias resistors.

With the power off, the two resistors are in parallel, so an ohmmeter between CAN_H and CAN_L reads about 60 Ω.

Reading with power offMeaning
About 60 ΩTwo terminations: correct
About 120 ΩOne termination is missing
About 40 ΩA third termination has been added

Acknowledge and error handling

The CAN controller chip in each node does the error handling, not your software. Every node checks every frame: the CRC, the frame format and the bit stuffing. (After five equal bits in a row, the sender inserts one bit of the opposite value, so that the receivers see an edge often enough to stay in step. Six equal bits in a row are therefore an error.) Two actions follow.

  • A node that receives a frame correctly sends one dominant bit in the acknowledge slot near the end of the frame. The sender needs at least one such bit. Without it, the sender repeats the frame.
  • A node that detects an error sends an error frame of six dominant bits. This destroys the frame for every node, and the sender repeats it.

Each controller counts its errors. With a transmit error count above 127 it becomes “error passive” and may no longer destroy frames. Above 255 it goes “bus off” and stops sending completely.

Now think of a monitor in normal mode with the wrong bit rate. To it, every frame on the bus looks wrong, so it destroys every frame with an error frame. The engine controller repeats, fails, and counts errors; it can reach error passive or bus off, and the other controllers report a communication fault. One wrongly set device has stopped the engine’s network.

Most J1939 engine networks run at 250 kbit/s, but some newer engines use 500 kbit/s (J1939-14). Take the rate from the engine maker’s documents before you connect. Do not find it by trying rates on a running engine.

Listen-only monitoring

A CAN controller has a mode made for this work, called listen-only or silent mode. In it the node receives frames and never drives the bus: no acknowledge bit, no error frame and no frame of its own.

The rule for a monitor on an engine network

A monitor on an engine network must be listen-only. It must not acknowledge and must not transmit, unless it has been designed and approved for that network by those responsible for the engine. A transmitting monitor, or a wrong termination, can stop the network of an engine controller.

Three practical points follow from the rule.

  • Set listen-only mode in the hardware configuration before the connector is plugged in, not after the software has started.
  • Listen-only mode needs another node that acknowledges. On most generator sets the generator set controller does this. If the engine controller is alone on the bus, a listen-only monitor does not change that, and the decision about what may acknowledge belongs to the maker of the controller.
  • Connect at the maker’s diagnostic connector with a short stub and an isolated interface. Do not cut or splice the engine harness. The connection is made by the generator’s service technician with the set stopped and locked out, and work on the generator’s power output is for a licensed electrician.

J1939 on top of CAN

CAN carries identifiers and bytes. SAE J1939 says what they mean. It has three ideas.

  • A parameter group is a set of related values that travel together in one frame. Each group has a parameter group number, the PGN.
  • A suspect parameter number, the SPN, names one value inside a group, with its position, resolution, offset and unit.
  • A source address is the address of the controller that sends the frame. The first engine controller has address 0.

The three groups used in this course, as defined in J1939-71:

PGNNameParameterPositionResolutionOffset
61444 (0xF004)Electronic Engine Controller 1Engine speed, SPN 190bytes 4 and 5, low byte first0.125 rev/min per bit0
65262 (0xFEEE)Engine Temperature 1Coolant temperature, SPN 110byte 11 °C per bit−40 °C
65263 (0xFEEF)Engine Fluid Level/Pressure 1Oil pressure, SPN 100byte 44 kPa per bit0

The 29-bit identifier

J1939 divides the 29 bits into six fields.

DP1R1prio-rity3 bitssourceaddress8 bitsPDUspecific8 bitsPDUformat8 bitsbit 282625242316 158 70PGN,18bits
The 29 bits of a J1939 identifier
  • Priority (3 bits): 0 is the highest and 7 the lowest. It sits in the highest bits, so it decides arbitration first.
  • Reserved bit and data page (R and DP, 1 bit each): both 0 for the groups of this lesson.
  • PDU format, PF (8 bits), and PDU specific, PS (8 bits). PDU means protocol data unit.
  • Source address, SA (8 bits).

Building an identifier for a broadcast group

is the priority, PGN is the parameter group number and SA is the source address. This form holds when the PDU format is 240 or more.

For priority 3, PGN 61444 and source address 0: and , so the identifier is 0x0CF00400.

Taking the PGN out correctly

The PGN is not always the whole 18 bits. It depends on the PDU format.

The frame is a broadcast to every node. The PDU specific byte is part of the PGN (a group extension). Example: PF 0xFE and PS 0xEE give PGN 0xFEEE.

All three groups of this lesson have a PDU format of 240 or more, so they are broadcasts. The common mistake is to take the middle 18 bits as the PGN for every frame, which gives a false PGN for every addressed frame.

Parameters, resolution and offset

A parameter is stored as an unsigned whole number, the raw value.

From raw value to engineering value

Two points differ from Modbus and cause most decoding errors.

  • Byte numbers start at 1. J1939 calls the eight data bytes byte 1 to byte 8. In code, byte 4 is data[3].
  • Low byte first. A two-byte parameter is sent with its low byte first. Modbus sends the high byte first. Engine speed in bytes 4 and 5 is .

The offset lets an unsigned byte carry negative temperatures: raw 0 is −40 °C and raw 40 is 0 °C.

Not available and error values

A frame always has 8 data bytes, and a controller may not have every parameter of a group. It fills the places it does not use with ones. The top of each raw range is therefore reserved.

Raw valueOne byteTwo bytes
Valid data0x00 to 0xFA (0 to 250)0x0000 to 0xFAFF (0 to 64,255)
Reserved, not data0xFB to 0xFD0xFB00 to 0xFDFF
Error indicator0xFE0xFE00 to 0xFEFF
Not available0xFF0xFF00 to 0xFFFF

This fixes the range of each parameter: engine speed up to , coolant temperature from −40 to 210 °C, and oil pressure up to 1,000 kPa.

Broadcast rates

Each group has its own rate: engine speed changes quickly and is sent every few tens of milliseconds, temperatures about once per second, and pressures about once or twice per second. The exact rates are in J1939-71 and makers can differ, so measure the rate on your own engine.

One frame with 8 data bytes and a 29-bit identifier is 131 to 160 bits long with the gap after it, so it lasts 0.52 to 0.64 ms at 250 kbit/s. Even the fastest group uses a small share of the bus.

Because nothing is polled, silence is the only sign of a fault. A monitor should mark a value as stale when its group has not arrived for several of its normal periods.

Application 1: Decode three frames from the generator controller



Step 1: Identify each frame

Click to reveal the PGN and source of each frame
  1. Read the identifier as four hex bytes. The last byte is the source address. The two bytes before it are the PDU format and the PDU specific byte. The first byte holds the priority, the reserved bit and the data page. ✅

  2. Frame 1, 0x0CF00400. The bytes are 0C F0 04 00. The source address is 0x00. PF is 0xF0, which is 240, so the frame is PDU2 and the PGN is . ✅

  3. Frame 2, 0x18FEEE00. The source address is 0. PF is 0xFE (254), so the PGN is . ✅

  4. Frame 3, 0x18FEEF00. The source address is 0. PF is 0xFE, so the PGN is . ✅

  5. Priority. The first byte divided by 4 gives the priority when the reserved bit and the data page are 0: for frame 1 and for frames 2 and 3. The speed frame has the higher priority. ✅

Step 2: Engine speed

Click to reveal the engine speed
  1. Find the bytes. Byte 4 is 0xE0 and byte 5 is 0x2E. ✅

  2. Join them, low byte first. Byte 5 is the high byte.

    The raw value is 0x2EE0, which is below 0xFAFF, so it is valid data. ✅

  3. Apply the resolution.

    The engine runs at 1,500 rev/min. ✅

  4. The wrong order, for comparison. Read high byte first, the bytes give 0xE02E, which is 57,390, or 7,173.75 rev/min. The value is inside the valid range of the parameter, so no range test in the protocol rejects it. Only knowledge of the engine does. ✅

Step 3: Coolant temperature and oil pressure

Click to reveal the two values
  1. Coolant temperature. Byte 1 of frame 2 is 0x7A, which is 122. It is below 0xFA, so it is valid.

    The coolant is at 82 °C. ✅

  2. Oil pressure. Byte 4 of frame 3 is 0x69, which is 105, valid.

    The oil pressure is 420 kPa. ✅

  3. The other bytes. Every other byte in the three frames is 0xFF: “not available”. This controller does not send the other parameters of these groups. They are recorded as not available and are not decoded. ✅

byte12345678PGN 61444FFFFFFE02EFFFFFF0x2EE0 = 1,500 rev/minPGN 652627AFFFFFFFFFFFFFF122−40=82°CPGN 65263FFFFFF69FFFFFFFF105×4=420kPa
The three frames, with the bytes that carry data

Step 4: Check against the frequency

Click to reveal the check
  1. Speed and frequency of a synchronous generator. With poles and a speed in rev/min, the frequency is

    The decoded speed gives exactly the system frequency. The wrong byte order would give 239 Hz. ✅

  2. Check by encoding. Work backwards: , sent as E0 2E. . . These are the bytes of the capture. ✅

  3. Check with the script. The Python script builds the three frames from the three values, prints the same identifiers and bytes, and decodes them to 1500 rev/min, 82 °C and 420 kPa. ✅

Check it at the set. With the set running, compare each decoded value with the generator set controller’s own display at the same moment: the speed to within a few rev/min, the coolant temperature to within 1 °C, the oil pressure to within one step of 4 kPa. Then confirm the monitor is silent. Its interface must report no frames sent and no errors, the set controller must show no new communication fault, and no frame in the capture may carry the monitor’s address as its source.

Application 2: Split identifier 0x18FEEE00 into its fields



Step 1: Write the 29 bits

Click to reveal the bits
  1. Hex to binary. Eight hex digits are 32 bits: 0001 1000 1111 1110 1110 1110 0000 0000. ✅

  2. Drop the three highest bits. An identifier has 29 bits, so the three highest bits of the 32 are not part of it. They are 000. The 29 bits are

    1 1000 1111 1110 1110 1110 0000 0000. ✅

Step 2: Cut the fields

Click to reveal the six fields
  1. Cut from the left: 3, 1, 1, 8, 8 and 8 bits.

    FieldBitsValue
    Priority1106
    Reserved00
    Data page00
    PDU format1111 11100xFE = 254
    PDU specific1110 11100xEE = 238
    Source address0000 00000

    The six fields use bits. ✅

  2. PDU1 or PDU2. The PDU format is 254, which is not below 240. The frame is PDU2: a broadcast, and the PDU specific byte is part of the PGN. ✅

  3. The PGN. With the reserved bit and the data page at 0,

    This is Engine Temperature 1, sent with priority 6 by source address 0, the engine controller. ✅

Step 3: Check by building it again

Click to reveal the check
  1. Use the identifier formula.

    In hexadecimal, 419,360,256 is 0x18FEEE00. ✅

  2. The same by hex pieces. and . Their sum is 0x18FEEE00. ✅

Step 4: An addressed frame

Click to reveal the split of 0x18EAFFF9
  1. The fields. The bytes are 18 EA FF F9. Priority 6, reserved 0, data page 0, PF 0xEA = 234, PS 0xFF = 255, source address 0xF9 = 249. ✅

  2. PDU1. PF is 234, which is below 240. The PDU specific byte is a destination address: 255, the address that means “all nodes”. It is not part of the PGN. ✅

  3. The PGN.

    This is the group that J1939-21 uses to request another group. A node at address 249 is asking every node for something. ✅

  4. The common mistake. Taking all 18 bits gives , which is not a parameter group at all. A decoder with this mistake works for every broadcast group and fails on every addressed frame. ✅

  5. What this frame tells a site engineer. Address 249 is transmitting. If that node is the monitor, it is not in listen-only mode and must be disconnected until it is. ✅

Verify It in Python



The script packs and unpacks an identifier with the PDU1 and PDU2 rule, builds and decodes the three frames, splits the two identifiers of Application 2, and prints the valid ranges. The plot shows engine speed decoded from a simulated capture of PGN 61444 at one frame every 20 ms, while a load is switched on at 1 s.

j1939_decode.py
"""J1939: pack and unpack the 29-bit identifier, decode three engine parameters."""
import numpy as np
import matplotlib.pyplot as plt
def pack_id(priority, pgn, source, destination=0xFF):
"""Build a 29-bit identifier. For PDU1 the destination fills the PS byte."""
pf = (pgn >> 8) & 0xFF
if pf < 240: # PDU1: addressed
pgn = (pgn & 0x3FF00) | destination
return (priority << 26) | (pgn << 8) | source
def unpack_id(can_id):
"""Split a 29-bit identifier into its J1939 fields."""
priority = (can_id >> 26) & 0x7
reserved = (can_id >> 25) & 0x1
data_page = (can_id >> 24) & 0x1
pf = (can_id >> 16) & 0xFF
ps = (can_id >> 8) & 0xFF
source = can_id & 0xFF
if pf < 240: # PDU1: PS is a destination
pgn = (reserved << 17) | (data_page << 16) | (pf << 8)
destination = ps
else: # PDU2: PS belongs to the PGN
pgn = (reserved << 17) | (data_page << 16) | (pf << 8) | ps
destination = None
return dict(priority=priority, reserved=reserved, data_page=data_page,
pf=pf, ps=ps, source=source, pgn=pgn, destination=destination)
def hexs(data):
return " ".join(f"{b:02X}" for b in data)
# Parameters: PGN -> (name, first byte (1-based), bytes, scale, offset, unit)
SPN = {
61444: ("engine speed, SPN 190", 4, 2, 0.125, 0.0, "rev/min"),
65262: ("coolant temperature, SPN 110", 1, 1, 1.0, -40.0, "deg C"),
65263: ("oil pressure, SPN 100", 4, 1, 4.0, 0.0, "kPa"),
}
def encode(pgn, value):
"""Eight data bytes with one parameter set and the rest not available."""
_, first, size, scale, offset, _ = SPN[pgn]
raw = round((value - offset) / scale)
data = bytearray([0xFF] * 8)
data[first - 1:first - 1 + size] = raw.to_bytes(size, "little")
return bytes(data)
def decode(pgn, data):
"""Return (raw, value). The value is None when the raw value is not valid."""
_, first, size, scale, offset, _ = SPN[pgn]
raw = int.from_bytes(data[first - 1:first - 1 + size], "little")
limit = 0xFA if size == 1 else 0xFAFF # largest valid raw value
return raw, (raw * scale + offset if raw <= limit else None)
# ---------- Build the three frames of the generator controller ----------
chosen = [(3, 61444, 1500.0), (6, 65262, 82.0), (6, 65263, 420.0)]
frames = [(pack_id(prio, pgn, 0), encode(pgn, value)) for prio, pgn, value in chosen]
print("Frames from the generator controller (source address 0)")
for can_id, data in frames:
print(f" 0x{can_id:08X} {hexs(data)}")
# ---------- Application 1: decode them as a monitor does ----------
print("Decoded")
for can_id, data in frames:
f = unpack_id(can_id)
name, first, size, _, _, unit = SPN[f["pgn"]]
raw, value = decode(f["pgn"], data)
print(f" PGN {f['pgn']} (0x{f['pgn']:04X}) from source {f['source']}: "
f"{name}, raw {raw} (0x{raw:0{2 * size}X}) = {value:g} {unit}")
print(f" generator frequency with 4 poles at 1500 rev/min: {1500 * 4 / 120:.1f} Hz")
raw, value = decode(65262, bytes([0xFF] * 8))
print(f" coolant byte 0xFF: raw {raw}, value {value} (not available)")
# ---------- Application 2: split 0x18FEEE00 ----------
print("Identifier 0x18FEEE00")
print(f" 29 bits: {0x18FEEE00:029b}")
f = unpack_id(0x18FEEE00)
print(f" priority {f['priority']}, reserved {f['reserved']}, data page "
f"{f['data_page']}, PF {f['pf']} (0x{f['pf']:02X}), PS {f['ps']} "
f"(0x{f['ps']:02X}), source {f['source']}")
print(f" PF >= 240, so PDU2: PGN {f['pgn']} (0x{f['pgn']:04X})")
assert pack_id(6, 65262, 0) == 0x18FEEE00
f = unpack_id(0x18EAFFF9)
print("Identifier 0x18EAFFF9")
print(f" PF {f['pf']} < 240, so PDU1: PGN {f['pgn']} (0x{f['pgn']:04X}), "
f"destination {f['destination']}, source {f['source']}")
print(f" wrong PGN if PS is kept: {(0x18EAFFF9 >> 8) & 0x3FFFF}")
assert pack_id(6, 59904, 0xF9, 0xFF) == 0x18EAFFF9
# ---------- Limits and timing ----------
print("Ranges")
print(f" engine speed: 0 to {0xFAFF * 0.125:g} rev/min in steps of 0.125")
print(f" coolant: {0 - 40} to {0xFA - 40} deg C, oil pressure: 0 to {0xFA * 4} kPa")
BIT_RATE = 250e3
print(f"Frame of 8 data bytes at 250 kbit/s: 131 to 160 bits, "
f"{131 / BIT_RATE * 1e3:.3f} to {160 / BIT_RATE * 1e3:.3f} ms")
# ---------- Plot: a load step seen through engine speed frames ----------
t = np.arange(0.0, 6.0, 0.02) # one frame every 20 ms
true_speed = 1500.0 - 75.0 * np.where(t >= 1.0, np.exp(-(t - 1.0) / 0.6)
* np.sin(np.pi * np.minimum(t - 1.0, 0.5)), 0.0)
decoded = np.array([decode(61444, encode(61444, s))[1] for s in true_speed])
print(f"Load step: lowest decoded speed {decoded.min():.3f} rev/min, "
f"largest rounding error {np.abs(decoded - true_speed).max():.4f} rev/min")
fig, ax = plt.subplots(figsize=(8, 3.6))
ax.step(t, decoded, where="post")
ax.set_xlabel("time (s)")
ax.set_ylabel("engine speed (rev/min)")
ax.set_title("Engine speed decoded from PGN 61444 during a load step")
ax.grid(True, alpha=0.3)
fig.tight_layout()
fig.savefig("j1939_engine_speed.png", dpi=120)
print("Saved j1939_engine_speed.png")

Expected output

Frames from the generator controller (source address 0)
0x0CF00400 FF FF FF E0 2E FF FF FF
0x18FEEE00 7A FF FF FF FF FF FF FF
0x18FEEF00 FF FF FF 69 FF FF FF FF
Decoded
PGN 61444 (0xF004) from source 0: engine speed, SPN 190, raw 12000 (0x2EE0) = 1500 rev/min
PGN 65262 (0xFEEE) from source 0: coolant temperature, SPN 110, raw 122 (0x7A) = 82 deg C
PGN 65263 (0xFEEF) from source 0: oil pressure, SPN 100, raw 105 (0x69) = 420 kPa
generator frequency with 4 poles at 1500 rev/min: 50.0 Hz
coolant byte 0xFF: raw 255, value None (not available)
Identifier 0x18FEEE00
29 bits: 11000111111101110111000000000
priority 6, reserved 0, data page 0, PF 254 (0xFE), PS 238 (0xEE), source 0
PF >= 240, so PDU2: PGN 65262 (0xFEEE)
Identifier 0x18EAFFF9
PF 234 < 240, so PDU1: PGN 59904 (0xEA00), destination 255, source 249
wrong PGN if PS is kept: 60159
Ranges
engine speed: 0 to 8031.88 rev/min in steps of 0.125
coolant: -40 to 210 deg C, oil pressure: 0 to 1000 kPa
Frame of 8 data bytes at 250 kbit/s: 131 to 160 bits, 0.524 to 0.640 ms
Load step: lowest decoded speed 1462.750 rev/min, largest rounding error 0.0619 rev/min
Saved j1939_engine_speed.png

The script only decodes bytes. It opens no CAN interface and sends nothing. The load step in the plot is an invented curve.

Common Mistakes



  • Connecting a CAN interface in normal mode. It acknowledges frames and can send error frames. Set listen-only mode first, in the hardware configuration.
  • Switching on the 120 Ω termination of the interface. The network already has two, and a third brings the resistance between the lines to about 40 Ω.
  • Reading a two-byte parameter high byte first, as in Modbus. J1939 sends the low byte first.
  • Counting data bytes from 0 when the definition counts from 1. Byte 4 is the fourth byte, data[3] in code.
  • Decoding 0xFF or 0xFFFF as a measurement. They mean “not available”, and 0xFE means “error”.
  • Taking the PDU specific byte into the PGN when the PDU format is below 240. There it is a destination address.

Summary



  • CAN is a terminated differential pair with dominant and recessive bits. The lowest identifier wins arbitration, and the controller chips handle acknowledgement and errors.
  • The bus has 120 Ω at each end, about 60 Ω between the lines with the power off, and J1939 engine networks commonly run at 250 kbit/s.
  • A J1939 identifier holds priority, reserved bit, data page, PDU format, PDU specific and source address. The PGN includes the PDU specific byte only when the PDU format is 240 or more.
  • A value is the raw value times the resolution plus the offset. Bytes count from 1, and two-byte values come low byte first.
  • Raw values above 0xFA or 0xFAFF are not data. Record them as error or not available.
  • A monitor on an engine network is listen-only, adds no termination and never transmits unless it is designed and approved for that network.

Exercises



1. Build the 29-bit identifier for priority 6, PGN 65263 and source address 0.

Answer

PGN 65263 is 0xFEEF, with a PDU format of 0xFE, so it is PDU2. and . The identifier is 0x18FEEF00.

2. A generator set for a 60 Hz system sends identifier 0x0CF00400 with data FF FF FF 40 38 FF FF FF. Find the engine speed, and check it against 60 Hz for a 4-pole generator.

Answer

Bytes 4 and 5 are 40 38, low byte first, so the raw value is . The speed is . The frequency is , as expected.

3. Three frames with identifier 0x18FEEE00 have a first data byte of 0x9B, 0xFE and 0xFF. What should the monitor record for each?

Answer

0x9B is 155, valid, so the coolant is at °C. 0xFE is the error indicator: record “sensor error” and no number. 0xFF is “not available”: record that and no number. Decoding the last two would give 214 °C and 215 °C, both false.

4. The oil pressure of an engine is 390 kPa. What raw value can the controller send in PGN 65263, and what will the monitor show?

Answer

, which is not a whole number. The controller sends 97 (0x61), shown as 388 kPa, or 98 (0x62), shown as 392 kPa. The resolution of 4 kPa is the limit of this parameter, so a difference of 2 kPa between the monitor and a gauge is not a fault.

5. With the generator set stopped and its control power off, a technician measures 40 Ω between CAN_H and CAN_L. A week earlier the reading was 60 Ω, and a monitor was fitted in between. What has happened, and what is the correction?

Answer

Three resistors of 120 Ω in parallel give . The monitor’s own termination is switched on. Switch it off, and the reading returns to .

References



  • International Organization for Standardization, ISO 11898-1: Road vehicles, Controller area network (CAN), Part 1: Data link layer and physical signalling, 2015.
  • International Organization for Standardization, ISO 11898-2: Road vehicles, Controller area network (CAN), Part 2: High-speed medium access unit, 2016.
  • SAE International, SAE J1939-21: Data Link Layer.
  • SAE International, SAE J1939-71: Vehicle Application Layer.


© 2021-2026 SiliconWit®. All rights reserved.
120 Ω120 ΩendendCAN_H and CAN_L, twisted pairCAN_HCAN_LEngine controlleraddress 0broadcastsGenerator setcontrollerreads and acknowledgesMonitorlistens onlyshort stub
The engine network and a listen-only monitor
3.5 V2.5 V1.5 VCAN_HCAN_Lboth at 2.5 Vboth at 2.5 Vrecessivelogic 10 Vdominantlogic 02 Vrecessivelogic 10 Vdifference
The two bus states (typical levels)
priority3 bitsR1DP1PDU format8 bitsPDU specific8 bitssource address8 bitsbit28262524231615870PGN, 18 bitsR is the reserved bit and DP the data page.
The 29 bits of a J1939 identifier
Predict first

A generator with 4 poles supplies a 50 Hz system, so its engine runs near 1,500 rev/min. A frame from the engine controller carries the speed in two bytes, at 0.125 rev/min per count. They arrive as E0, then 2E. Which byte is the high byte?

See it: one identifier, eight bytes, one value
Part A: the 29-bit identifier

Priority
PDU format, PF
PDU specific, PS
Source address, SA
Kind of frame
PGN
Part B: the eight data bytes

Parameter
Raw value
Decoded value
Valid range

Part A cuts the 29 bits into the six fields of the lesson, from the left: 3, 1, 1, 8, 8 and 8 bits. The PGN follows the lesson's rule. With a PDU format of 240 or more, the PDU specific byte is part of the PGN. Below 240 it is a destination address, and the PGN has 00 in that place. Part B decodes the data bytes for the group that Part A has found, for the three parameters of the lesson. A raw value above the valid range gives no number. Each slider belongs to one group. When you move it, the page selects that group's identifier from the lesson and writes the value into its byte or bytes, so you see the encoding too. The first three buttons load the three captured frames of the lesson. The page only calculates. It is not connected to any engine network.

Check yourself

Three questions. Each wrong choice is a mistake people really make, so read the note after you answer.

1. A capture shows the identifier 0x18EAFFF9. Its PDU format byte is 0xEA, which is 234. What is the PGN?

2. A frame of PGN 65262 arrives with 0xFF in byte 1. Coolant temperature is 1 °C per bit with an offset of −40 °C. What does the monitor record?

3. A frame of PGN 65263 has the data bytes FF FF FF 69 FF FF FF FF. Oil pressure is in byte 4, at 4 kPa per bit. A program reads data[4]. What does it report, and what is the true value?

Watch it build: one frame, its check, and the monitor
ID data CRC ACK CAN engine ECU set controller monitor sends checkschecks ACK bit error frame counts errors bus off wrong rate sendsACK bitlisten-only every node checks CRC, format, stuffing one good receiver is enough 6 dominant bits: frame destroyed, sent again above 127: error passiveabove 255: bus off one wrong setting stops the network no ACK, no error frame, no frame
  1. The engine controller sends a frame. Every node checks its CRC, its format and its bit stuffing.
  2. A node that received it correctly sends one dominant bit in the ACK slot.
  3. A node that sees an error sends six dominant bits. The frame is destroyed and sent again.
  4. Each controller counts its errors: above 127 it is error passive, above 255 it is bus off.
  5. A monitor at the wrong bit rate destroys every frame. The engine controller can go bus off.
  6. In listen-only mode the monitor only receives: no ACK, no error frame. The network does not change.
CAN_HCAN_L recessivedominantrecessive H − L 0 V2 V0 V
enginemonitorenginemonitor listen-onlythe engine runsnormal mode, wrong rateengine goes bus off
See it: two nodes start together

Goes first
Decided at identifier bit
The other waitsone frame, 0.52 to 0.64 ms

Each node sends its identifier and reads the bus at the same time. A 0 (dominant) beats a 1 (recessive), so the bus shows 0 if any node sends 0. A node that sends 1 and reads 0 stops at once. The winner never notices, and its frame arrives undamaged. The highest bit, 28, goes first.

Found this useful?

Discussion

    Comments show your name. Be kind, stay on the topic.