I use Canalyzer regularly to analyze automotive CAN Networks. To
display CAN plots more easily or load data into MATLAB/Simulink, I
frequently convert the CANalyzer log files to mat files using the
converter built into CANalyzer.
I now find myself with a batch of 40 plus log files to convert from
log to mat files. Does anyone know the format of log files to allow
me to write my own batch converter in MATLAB?
The CANalyzer converter is both slow and laborious to set up, and
does not seem to support batch conversions.
All help appreciated.
Simon
Hello Simon,
We don't currently have a method of converting a batch of log files
into another format. If you want to write your own batch converter,
it would be easiest to convert from the ASCII format. The ASCII
format should be easy enough to understand using a simple text editor.
0.0002 1 A Rx d 1 D8
One line from an ASCII log file:
Time Stamp, CAN Channel #, Message ID (in hex), Rx for received (Tx
for transmit), 'd' for data, and finally the data in Hex.
I hope this helps. Feel free to contact us at Vector if you need
anything. I'll try and check this newsgroup when I get back from
break.
Happy Holidays,
Eric Kampe
Vector CANtech
248-449-9290
eric....@vector-cantech.com
Thanks for your post. I only just found it as the newsgroup didn't
send me an email when someone replies to the thread.
Unfortunately all the log files are in binary format. My analysis of
the files shows a header section, starting with "MDF", and including
a timestamp and date. The data section then starts with each line
havng a timestamp, (reading from LSB to MSB), CAN channel number, Rx
or Tx flag, the message ID, (again LSB first) four bytes of null
padding, then the data itself.
Am I correct so far?
Many thanks for the help,
Simon
I haven't gotten a chance to work directally with the MDF format as
of yet, so I cannot verify your breakdown of the log file off hand.
However, I wouldn't want you to spend all the time necessary to
decode this file type by hand.
I have a formal description of the MDF file format, and a C library
with example code that should be what you need to get started reading
binary log files from CANoe or CANalyzer.
I'll forward these files to your email address, and they are
available to anyone else reading this thread that may be interested.
I hope this helps.
As always, questions/comments are welcome.
Eric Kampe
Vector CANtech
248-449-9290
eric....@vector-cantech.com