Modelify allows specifying function-to-block mappings for functions in the codebase. This allows the conversion to leverage existing Simulink blocks or company-specific block libraries.
Modelify provides a default list of mappings for several mathematical operations. Click the Add Defaults button to add the default mappings.
You can enable or disable mapping rules individually by clicking the checkbox in the Function column.
To create a new custom mapping rule:
The Block Types dialog is used to select the block type for the library mapping. The Block Type can be selected from either the built-in Simulink block types or from a custom library.
If you would like to select a built-in Simulink block type, select the Simulink Block tab in the dialog. The Search box can be used to find a block type and then select it in the list.
To select a block type from a custom library, select the Custom Library Block tab in the dialog. Then choose the custom library file using the Browse... button. Modelify will then load the list of block types in the selected file and fill the list.
Using the toggle buttons under Show, you can choose whether Subsystems and Non Subsystems should be shown in the list.
The In Port Map Dialog is used to map the parameters of the C function to the correct Simulink block ports. This is necessary if the parameters of the C function are in a different order than the block ports or if there are more parameters than ports or vice-versa.
To map function block inports:
The Add and Remove buttons are used to add and remove parameters.
The Out Port Map Dialog is used to map the out ports of the Simulink block to the return value of the C function. This is necessary if the Simulink block has multiple out ports.
To map function block outports:
The Add and Remove buttons are used to add and remove block ports.
The Block Properties Dialog is used to configure the properties of the block that will be created. You can set the value for selected block's parameters.
To set the value for block parameters:
The Add and Remove buttons are used to add and remove properties.