Real-Time Windows Target    

Running a Real-Time Application

Running your real-time application lets your observe the behavior of your model in real time with the generated code.

The process of connecting consists of:

After you build the real-time application, you can run your model in real time. This procedure uses the Simulink model rtwin_model.mdl as an example, and assumes you have created a real-time application for that model:

  1. From the Simulation menu, click External, and then click Connect to target. Also, you can connect to the target from the toolbar by clicking  .

    MATLAB displays the message

  1. In the Simulation window, and from the Simulation menu, click Start real-time code. Also, you can start the execution from the toolbar by clicking  .

    Simulink runs the execution and plots the signal data in the Scope window.

    In this example, the Scope window displays 1000 samples in 1 second, increases the time offset, and then displays the samples for the next 1 second.

    Note Transfer of data is less critical than calculating the signal outputs at the selected sample interval. Therefore, data transfer runs at a lower priority in the remaining CPU time after real-time application computations are performed while waiting for another interrupt to trigger the next real-time application update. The result may be a loss of data points displayed in the Scope window.

  1. Do one of the following:

    The real-time application stops, and MATLAB displays the message


 Entering Additional Scope Properties for Signal Tracing Signal Logging to the MATLAB Workspace