Converts Matlab/Simulink data stored in 'MAT' format to DAT format (MDF 3.0) which can be read by ETAS MDA or CANape tool.
Please follow instruction to use at GitHub repo: https://github.com/rrahuldev/ExportMDF
Rahul Rajampeta (2020). ExportMDF (https://github.com/rrahuldev/ExportMDF), GitHub. Retrieved .
It works great!
Thank you very much for the function
I would like to ask you if there's a way to export a MDF document with multiple tables (insted of only one) in the same file.
I have different signals with different time vectors for data reduction and I would like to have all them in one MDF file.
Have used this many times now to convert data from Excel/Matlab into MDA for plotting, massive time saving, Excellent
Error comes up: Undefined function 'writeDatFile' for input arguments of type 'struct'. how to resolve?
@Rahul: Somehow, I never got a message that you commented on me. I have created an issue. It would be very nice if you could look at it!
@David Kröter - could you create an issue in the github repo (https://github.com/rrahuldev/ExportMDF/issues) and attach mat-file to the issue. Thanks!
Great submission! However, I have a problem exporting vector signals: Once a signal with higher dimension (i.e. 1x16) is included in the logsout structure, the data cannot be read anymore using my preferred signal analysis tool. If you want, I can provide you the *.mat of my logsout structure, so you can do some further investigations.
@Andrew check GitHub repo for m scripts
@Arunkumar Not currently. But, you could pre-process signals to fixed time vector with the fastest time raster (eg interp1 with a fixed time vector )..
Can this tool also handle MAT files containing data with different raster?
Is there any possibility to post this as a .m script for people with older versions of matlab e.g. 2012a that can't use apps, it would be hugely appreciated
First of all thank you for your study.
Is there a solution for exporting datesets which have signals with different lenght?
Is there a solution for exporting datesets which have BUS signals?
Thanks for your help.
ExportMDF app is working good.
I would like to know if a MATLAB function for data export available with you to use in scripts? Could you share it if possible?
Hi it is Really good tool for engineer who works using CANape Or INCA tool
Tool works great.nice. Thank you.
But is there any way to make in work at MATLAB 2013a ( Or Any Older Version than 2013b)??
I know that the struct2table Function is available at 2013b version. and I think this function is very important for this
Can you help me about this problem? Thank you very much
First of all thank you for your time.
Yours script works well but only with 1 signal inside the mat file. If you have many signals it will not work anymore.
All the signals are merged into 1 signal with this ligne.
"dataStruct = classStruct(rawStructure)"
Thanks for your help.
Thanks for the feedback. I did update the script to fill 0x0 for 28 bytes. It should work the CANape tool as well.
Tool works great!
I checked the mdf standard:
the 28 Bytes you filled with 0x20 are reserved bytes.
CANape only works if the are zero.
If you could change them to zero ETAS MDA tool & CANape should work without problems :-)
@Konrad Bertignoll: Thanks for the feedback.
The output file of the app is intended to be used with ETAS MDA tool. The format required for that specifies the first 64bytes to be in a particular format.
Glad it works for CANape with a patch.
I was unable to open the mdf3 file with CANape. After checking it with the vector mdf checker
I found the problem:
Bytes 0x20 to 0x3C (28 Bytes) should be filled with 0x0 instead of 0x20.
After patching it works!
Updated minimum requirement for Matlab version. Moved the files to GitHub repository: https://github.com/rrahuldev/ExportMDF
use INLINE with your model simulation as a post script when simulation data is saved as SimulationDataset
Includes the update for using the output file with CANape.
Supports non-uniform Time series, generated through variables logged in enable/trigger/function call subsystems. No data values are interpolated to nearest available values.
Update now reads workspace variables selected to create a MAT file. (use TimeSeries as the parameter option for the 'to workspace' blocks)
Inspired by: MDF Import Tool and Function