Main Content

Monitor Signals by Using Simulink Real-Time Explorer

This procedure uses the model slrt_ex_osc and shows how to instrument signals in Simulink Real-Time Explorer to monitor streaming signal data.

  1. Open model slrt_ex_osc. In the MATLAB® command window, type slrt_ex_osc.

  2. Connect to a target computer. On the Simulink® Editor Real-Time tab, select a target computer and toggle the Disconnected indicator to Connected.

  3. Build the real-time application for the target computer. Click Run on Target > Build Application.

  4. Open Simulink Real-Time™ Explorer. Click Prepare > SLRT Explorer.

  5. Click Load Application. Select the slrt_ex_osc application from the Applications on target computer list and click Load.

  6. To view the logged signals —which are processed by the File Log block in the real-time application— and the streamed signals —which are streamed by the instrument in the real-time application— in the Simulation Data Inspector, click Data Inspector.

  7. Set the real-time application Stop time to inf.

  8. To start the real-time application, click Start.

  9. To stop execution, click Stop.

  10. Observe that the Simulation Data Inspector is updated with signal data from the File Log block after the application stops.

  11. To select a signal to stream in the real-time application, choose the SigGen signal from the Signals available on target computer list , and then click Add to signals in instrument Image of add to signals in instrument button.

    Or, select the signals to monitor from the list, right click and select Add To Instrument List.

    Then, click Add Instrument.

  12. Click Start and observe that the signal data appears in the Simulation Data Inspector as the application runs.

  13. While the real-time application is running, add another signal to stream. Choose the XfrFnc signal from the Signals available on target computer list , and then click Add to signals in instrument . To update the instrument, click Configure Instrument.

  14. Observe that the added signal data appears in the Simulation Data Inspector as the application runs, starting at the time you updated the instrument.

  15. You can click Remove Instrument to stop streaming signal data without stopping the real-time application.

  16. To stop execution, click Stop.

Related Examples

More About