Proper formatting of an ASC file for use with canSignalImport

14 次查看(过去 30 天)
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.

回答(1 个)

Vidip
Vidip 2025-7-25
编辑:Vidip 2025-7-25
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!

类别

Help CenterFile Exchange 中查找有关 Vehicle Network Toolbox 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by