In the field of automotive engineering, there are various file formats that play a crucial role in the development and testing of vehicle systems. One such file format that is widely used in the automotive industry is the DBC file format. In this article, we will explore the inner workings of the DBC file format, from understanding the need for this format to the details of messages in DBC file, signals in DBC file, and data representation with practical examples.

Need for a Common File Format — Automotive CAN DBC File

As is well known, there are anywhere between tens to hundreds of ECUs (Electronic Control Units) in a vehicle, each connected over the CAN (Controller Area Network) bus. Many of their operations are interdependent. For example, a Vehicle Control Unit (VCU) in an electric vehicle continuously monitors the Motor Control Unit (MCU) and Battery Management System (BMS) to deliver optimal performance.

Another good example is the instrument cluster collecting information from various ECUs and displaying it to the user. All these ECUs come from different vendors, and manually defining the messages and signals exchanged between them was a time-consuming and error-prone process. This called for a common file format that describes the CAN frames transmitted by each ECU.

The DBC file format — which stands for 'Database Container' — was developed by Vector Informatik GmbH in the 1990s. The automotive CAN DBC file provides a structured and standardized way to define messages, signals, and their attributes, making it easier for engineers to develop and test automotive systems. Today, the automotive CAN DBC file is the de-facto standard for describing CAN network databases in vehicle development. Embien's automotive user experience services leverage the DBC file format to build real-time dashboards and visualization tools from live CAN data.

Automotive CAN DBC File Structure and Usage

An automotive CAN DBC file is a plain-text file that defines the complete communication database for a CAN network. Each automotive CAN DBC file contains version information, a namespace section, node definitions, message definitions, signal definitions, comments, and attribute definitions. The automotive CAN DBC file is used by tools such as CANalyzer, CANoe, BUSMASTER, and embedded decoders to parse and decode raw CAN frames into named, scaled engineering values. When working with multiple ECU suppliers, the automotive CAN DBC file serves as the interface contract — any supplier implementing a CAN node must deliver an automotive CAN DBC file describing its transmitted messages and signals. Embien's digital transformation services help teams migrate automotive CAN DBC file databases into modern automotive Ethernet environments while preserving signal compatibility.

Messages in DBC File

Messages are the building blocks of communication described by the DBC file format. They represent the information exchanged between ECUs in a vehicle system. Each message corresponds to a CAN frame transmitted by an ECU, and an ECU can originate more than one message.

Each message in the DBC file format has a unique identifier and is associated with one or more signals. Messages in DBC file can be classified into different categories based on their attributes — message type, cycle time, and start delay time. Understanding messages in DBC file is the first step to decoding any CAN traffic.

The message is encoded in the following format:

BO_ CAN ID Message Name: Data Length Transmitter Name

An example message format is given below:

DBC Message Format

DBC Message Format

The message syntax is indicated by the BO_ keyword, followed by the decimal CAN ID, then the message name, then the length in bytes after a colon, and finally the transmitting ECU name (Vector__XXX if not specified). Messages in DBC file are the containers that group related signals together for transmission over the CAN bus.

Signals in DBC File: Encoding and Representation

Signals in DBC file carry the actual data within messages. Signals in DBC file represent physical quantities — temperature, speed, pressure — transmitted between ECUs. Each signal in the DBC file format has a unique name, bit start position, bit size, and data type. Signals in DBC file can be either signed or unsigned, and they can have different scaling, offset, limits, and units. The SG_ keyword marks each signal definition within a message block in the automotive CAN DBC file.

Signals in DBC File — Detailed Format

Signals carry the actual data within messages in the DBC file format. Each signal has a unique name, bit start position, bit size, and data type. Signals can be signed or unsigned with different scaling, offset, limits, and units.

Format of a signal in the DBC file format is given below:

SG_ <Signal Name> [M|m MultiplexerIdentifier ] : BitStart|
NumBits @ Endianness Signed (ScalingFactor,Offset) [Min|Max] '[Unit]' [Receiver]

The below snippet is an example of messages in DBC file with signals:

BO_ 123 SPEEDM: 8 Vector__XXX
 SG_ ODOValue : 7|16@0+ (1,0) [0|65534] 'm' InstrumentCluster
 SG_ ODoStatus : 17|2@0+ (1,0) [0|3] ''  InstrumentCluster
 SG_ VehSpd : 39|12@0+ (0.05,0) [0|127.96875] 'm/s'  InstrumentCluster
 SG_ VehSpdStatus : 43|2@0+ (1,0) [0|3] ''  InstrumentCluster

Here the BO_ line defines one of the messages in DBC file and the SG_ lines represent the signals inside it.

Data Representation in DBC File Format

Understanding the details of signals in the DBC file format is crucial for interpreting data. The DBC file format supports various data types — integers, floating-point numbers, and enumerated types. Each signal is associated with a data type that defines the range and precision of signal values.

The signal information is captured in the DBC file format as follows:

DBC Signal Format

DBC Signal Format

The signal starts with the SG_ keyword followed by the signal name. The bit start position indicates the starting bit of a signal within a message. The bit size defines the number of bits used to represent the signal's value. The endianness determines byte order — little endian (@1) or big endian (@0). The signed/unsigned attribute indicates whether values can be negative. Scaling and offset convert raw values to engineering units. Limits define the valid range. Units provide a common understanding of the physical quantities transmitted.

CAN Bus Scanner and DBC File Format Integration

A CAN bus scanner is a tool that captures raw frames from the CAN bus and decodes them into meaningful engineering values using an automotive CAN DBC file. When a CAN bus scanner is loaded with an automotive CAN DBC file, it automatically maps each CAN ID to the corresponding messages in DBC file and decodes each signal according to its bit position, endianness, scaling, and offset. Common CAN bus scanner tools that support the DBC file format include Vector CANalyzer, PEAK PCAN-Explorer, BUSMASTER, and Kvaser CanKing. A CAN bus scanner combined with a well-structured automotive CAN DBC file is the fastest way to validate ECU communication during integration testing.

Data in the Bus

This section shows the screen shot of CAN data on the bus for the same data in different endianness.

BO_ 123 SPEEDM: 8 Vector__XXX
 SG_ ODOValue : 7|16@0+ (1,0) [0|65535] 'm' InstrumentCluster
 SG_ Test1 : 23|16@0+ (1,0) [0|65535] 'm'   InstrumentCluster
 SG_ Test2 : 39|16@0+ (1,0) [0|65535] 'm'   InstrumentCluster
 SG_ Test3 : 55|16@0+ (1,0) [0|65535] 'm'   InstrumentCluster
BO_ 124 SPEEDM1: 8 Vector__XXX
 SG_ ODOValue : 0|16@1+ (1,0) [0|65535] 'm'  InstrumentCluster
 SG_ Test1 : 16|16@1+ (1,0) [0|65535] 'm'  InstrumentCluster
 SG_ Test2 : 32|16@1+ (1,0) [0|65535] 'm'  InstrumentCluster
 SG_ Test3 : 48|16@1+ (1,0) [0|65535] 'm'  InstrumentCluster

When the first signal SpeedM is transmitted in Big Endian format, the BusMaster representation along with the actual data on the bus is given below. Other signals are sent as alternating 0 and 1 pattern to avoid confusion due to CAN bit-stuffing.

Big Endian Signal

Big Endian Signal

When the same signal is sent in little endian format, the corresponding BusMaster representation and data on the bus is given below.

Little Endian Signal

Little Endian Signal

These screen shots give a good understanding of how endianness of signals in the DBC file format is handled in practice.

Conclusion

This article covered most of the basic concepts of the DBC file format and explained how the automotive CAN DBC file provides a structured and standardized way to define messages in DBC file, signals, and their attributes, enabling efficient communication between ECUs. Understanding the inner workings of the DBC file format — from messages in DBC file and signals to data representation and bit ordering — is essential for automotive engineers. We will explore advanced DBC file format concepts such as keywords, attributes, and multiplexors in the next article.

« ONBOARD DIAGNOSTICS A COMPREHENSIVE GUIDE TO OBD 2 PROTOCOL
ADVANCED DBC FILE FORMAT CONCEPTS »

Related Content

Automotive CAN DBC File Integration — Product Engineering Services
insight image

Embien's product engineering services cover DBC file format integration, automotive CAN DBC file validation, and messages in DBC file decoding for ECU development and testing.

Read More


Quality Assurance for DBC File Format and CAN Communication Testing
insight image

Embien's quality assurance services include DBC file format validation, messages in DBC file verification, and CAN bus signal integrity testing for automotive ECU programs.

Read More


Instrument Panel Testing with DBC File Format and CAN Bus Scanner
insight image

An automated instrument panel test solution using CAN bus simulation with DBC file format-defined messages in DBC file for real-time ECU communication validation.

Read More


Subscribe to our Insights