canalyzer blf file to mat file conversion

This is not a question.This is an answer on how to do this with the famous thread that is contunuing but has no answers. I have uplaoded the files here.

17 comentarios

Tejas Sonavane
Tejas Sonavane el 30 de Mayo de 2017
Here is answer to you question. This module is Called CanLoad and is created by Reid Steiger in Ford. I have attached the files you will need. Here is how it operates.
  • Unzip the folder contents
  • Put all the files that I have attached here in a folder.
  • Use dbc2ModuleBatch.p file to convert your .dbc files into these four files namely --> can_module_ext.mGetAsciiMessageFilterList.m , identify_DBC_Name.m , module_dbcname.m.
  • Place all the above newly files in the directory that contains the .blf files and add to the Matlab path.
  • Run CanLoad.p , this requires an input that is full name and path of the file.
Ahmad Gharib
Ahmad Gharib el 7 de Jul. de 2017
Hello tejas, do we need the Matlab CAN Network Toolbox to make it running ?
Tejas Sonavane
Tejas Sonavane el 15 de Ag. de 2017
No You dont. Actually the Vehicle Network ToolBox is slower and i have address this to Mathworks
Stefan
Stefan el 15 de Sept. de 2017
Can this tool also handle asc files?
Marco Krahl
Marco Krahl el 25 de Oct. de 2017
Movida: Dyuman Joshi el 1 de Nov. de 2023
Hi all, where can I get the files Tejas is talking about?
Tim von Umbscheiden
Tim von Umbscheiden el 10 de Nov. de 2017
Movida: Dyuman Joshi el 1 de Nov. de 2023
Simple: Click on "show older comments" to see the first comment to his post. The files are attached there.
Tim von Umbscheiden
Tim von Umbscheiden el 13 de Nov. de 2017
I didn't try asc files on this. But you can convert asc files to blf format in CANoe. Use the "Tools" menu. There is the function "Logging File Conversion".
A second way would be to use the asc as a seurce file for offline playback and setup a log as blf file. The playback will then result in a new blf file log.
M SK
M SK el 15 de Nov. de 2017
I extracted .blf to .mat as per the steps given above. I got all the CAN fames and their associated signals in workspace, but the signals s didn't have any time associated with it. I could see a signal having only 128 values and some other signal having more than 4000 values. So how to regularise the data with a common timestamp?
Fabian Besler
Fabian Besler el 9 de En. de 2018
CAN messages cannot have a common timestamp. CAN is an asynchronous protocol and there can only be 1 CAN message at a time. Without timestamp for every frame, you can never know when the message was received.
Stefan
Stefan el 10 de Jul. de 2018
@Tim von Umbscheiden I have to say that the provided tool is quite good in case you dont have CANoe / CANalyzer. When you have one of these sofware you always can convert every can log file (asc, blf, mdf, ...) into MAT files with physical data.
Seth Berger
Seth Berger el 5 de Nov. de 2020
I stumbled across this today since I have a handful of large blf files from a Vector GL2000 I need to convert to the mat format to perform a short analysis on in Matlab. I've followed the instructions above and can't seem to produce anything useful, so I am wondering if I am missing a step or action in my approach. If you have any updates, or suggestions I am happy to discuss. Thank you your time.
Hang Zhang
Hang Zhang el 23 de Dic. de 2021
@M SK It's a normal case. You can try to interpolate the signal (128 values) based on their common timestamp.
Katherine Vaughn
Katherine Vaughn el 28 de Abr. de 2022
The CanLoad is causing my MATLAB to crash and shutdown.
Mohammad Basiri
Mohammad Basiri el 9 de Ag. de 2022
Editada: Mohammad Basiri el 9 de Ag. de 2022
@Tejas Sonavane I'm receiving the following error while running dbc2ModuleBatch.p:
Index exceeds the number of array elements (64).
Error in dbc2Module
Error in dbc2Module
Error in dbc2ModuleBatch
teng
teng el 7 de Mzo. de 2024
Unable to perform assignment because the left and right sides have a different number of elements.
Error in dbc2Module
Error in dbc2Module
I've faced this problem, Could you please help me?
Xiaoniu
Xiaoniu el 2 de Mzo. de 2026
Hi, where is it uploaded? I cannot find as files, or matlab code on this webpage?
Walter Roberson
Walter Roberson el 2 de Mzo. de 2026
@Tejas Sonavane uploaded files as the first comment here. You might need to Show Older Comments to see them.

Iniciar sesión para comentar.

Respuestas (5)

Ivan Plavcic
Ivan Plavcic el 19 de Sept. de 2019

2 votos

Hello,
I get the followin message when trying to run 'CanLoad.p':
''Are you using the correct binlog.dll?
No Data Loaded!''
Any suggestions?

2 comentarios

Ashish Sharma
Ashish Sharma el 8 de Jul. de 2021
@Ivan Plavcic I get same error. Have you found a fix?
Matteo
Matteo el 13 de Abr. de 2023
Hello to all,
I got the same error on.
I fixed it moving binlog.dll in the same folder of CanLoad (previously was inside folder x64).

Iniciar sesión para comentar.

Rodrigo Adamshuk Silva
Rodrigo Adamshuk Silva el 11 de Ag. de 2017

0 votos

After creating the "can" variable in the Workspace, how can I open the CAN messages that I need?

2 comentarios

Tejas Sonavane
Tejas Sonavane el 15 de Ag. de 2017
Cna you show me what your workspace looks like, like a snip and I will be able to help you right away
Antonio Carvalho
Antonio Carvalho el 15 de Feb. de 2024
@Rodrigo Adamshuk Silva ciao. Do you have any news from your qustion? Thanks,

Iniciar sesión para comentar.

Steven
Steven el 15 de Nov. de 2017
After following your steps I called
temp = CanLoad()
and selected my test.BLF file to read in. As a result I get
temp =
sw: [1x1 struct]
where temp contains only software version, but no data.
Can anyone tell me whats going wrong?

2 comentarios

Stefan
Stefan el 25 de Nov. de 2017
Editada: Stefan el 25 de Nov. de 2017
Please have a look into the mFile of CanLoad. There you can find examples how to you use this tool. Further i found out, that you have put all corresponding DBC files into the same directory of CanLoad.
CAN FD would not supported, the mex file crashes.
This tool also works with asc files in the same way as blf files. but it takes much much longer.
Jorg Anckaert
Jorg Anckaert el 4 de Abr. de 2019
Hey Steven,
I seem to have the same issue. Did you manage you resolve it?

Iniciar sesión para comentar.

Nazar Rozkvas
Nazar Rozkvas el 10 de Jul. de 2018
Editada: Nazar Rozkvas el 10 de Jul. de 2018
Dear Tejas,
I have been trying to extract the .dbc files with the steps you have described, however, I am unsuccessful. I guess i'm just doing something wrong.
When I feed my files to the dbcModuleBatch.p, I get the following error:
>> dbc2ModuleBatch('Ehorizon__M002.blf')
Error using dbc2ModuleBatch
Too many output arguments.
I have also tried to feed the files to the CanLoad.m, but it have also failed:
>> CanLoad('Ehorizon__M002.blf')
Error using cd
Cannot CD to /Users/mac/Documents/.../CanLoad\ (Name is nonexistent or not a directory).
Error in CanLoad
I would really appreciate your help

2 comentarios

Nazar Rozkvas
Nazar Rozkvas el 19 de Jul. de 2018
Apparently, MATLAB has not developed the toolbox for the Mac OS...
Hang Zhang
Hang Zhang el 23 de Dic. de 2021
Editada: Hang Zhang el 23 de Dic. de 2021
Pay attention to Step3:
  • Unzip the folder contents
  • Put all the files that I have attached here in a folder.
  • Run dbc2ModuleBatch.p by click your right button of mouse to select the directory where including .dbc files, this step would build these four files named as can_module_ext.m, GetAsciiMessageFilterList.m, identify_DBC_Name.m, module_dbcname.m.
  • Place all the above newly files in the directory that contains the .blf files and add to the Matlab path.
  • Run CanLoad.p, this requires an input that is full name and path of the file.
Notice! CanLoad can not support CANFD!

Iniciar sesión para comentar.

Andrei
Andrei el 13 de Oct. de 2023

0 votos

blfread function (Vehicle Network Toolbox) can be used to read data from BLF files in MATLAB

4 comentarios

teng
teng el 7 de Mzo. de 2024
it only support blf file recorded by canoe. I can't parse
小松
小松 el 19 de Jun. de 2024
Hi, is it possible for MATLAB 2018b version to use this function?
Andrei
Andrei el 5 de Nov. de 2024
blfread was introduced in MATLAB R2019a.
gu
gu el 8 de Feb. de 2025
hi, blfread only used for can&canfd, cannot be used for frexray. Any suggestions?

Iniciar sesión para comentar.

Preguntada:

el 30 de Mayo de 2017

Comentada:

el 2 de Mzo. de 2026

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by