If you want to exchange configured bus communication with a behavior model and you do not have a suitable model yet, you can generate a Simulink® model interface from within the ConfigurationDesk application. When you do this, model port blocks are generated for function ports whose model access is enabled, and the model ports are mapped to the function ports.
The model port blocks are available in the ConfigurationDesk application and in a Simulink model. Additionally, a model block periphery can be generated in the Simulink model, i.e., subsystems providing bus creators, bus selectors, constant blocks, etc.
For example, you can use the generated Simulink model interface as follows:
As a starting point to model a behavior model.
To copy the generated blocks to an existing behavior model.
In this lesson, you will generate a Simulink model interface for the simulated restbus communication that was configured in lesson 2.
When you add a Simulink model to the ConfigurationDesk application, you can synchronize the model interfaces if you make changes in the ConfigurationDesk application or the Simulink model. The synchronization applies only to model port blocks, not to other blocks that might be available in the Simulink model.
You can generate a Simulink implementation container (SIC file) from a Simulink model. If the Simulink model is already available in the ConfigurationDesk application, you can easily replace the model in the ConfigurationDesk application with the generated container. When you do this, the mapping of model ports to function ports remains unchanged.
For example, this lets you generate bus simulation containers without any additional manual port mapping.
In this lesson, you will learn how to generate a Simulink model interface including a model block periphery, and synchronize the model interfaces in the ConfigurationDesk application and in Simulink. Additionally, you will generate a Simulink implementation container from the Simulink model, and replace the Simulink model in the ConfigurationDesk application with the generated container.
Before you begin this lesson, the following preconditions must be met:
MATLAB®/Simulink® and the Model Interface Package for Simulink are installed.
MATLAB must be connected to the dSPACE installation. If multiple MATLAB installations are connected to the dSPACE installation, one MATLAB installation must be specified as the preferred connection. For more information, refer to Connecting dSPACE Installations to MATLAB .
You prepared the bus configuration tables for working with the tutorial. Refer to How to Prepare Bus Configuration Tables for Working with the Tutorial.
The result of lesson 2 is available and the related application is active.
If you did not work through lesson 2, you can activate the Lesson_2_Results application. Refer to How to Activate an Application in the BusManagerTutorial Project.
This lesson contains the following steps:
The lesson concludes with a summary of the lesson content and with further information. Refer to Result of Lesson 9.
Completing this lesson will take you about 40 minutes.