Main Content

External Mode Simulation of Deployed Applications

You can use the Linux Runtime Manager app to deploy the models that you configure for external mode. The app also supports external mode simulation by establishing a communication channel between the model running on host computer and the application running in a docker container on Linux target.

To understand more about external mode simulation, see External Mode Simulations for Parameter Tuning, Signal Monitoring, and Code Execution Profiling. To know more about deploying a model on target computer, see Build Simulink Model and Deploy Application.

To perform external mode simulation of the deployed application follow these steps.

  1. Open an AUTOSAR adaptive model.

  2. Set the Hardware board configuration parameter in the Hardware Implementation to Embedded Coder Linux Docker Container.

  3. Set the Transport layer parameter in the XCP Slave Configuration pane of the Code Generation > AUTOSAR Code Generation to XCP On TCP/IP.

  4. Specify the IP address of the target machine and port number for XCP communication in the Code Generation > AUTOSAR Code Generation > XCP Slave Configuration section.

  5. Enable the External mode option in the Interface pane of Code Generation section.

  6. To log signals, select the signals you want to log and click the Log Signals in the Prepare pane of the Simulation section.

  7. Open the Linux Runtime Manager from the Simulink apps gallery. Alternatively, enter this command at the MATLAB Command Window.

    linux.RuntimeManager.open

  8. Deploy the model on the Linux target machine. See Build Simulink Model and Deploy Application for more information.

  9. Select the model in the Linux Runtime Manager and click Monitor & Tune button to start the application and an external mode simulation.

  10. Tune the parameters using the Simulink model. You can use Dashboard blocks like Slider, Knob, Radio Button, Push Button etc. or directly changing block parameters. You can view the signals directly in Simulink model using Dashboard blocks like Gauge, Scope etc. You can also view the signal in Signal Data Inspector.

Select the application and click Stop Monitor & Tune to stop the external mode simulation. Or select the application and click Stop Application button to stop application.

You can also deploy a DDS Blockset model configured for external mode. For a DDS Blockset model, you can enter the target details in the MEX-file arguments section of the External mode configuration tab in the Interface section of Code Generation tab. For more information, see MEX-file arguments.

See Also

Related Topics