You might see an error when you try to create an object for access to the
MDF-file with the mdf
function.
A likely cause is an MDF-file that is improperly formatted or that includes unsupported elements. Vector provides an MDF Validator tool for checking an MDF-file. To download the tool visit MDF Validator.
You might see an error when you try to read data from an MDF-file with the
read
function.
A possible cause is an MDF-file that is improperly formatted or that includes unsupported elements. Vector provides an MDF Validator tool for checking an MDF-file. To download the tool visit MDF Validator.
Another possible cause is an unsorted MDF-file. Beginning in R2019b,
accessing an unsorted MDF-file generates a recognizable error, and you
can sort the file using the mdfSort
function.
When unable to read the entire file, you can read data one channel at
a time. Use the read
function with the form
data =
read(mdfObj,chanGroupIndex,chanName)
You might see an error when you try to read data from an MDFDatastore with the
read
function.
Those channels targeted for reading must have the same name and belong to the same channel group in each file of the MDF datastore. Assure uniformity across the MDF-files in the database for the channels you are reading.
You might be unable to find and read a channel of interest in the MDF-file.
To identify channels in the MDF-file, use the channelList
function.
The saveAttachment
function fails to save
a file attached to the MDF-file.
The saveAttachment
function works only with
embedded attachments; external files are not saved because they are
already on disk.
If the attachment does not exist, check with the provider of the MDF-file.
Vehicle Network Toolbox™ does not support array channel structures.
To read these channels, you must write a composition function to repackage the data.
Reading MDF-file channels with MIME or CANopen data generates an error.
MIME and CANopen data are not supported by Vehicle Network Toolbox.
When reading an MDF-file, the column names of the output timetable correspond to the channel names in the file, but they might not be identical. Table column names must be compliant with MATLAB variable names, so they are altered to limit their size and characters. Most unsupported characters are converted to underscores.
The returned timetable preserves the ordering of the channels. So you can access data in the table with numerical indexing.
The original names of the channels are embedded in the timetable properties. For example:
m = mdf('File01.mf4');
tt = read(m);
t1 = tt{1};
t1.Properties.VariableDescriptions
ans = 1×2 cell array {'Sigend_Int16_LE_Offset_32'} {'Unsigend_UInt32_LE_Master_Offset_0'}
channelList
| mdf
| mdfSort