Real-Time Windows Target    

Entering Signal and Triggering Properties

Data is saved to a disk drive by first saving the data to the MATLAB workspace through a Simulink Scope block. Signal and triggering properties need to be set when running a real-time application.

After you create a Simulink model and add a Scope block, you can enter the signal and triggering properties for data logging to a disk drive. This procedure uses the Simulink model rtwin_model.mdl as an example and assumes you have already loaded that model:

  1. In the Simulink window, and from the Tools menu, click External Mode Control Panel.
  1. The External Mode Control Panel dialog box opens.

  1. Click the Signal & Triggering button.
  1. The External Signal & Triggering dialog box opens.

  1. Click the Select all button. From the Source list, choose manual. From the Mode list, choose normal.
  1. The X under Signal selection designates that a signal has been tagged for data collection, and T designates that the signal has been tagged as a trigger signal.

  1. In the Duration box, enter the number of sample points in a data buffer. For example, if you have a sample rate of 1000 samples/second and a stop time of 10 seconds, then enter
  1. Note The Duration value is related to the Limit data points to last value in the Scope parameters dialog box. The smaller of either value limits the number of sample points saved to the MATLAB workspace. We recommend that you do not select the Limit data points to last check box, and use the Duration value to set the number of sample points saved.

    The Duration value specifies the number of contiguous points of data to be collected in each buffer of data. We recommend that you enter a Duration value equal to the total number of sample points you need to collect for a run.

    If you enter a value much less than the total number of sample points, you may lose logging sample points due to the time needed to transfer values from the data buffer to the MATLAB workspace.

    We also recommend setting the time axis for Simulink Scope blocks equal to the sample interval (in seconds) times the number of points in each data buffer. This setting will display one buffer of data across the entire Simulink Scope plot.

    The External Signal & Triggering dialog box will look similar to the figure shown below.

  1. Do one of the following:
  1. Note You must click the Apply or Close button on the Signal and Triggering dialog box for the changes you made to take effect, but you do not have to rebuild your real-time application.


  Entering Scope Parameters Entering Data Archiving Parameters