Proper formatting of an ASC file for use with canSignalImport

15 visualizaciones (últimos 30 días)
Michael Harrison
Michael Harrison el 9 de Abr. de 2025
Editada: Vidip el 25 de Jul. de 2025
I use a CAN data logger which can export in both blf and asc. When using a blf file, with the appropriate dbc file, I can get the information into Matlab and properly decoded using the blfRead function.
For a separate reason, I need to get the option of importing the asc version of the data into matlab and that isn't working. Using the function canSignalImport, what is returned is an empty timetable.
The data logger I am using, I believe is using a custom asc format which canSignalImport is not expecting. I have attached a sample of the asc file.
date Thu Jan 1 13:25:28 2025
base hex timestamps absolute
internal events logged
Begin Triggerblock Thu Jan 1 13:25:28 2025
88.9700373 1 Rx 0x040 64 F 0 1 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 04 00 01 00 00 40 00 10 00 04 00 01 00 00 40 00 10 00 07 FF FC FF FF 3F FE CF F8 A3 FF 04 13 6F 3F FA 00 00 60 00 01 00 00 00 00 00 00 00 00 00 00
End Triggerblock
The CAN data logger is using CANFD. There are 64 elements in the expected data packet. The message ID is 40hex.
What modifications need to be made to the ASC file such that canSignalImport will bring the data into matlab and decode it.
The dbc file which should be paired with this does work, unedited, with the blf version of this exact data.

Respuestas (1)

Vidip
Vidip el 25 de Jul. de 2025
Editada: Vidip el 25 de Jul. de 2025
I understand that you are facing some issues while trying to import the ASC version of the data into MATLAB.
Please make sure that your ASC-file uses spaces to separate the message fields. A file which uses tabs may look like any other ASC-file but cannot be successfully imported.
I hope this helps!

Categorías

Más información sobre Vehicle Network Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by