Book a demo

Know-how · Networks

DBC files

A CAN frame is eleven bits of identifier and eight bytes of anything. The DBC is the only reason those bytes mean engine speed.

By , Founder & Lead Engineer

In short

A DBC file is a CAN database: a text description that maps CAN identifiers to named messages, and the bits inside each message to named signals. For each signal it defines the start bit, length, byte order, whether the raw value is signed, a factor and offset that convert raw to physical units, a minimum and maximum, the unit string, and which nodes send and receive it. Without a DBC a logger can record frames but cannot say that bits 24 to 39 of identifier 0x0C9 are engine speed in rpm. A DBC must match the bus configuration it was written for — a signal moved by one bit, or a changed factor, still decodes and still produces numbers, which is why a mismatched DBC is more dangerous than a missing one. Multiplexed messages let one identifier carry different signal sets selected by a multiplexor value.

01

What a signal definition contains

Each signal inside a message carries everything needed to extract it: where it starts, how long it is, how the bytes are ordered, whether it is signed, and how to scale it. Physical value is raw times factor plus offset — a simple linear conversion that covers the overwhelming majority of CAN signals.

Byte order is where most hand-written decoders go wrong. DBC supports both Intel (little-endian) and Motorola (big-endian) layouts, and the start-bit numbering convention differs between them. A signal decoded with the wrong order produces values that move when the real quantity moves, which is exactly enough to look correct on a plot and be wrong by a factor of 256.

  • Start bit and lengthWhere the signal sits inside the eight bytes.
  • Byte orderIntel or Motorola; the start-bit convention differs between them.
  • Factor and offsetphysical = raw x factor + offset.
  • Min, max, unitExpected range and the unit string shown to the engineer.
  • MultiplexingOne identifier carrying alternative signal sets by multiplexor value.

02

Why a wrong DBC is worse than no DBC

A missing DBC is obvious: you see raw frames and know you cannot interpret them. A stale DBC is silent. The identifiers still exist, the bits still extract, the factor still multiplies, and you get a plot. The failure shows up later as an inexplicable result, and by then the measurement has usually been used for something.

The discipline is the same as matching an A2L to an ECU image. Confirm which bus configuration and which vehicle build the DBC belongs to. Decode a few signals whose true value you can establish independently — vehicle speed against GPS, engine speed against a second source — before trusting the rest.

  • Check provenanceWhich vehicle, which bus, which build the file belongs to.
  • Cross-check signalsValidate against an independent source before relying on the set.
  • Watch the rangesValues pinned at a limit often mean a length or scaling error.
  • Keep it with the dataA recording without its DBC becomes undecodable later.

03

DBC, A2L and MDF4

These three get confused and do different jobs. A DBC describes bus signals: how to decode a CAN frame. An A2L describes ECU-internal calibration and measurement objects: addresses, layouts and conversions inside the control unit. MDF4 is the recording format the resulting time series is stored in.

A single test often involves all three. CAN frames decoded by a DBC, internal variables measured by XCP using an A2L, and everything written into one MDF4 file. Keeping the description files with the recording is what makes the measurement readable in two years rather than being an archive of undecodable bytes.

Standards & references

Check the source.

These primary sources define the formats and regulatory context discussed above. They do not certify or endorse VehicleLab products.

Questions

Frequently asked.

What is a DBC file used for?

It maps CAN identifiers to named messages and the bits inside them to named, scaled signals, so recorded frames can be read as physical quantities such as engine speed in rpm rather than raw bytes.

How do I open a DBC file?

A DBC is plain text and can be opened in any editor, but it is meant to be loaded by a CAN tool or measurement application that uses it to decode a recording or a live bus.

What is the difference between a DBC and an A2L?

A DBC describes signals on the CAN bus. An A2L describes calibration and measurement objects inside the ECU, including memory addresses and conversions. They describe different things and are not interchangeable.

What happens if the DBC does not match the vehicle?

Decoding still produces numbers, because the bits are still extracted and scaled. The values are simply wrong. That silence is why a mismatched DBC is more dangerous than a missing one.

What is multiplexing in a DBC?

A way for one CAN identifier to carry different sets of signals at different times. A multiplexor signal in the frame selects which set the remaining bits currently represent.

Next step

Open one of your own files with us.

Send a measurement, an A2L or an EHANDBOOK container. We will open it in the instruments on a call, with your engineers in the room.