Execute Real-Time Application Using Simulink External Mode

Control of the real-time application with Simulink® is limited to connecting a Simulink model to a real-time application through external mode, and then starting the real-time application. Using Simulink external mode is one method to tune parameters. In Simulink external mode, the model can connect only to the default target computer.

    Note:   Do not use Simulink external mode while Simulink Real-Time™ Explorer is running. Use only one interface or the other.

After you build and download a real-time application to the target computer, you can run the real-time application. This procedure uses the Simulink model xpc_osc3 as an example (see Build and Download Real-Time Application). You must already have specified the required target computer environment on the Simulink Real-Time Options node of the Simulink Real-Time parameters dialog box. In particular, you must specify the target computer to which you want to connect. See the Build for default target computer check box description in Simulink Real-Time Options Configuration Parameters.

  1. Select Simulation > Mode > External.

    A check mark appears next to the menu item External. Simulink external mode is activated. Simulink external mode connects the Simulink model to the real-time application as a simple graphical user interface.

  2. On the toolbar, click the Connect To Target icon  .

    The current Simulink model parameters are downloaded from the development computer to the real-time application.

  3. On the toolbar, click the Run icon  .

    The real-time application begins running. If you have a monitor connected to your target computer, you can view output that looks like this output.

  4. To stop execution, on the toolbar, click the Stop icon .

Was this topic helpful?