Documentation

Set Up and Configure Simulink Real-Time

You must have the following configuration:

  • Single PCI bus target computer

  • Network target computer boot method

You must have installed and configured a C compiler as part of Simulink® Real-Time™ installation. If not, see Command-Line C Compiler Configuration.

Configure Link Between Development and Target Computers

To run a Simulink Real-Time model on a target computer, you must connect the development and target computers in a network.

The Target Network Settings values are representative only. Consult your network administrator for actual values. For more on network configuration, see PCI Bus Ethernet Setup and USB-to-Ethernet Setup.

  1. In the Command Window, type slrtexplr.

  2. In the Targets pane, expand the target computer node.

  3. On the toolbar, click the Properties button .

  4. In the Target Properties workspace, click Host-to-Target communication.

  5. Under Target Network Settings, set values such as the following.

    • IP address: 10.10.10.15

    • Port: 22222

    • Subnet mask: 255.255.255.0

    • Gateway: 10.10.10.10

  6. Under Ethernet Device Settings, set the following values:

    • Target driver: Auto

    • Bus type: PCI

  7. Press Enter, then click the Save button  on the toolbar.

The dialog box looks like this figure.

Note

Support for using ISA bus Ethernet cards to communicate between the development and target computers has ceased to function. Use PCI bus or USB bus Ethernet cards instead.

Configure Target Settings

To run a Simulink Real-Time model on a target computer, you must configure the target settings.

  1. In the Command Window, type slrtexplr.

  2. In the Targets pane, expand the target computer node.

  3. On the toolbar, click the Properties button .

  4. In the Target Properties workspace, click Target settings.

  5. Select USB Support, Multicore CPU, and Graphics mode.

  6. Press Enter, then click the Save button on the toolbar.

The dialog box looks like this figure.

Configure Boot Configuration

To run a Simulink Real-Time model on a target computer, you must configure the target computer boot method. For more on boot methods, see Target Computer Boot Methods.

  1. In the Command Window, type slrtexplr.

  2. In the Targets pane, expand the target computer node.

  3. On the toolbar, click the Properties button .

  4. In the Target Properties workspace, click Boot Configuration.

  5. Select Boot mode Network.

  6. Click Create boot disk.

  7. Press Enter, then click the Save button on the toolbar.

The dialog box looks like this figure.

Run the Confidence Test

Validate the setup and configuration by running the confidence test.

  1. Create a network boot image and restart the target computer. See Network Boot Method.

  2. In the current folder window, select a folder outside the MATLAB® root folder.

    You cannot save build files within the MATLAB root folder because Simulink Coder™ does not allow this action. If you select a current folder within the MATLAB tree, the Simulink Real-Time test procedure fails when trying to build a real-time application.

  3. In the Command Window, type slrttest.

    MATLAB executes the test script for the default target computer and displays messages indicating whether the test passed or failed.

    ### Simulink Real-Time Test Suite 
    ### Host-Target interface is: TcpIp
    ### Test 1, Ping target computer 'TargetPC1' using system ping: ... OK
    ### Test 2, Ping target computer 'TargetPC1' using SLRTPINGTARGET: ... OK
    ### Test 3, Software reboot the target computer 'TargetPC1': ........... OK
    ### Test 4, Build and download a Simulink Real-Time application using model ...
        slrttestmdl to target computer 'TargetPC1': ... OK
    ### Test 5, Check host-target command communications with 'TargetPC1': ... OK
    ### Test 6, Download a pre-built Simulink Real-Time application to target ...
        computer 'TargetPC1': ... OK
    ### Test 7, Execute the Simulink Real-Time application for 0.2s: ... OK
    ### Test 8, Upload logged data and compare with simulation results: ... OK
    ### Test Suite successfully finished
  4. Evaluate the results.

    • If the tests return OK, you are ready to build and download a real-time application to the target computer.

    • If one or more tests return FAILED, see Troubleshooting in Simulink Real-Time.

The next task is Create and Run Real-Time Application from Simulink Model.

Was this topic helpful?