Getting Started with CANtrace

A powerful CAN bus analyser software and diagnostic tool

Getting Started with CANtrace

Follow this guide to quickly start using CANtrace

1. Install CANtrace

1.1 Procedure

After you have downloaded the zip package from our website, you need to following below procedures to install CANtrace.

  • Unzip the install package into a separate folder.
  • Open the folder and click on CANtrace-setup-X.XX.exe executable file to install CANtrace. You need to be an administrator to install CANtrace.
  • Download the driver from manufacturer’s website and install the driver manually.
  • Plug your CAN hardware into your PC via USB.
  • Start CANtrace.

1.2 Troubleshooting

  • Try using control panel to remove any previous version of CANtrace before installing the new one.
  • Do not run the executable file from inside the zip file. You need to unzip it to a separate folder and run the executable file from the folder
  • You need administrative rights to install CANtrace
  • Make sure there is enough free disk space on the drive where you will install CANtrace. CANtrace only uses about 50MB of disk space.
  • If above steps didn’t solve the problem, contact us and we will help you solve the issue. TK Engineering support email: support@tke.fi. Please include information about Windows version (32 or 64 bit), CANtrace version and the error message you get when the installation fails.

2. Find the serial number

After you have installed CANtrace on your PC, you may need a demo license for evaluation. Below steps show you how to get the serial number used in CANtrace for your CAN hardware.

  • Make sure you have the driver of your CAN hardware installed on your PC
  • Plug in your CAN hardware to the USB port of the PC
  • Start CANtrace
  • Click on menu CAN->Settings…
  • Click on 1 UnAssigned on the left
  • On the right, click Assigned hw drop-down box
  • Select your CAN hardware from the drop-down box, if your hardware is not listed, click Refresh button and try again. If you are using Vector hardware for the first time in CANtrace, click on here and follow the instruction.
  • Keep the CAN hardware selected, and check the Serial nr: in the bottom left corner. This is illustrated in the figure below. Send this number to us by email, we will generate a demo license for you.

2.1 Using Peak hardware

If you are using Peak CAN hardware, open the CAN->Settings… window, and find the Serial nr: that is similar to 6A5FEBF2290D21BFBFF and send this number to us for generating demo license. This is because CANtrace is using the PC’s serial number for Peak CAN hardware.

2.2 Using Vector hardware

If you are using Vector hardware with CANtrace for the first time, you need to assign CANtrace to one or more of the CAN interface channels.

Make sure you have the Vector driver installed on your PC.

Select menu CAN→Settings… to open the CAN-Interfaces Settings window. Then click the Vector Hardware Config… button to open the Vector Hardware Config tool.

In the tree-view on the left, click open Application. Right-click on CANtracePC and select Application channel usage.

Select the number of channels of the Vector CAN interface to assign to CANtrace and click OK.

Right-click on the first listed “CANpiggy” entry (representing channel 1 on the CAN interface) and select CANtracePC→CAN 1. See the screenshot below.

To assign CANtrace to channel 2, right-click on the second CANpiggy entry and select CANtracePC→CAN 2.

After assigning CANtrace to one or more Vector channels, close the tool. Click the Refresh button. The configured Vector hardware channels should now be available in the Assigned hw drop-down box.

The procedure to do this can also be found in the CANtrace Help document, in section Vector Settings. A shortcut to the Help document can be found from the start menu, in the CANtrace folder.

3. Import license

After you have received the license from us, you need to import the license to CANtrace.

  • Make sure you have the CAN hardware’s driver installed on your PC
  • Plug in your CAN hardware that has the license to your PC
  • Start CANtrace
  • Click on menu Help->Import License…
  • Paste the whole license string to the License key text box and click OK
  • Go to menu Help->About…, check the license status below copyright row.
  • If you are running CANtrace 3.12 or newer, you can also select menu Help->License Manager… to check the license status.

3.1 Troubleshooting

  • Check you have pasted the original license string without modifying it. For the demo license, it contains “|” and white spaces. For the full license, it contains white spaces.
  • Check you have the correct CAN hardware plugged in your PC
  • Try to unplug/re-plug CAN hardware or restart CANtrace and try to import license again
  • Sometimes, restarting the computer is needed if the driver is not installed successfully
  • Check you have the driver of your CAN hardware installed on your PC. Sometimes you might be need to upgrade your driver
  • Check the hardware’s firmware version, you might be need to upgrade the firmware
  • If above steps didn’t solve the problem, contact us and we will help you solve the issue. TK Engineering support email: support@tke.fi. Please include information about Windows OS version (32 or 64 bit), CANtrace version, CAN hardware name and serial number.

4. Configure CAN hardware

After you have imported the license to CANtrace, you can start using CANtrace with your CAN hardware.

  • Plug in your CAN hardware to your PC
  • Start CANtrace
  • Open menu CAN->Settings…
  • Click 1 UnAssinged on the left
  • Click Assigned hw drop-down box and select your CAN hardware
  • Check Activate this channel if it’s not checked
  • Configure bitrate and sampling point
  • Click Close to apply the configuration
  • Then click green flash icon to “Go on Bus” on main window
  • If you want to use the logging feature, you need to follow the below section “Logging to File” before “Go on Bus”

5. Using a database (DBC) file

Use the following steps to decode and encode signal data automatically using a database (DBC) file.

5.1 Signals in the Trace View

This is a screenshot of J1939 signals when decoded in the Trace View.

The blue lines are the raw CAN messages with ID and Data. The gray lines are the interpretation of the contents of the messages.

In this case the speed of the truck, as reported by the tachograph, can be seen in km/h and the engine speed in RPM is reported by the engine controller

5.2 Signals in the Graph View

While the Trace View shows all available CAN data, the Graph View only shows the signals that you add though the configuration dialogue.

In this case two signals have been added to the project: Vehicle Speed (from the tachograph) and Engine Speed, and signals were plotted using two different colours to make the graph easy to read.

The data is from the J1939 demo log file, which was logged from the OBD-II port of a heavy truck during a development project we did some time ago. The data shows the truck slowing down to turn onto a smaller side road, you can see the RPM zig-zag in the end as the automatic gearbox is shifting down.

5.3 How to setup and use a database

To use a database to decode signals you need to start by associating a database (DBC) file with a CAN channel. This is done through the File→Associate Database menu.

Click Browse to select the DBC file, and remember to select the correct Software Channel. Channel 0 is for log playback, and Channel 1 is where you have your first real CAN interface

5.4 Setup database in Trace View

As soon as the database is associated with the right software channel the signals will show up in the Trace View, but only if Trace→Fixed View is enabled.

In fixed view a “+” (plus) sign will be visible in front of the CAN message, if the CAN message has a definition in the database file. Clicking the plus sign will open the signal list for that CAN message.

5.5 Setup database in Graph View

In the graph view you have to add the signals you want to view by right-clicking the graph and selecting Configure Signals… from the context menu.

In the Configure Signals dialogue you select “Add Signals..”, which opens up another dialogue where you can browse the database file for available signals. Select the signals you want to view in the graph and click “Add” for every signal you want to include in the graph.

If you include many signals you may want to hide some of the Y-axes to have more room to plot the signals.

With the signals added to the graph you can go on bus and the data will show up in the graph

5.6 Creating a database DBC file

Sometimes you can get the DBC file directly from the manufacturer of the vehicle you are debugging. Other times you can get it from your own R&D department. Sometimes you need to make the DBC file yourself.

CANtrace includes a Database Editor from Kvaser, which can be accessed from the File→Database Editer.. menu.

Using this editor you can create a DBC file for your own custom application.

6. Logging CAN traffic to file

After you have configured the CAN hardware in CAN->Settings… window, you can enable/disable logging in CANtrace. If you want to enable logging, follow the below guide.

  • Click on menu Log→CAN Log Settings… while CANtrace is off bus
  • Configure the log file name and the folder
  • Check “Logging Enabled” is checked
  • Check “Overwrite Existing File” if you want to overwrite the log file every time going on bus
  • Click OK button
  • Go to main window, click green flash button to “Go on Bus” and start logging
  • Logging stops when you go off bus, by clicking the red flash button

7. Playing back a log file

Existing log files in Vector ASCII (ASC) log file format can be played back in CANtrace, either internally or to CAN bus.

When played back internally, the messages from the log file show up in the trace, data and graph view as if they were coming from a real CAN bus. No data will be transmitted to the CAN bus.

When played back to bus, the messages from the log file are pushed out to the CAN bus on the selected channel.

Here we describe how to setup internal playback.

7.1 Configuration

The CAN-Interfaces Settings dialogue used to configure the playback can be found from the menu CAN → Settings…

0 Play log file

Select this software channel to play back an existing log file.

Activate this channel

Select the Activate this channel checkbox to activate the playback.

Playback Channel

Select 0 – Display only to display the log in the trace and graph windows.

Log file name and path

Click the Browse… button to browse to and select the log file to play back. The file selection dialogue by default only shows files that have a compatible file extension (ASC and TXT), but the filter setting can be changed to show all files. The selected filter setting is saved when opening a log
file, and applied when the dialogue is opened the next time.

Log Playback Rate

By default, the As fast as possible radio button is selected. This means that the messages in the log file are played back at the maximum possible rate. Selecting the At the rate recorded radio button will play back the messages at the same rate that they were recorded.

7.2 Playback

After the desired configuration has been applied, click Close to close the CAN-Interfaces Settings dialogue. Go on bus to play back the log. CANtrace will automatically go off bus when the playback has finished.

8. Uninstall CANtrace

Please go to Control Panel→ Programs→ Uninstall a program and uninstall CANtrace.

9. Support

For support, contact TK Engineering, support email support@tke.fi. Please include the following information:

  • Windows OS version (32 or 64 bit)
  • CANtrace version
  • CAN hardware name and serial number
  • Output from Help→License Manager dialogue shows licenses and all detected hardware.