CANdb++ is a software tool developed by Vector, a company that produces tools for working with CAN and a long-time sponsor of EVT. CANdb++ is a relatively simple tool compared to other Vector products, as it is just used to view and edit DBC files. Greater context for how EVT uses DBC files can be found here: CAN Bus Definition. This page will focus on explaining how to use CANdb++.
The first step for setup is installing CANdb++. You can find the latest installer on the Vector Download Center. Unlike CANalyzer, this software requires no license, so you should be able to run it without any extra steps.
The first main use for CANdb++ is viewing DBC files. This is not as straightforward as you might expect because of the way that CANdb++ organizes information about the CAN bus. CANdb++ breaks down the description of a CAN bus into a number of entities:
Signal - One piece of data that appears somewhere in a message, can vary in size
Message - Template for CAN frames holding a particular set of signals
Network Node - Logical group of messages to transmit and receive
Control Unit (ECU) - Processing unit on the CAN network that exchanges data using one or more network node
Network - Set of network nodes that are able to communicate with each other
Vehicle - Set of networks and ECUs, each of which is connected to one or more network
When you first open CANdb++, you'll be met by a blank gray screen. You can use the buttons along the top or Ctrl+O to open an existing DBC file. When a file is open, you'll see categories in the section on the left corresponding to some of the entities described above. In general, the easiest way to understand the CAN bus is going to be looking through the "Network nodes" category. For now, the majority of our boards (ECUs) have a single network node, so the list of network nodes is also the list of boards. Under this category, each board has a list of its messages and a list of its signals. Clicking on a message or signal provides more information about location of bytes, data types, sizes, etc.
The other categories can be useful for viewing specific pieces of information if you know what you're looking for. DBC files can also be used to store other information about a network in addition to CAN frame descriptions, but this may or may not be accurate. By our current standards, we use DBC files primarily for decoding CAN bus data and documenting frame structure, so we won't necessarily maintain additional information. Beware that Rx messages and signals may not be accurate, as they are not required to be maintained.
The other main use of CANdb++ is editing DBC files. For each bike, we need to maintain an up-to-date DBC file for its CAN networks, so it's important for us to be able to edit them easily. CANdb++ provides many ways of creating objects and linking them to each other, but it's not necessary to know them all. This section describes one way of performing each step needed to create a board with a single transmitted signal. Following this example, you should be able to create DBC files for as large and complex a network as you need. The steps to do this are as follows:
Setting up a DBC file starts with creating the most basic object, a signal. This can be done by right-clicking "Signals" and selecting "New..." in the window that appears. Here, you'll want to fill out the following fields: Name, Length, Byte Order, and Value Type.
On their own, signals describe the data they represent, but they don't explain how their data appears on a network. On the network, all signals appear in messages, which can be created by right-clicking "Messages" and selecting "New..." In the window that appears, you'll first want to fill out the following fields: Name, Type, ID, and DLC. Be sure to account for all signals planned for a message when inputting the DLC. Once you've filled out everything on the "Definnition" tab, you should navigate to the "Signals" tab. From here, you can use "Add..." to add signals to the message. By default, they will be appear in the order that they're added, but you can adjust their placement in the message manually from the "Layout" tab.
The last objects that need to be created are the network node and ECU. For now, we will assume that all ECUs in the network have exactly one network node. To create a new network node/ECU, you can simply right-click on "Network nodes," select "New...," and type in the name of the new node. This will create an ECU and network node with the same name and will automatically link them. On the "Tx Messages" tab, you can then use "Add..." to add the message created earlier to the node.
To make sure you've set everything up correctly, you should run a consistency check with "File" > "Consistency Check." This will open a window that lists any issues with the current DBC file. You should expect "No Receiver Node" errors because we don't currently use receiver nodes, but no other errors should appear. If you did make a mistake, all of the objects discussed above can be edited by double-clicking on them, opening the same window as when they were created.
It's important to note that this section describes the functionality that our team normally uses, but CANdb++ has many more features. If at some point in the future, the team wants to use these additional features, I would highly recommend looking at the CANdb++ help screen (F1). Everything in this guide is derived from that page, and it provides a good explanation for every feature the tool has to offer.