Log signals to MDF file
R2026bModel Configuration Pane: Code Generation / Interface
Description
Generate code that logs signals and outputs to an ASAM Measurement Data Format (MDF) file. After executing the generated code on your target hardware, you can view the time series of generated code variables by importing the MDF file into the Simulation Data Inspector. You can also use Vehicle Network Toolbox™ MDF-file functions to analyze the time series.
Dependencies
Logged data must be of these types:
Boolean
Signed and unsigned 8, 16, 32, and 64-bit integers (
int8,uint8,int16,uint16,int32,uint32,int64,uint64)Floating point
single,double,half)Unnested and nested compositions of the preceding types (for example, buses that contain arrays of complex integers)
These model configuration parameter settings:
Set Type to
Fixed-step.Select Treat each discrete rate as a separate task.
Set Save format to
Dataset.Select Signal logging to log signal data.
Select Output to log root-level output data of the top model.
Settings
Off (default) | On- On
Generate code that logs data to an MDF file.
- Off
Do not generate code that logs data to an MDF file.
Examples
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | No impact |
| Efficiency | Off |
| Safety precaution | No recommendation |
Programmatic Use
Parameter:
LogToMDFFile |
| Type: character vector |
Value:
'on' | 'off'
|
Default:
'off' |
Limitations
Logging to an MDF file is not supported:
For fixed-point data and strings.
If model configuration parameter External mode is selected.
For models configured to use service code interfaces and intended for component deployment.
Version History
Introduced in R2024a



