Main Content

Signal Monitoring and Parameter Tuning

Use Simulink® Monitor Signals & Tune Parameters feature (also called External Mode) to connect your Simulink block diagram to your application that runs the model on the target hardware. The block diagram becomes a user interface to the real-time application. By changing parameters in the Simulink blocks, you also change parameters in the real-time application.

To run the model as a standalone application, see Run Model as Standalone Application.

Before starting this procedure:

  • Connect your board to the network and to a power supply.

    Note

    You must have an Internet connection from either the host connected to the target hardware or from the target hardware itself. This connection is necessary in case the software must update the firmware or drivers.

    If your Raspberry Pi® or BeagleBone Black hardware is not connected to an Ethernet network, follow the instructions in the appropriate support package documentation:

  • Create or open a Simulink model.

Configure Model

  1. In your model, set the simulation stop time to inf to run the simulation until you explicitly pause or stop the model.

  2. In the Configuration Parameters dialog box, select the Hardware Implementation pane.

    select the Hardware Implementation pane from the configuration parameters dialog box and set the required parameters.

    1. Set Hardware board to Raspberry Pi or BeagleBone Black.

    2. Review the other parameters on this pane.

      • Raspberry Pi hardware:

        • If you performed a firmware update, Board information is populated with the IP address, user name, and password of your Raspberry Pi hardware. Make sure that the IP address contains the correct address for your hardware. If it is not correct or not present, see Get IP Address of Raspberry Pi Hardware (Simulink).

        • Verify that the TCP/IP port parameter is set to the default value 17725. Simulink uses this TCP/IP port to communicate with Raspberry Pi hardware.

      • BeagleBone Black hardware:

        Under Target Hardware Resources, verify that Device Address, Username, and Password are correct for your board.

    3. To apply any changes and close the dialog box, click OK.

Signal Monitoring and Parameter Tuning

  1. In the Hardware tab of the toolstrip, click Monitor & Tune.

    The model is now running on the target hardware. A system command window opens that shows the messages coming from the model running on the target hardware.

  2. Change any tunable parameters and observe how the changes affect application.

  3. In the model, click Stop in Simulink. The system command window opened in the previous step indicates that the model has stopped running. You can close this window.

Note

Play button on the Simulation,​ Debug and Modeling tabs will always restore the Simulation Mode to whatever its value was before the simulation.

Related Topics