General

The General tab provides several configuration options separated into sections. At the top-right corner, it provides two convenience buttons to import settings from a different project and to re-convert the last reviewed function after changing conversion settings.

MATLAB version

Here you can choose the MATLAB version you want Modelify to use when creating models.

It also provides a link to access the MATLAB Preference Page where you can configure the MATLAB installations you have on your system and want Modelify to be aware of.

Model

The Model section includes options related to the model creation and contents.

Option Description
Generate model info block Enabling this option will add a Model Info Simulink block to every model created by Modelify. This Model Info block will give information about the Modelify version it was created with, when the model was created, and the original function that is was created for.
Display block names This option controls whether or not the name of each Block is shown in the model.
Show port data types When this option is enabled, generated Simulink models will display the data type next to each block port.
Display line numbers annotation An annotation will be added to each block to show the line number in the source code for which it was created.
Create Simulink Project A Simulink Project will be created to manage the models created for this C project.
Create stub block diagrams for undefined functions Stub block diagrams will be generated for any functions that are declared but not defined. A stub block diagram contains the necessary blocks to represent the function interface. This allows model generation to continue without the need for a concrete function definition. Stub block diagrams can be saved as a model or as a library subsystem block depending on the Store stub block diagrams as a library block setting selected in the User Library section.
Create TargetLink compatible models When this option is enabled, the generated model will only contain Simulink blocks that are supported by TargetLink.
Inport Suffix Suffix to be used for Inport blocks corresponding to global variables. This suffix will only be added if name collision is detected, that is, if an Outport with the same name exists.
Outport Suffix Suffix to be used for Outport blocks corresponding to global variables. This suffix will only be added if name collision is detected, that is, if an Inport with the same name exists.

Model Storage

Option Description
Model Storage Directory By default, generated models will be stored in a Modelify folder under the project location. However, you can set a different location by changing the value in the Model Storage Directory text box.
Storage Behavior The storage behavior indicates how models will be stored. Flat means that all models will be stored in a single directory. Full Function Path means that a directory structure similar to that of the project will be created for each function. Directories will also be created for .c files.
Remove File Extension This option applies only when the 'Full Function Path' storage behavior is chosen. If this option is enabled, the directory created for the source file will not contain the file extension in the name.

Data Storage

Option Description
Initialization File Modelify stores design data in an initialization file. Design data includes Bus and Enumeration definitions, workspace variables for constants, and Simulink.Signal definitions. This data can either be stored in an initialization M-Script file which is included in 'PreLoadFcn' model callback, or a Data Dictionary file that is linked from the models.
Create MATLAB variables for macro constants If enabled, Modelify will create MATLAB variables for object macros with the corresponding value and will store them in the initialization file. These variables will then be used in Constant Simulink blocks or in Stateflow Transitions. This setting simplifies calibration of control systems by putting constants at a single place.
Apply Initialization File to all models Enabling this option will apply Initialization File to all models. If this option is disabled, the Initialization File will only be applied to models that use any design data specified in the file.

User Library

Modelify can be configured to convert functions that meet some criteria to a library block. Below explanation of checkbox options describe the criteria.

Option Description
Library Name Specify the name for the Simulink user library.
Library Directory Leave this value empty to store the library in the same directory where models are stored, or specify a different directory for the library.
Store stub block diagrams as a library block This setting applies when the Create stub block diagrams for undefined functions setting in Model section is enabled. If enabled, stub block diagrams will be saved as a subsystem block in the user library. Otherwise, a standalone stub model will be created.
Convert functions called over the threshold to a library block Enables the recommendation to convert frequently-called functions to a user library block. The Call Threshold is the minimum (inclusive) number of times that a function must be called to automatically be converted to a user library block. Functions that don't meet this threshold can still be manually configured to be converted to a user library block.

HTML Report

Modelify can create an HTML report that can help show how the code was converted. The report shows the source code on the left and the names of all the blocks that were created for each line of code on the right. Note that this information is only available for functions that are included in a conversion bundle.

It also contains a screenshot of the model so you can look between the source code and the model to see how the conversion was done. An HTML report will be created for each model that is created. A Table of Contents is included to facilitate navigation between each of the function conversion reports to review the entire conversion.

A sample report screenshot is shown below.

The image below describes the options for the HTML Reports section.

Option Description
Generate HTML Report This option allows you to enable or disable the creation of the HTML Reports.
The HTML reports for all function conversions are stored together in a directory. By default, they are stored in a reports directory under the model storage directory.
Include company name in the report Enable this option to include a company name in the HTML report. Enter the company name in the Company Name field.
Include company logo in the report Enable this option to include a company logo in the HTML report. Click the Browse button to select the company logo file to be used.
Use 24 hour clock Enable this option to use the 24-hour clock format for the report creation time. Otherwise, 12-hour clock format will be used.
Date Format Select date format for the report creation date. You can select any of the following options: D/M/Y, M/D/Y and Y/M/D.
Link to Source Files Enabling this feature will create a link from the HTML report to the original C file.
Create copy of the Source File in the HTML Report Directory This option applies only when the Link to Source Files option is enabled. Enabling this option will create a copy of the original C source file in the HTML report directory and will link to it instead of the original C file.