This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Trigger Scopes with Simulink Real-Time Explorer

To facilitate your interaction with the running model, you can configure scope triggering for Simulink® Real-Time™ scopes. You can configure triggering whether you created the scope by adding a Scope block to the model or by adding the scope at run time.

The following procedures use the model xpcosc. You must have already completed the procedure in Create Target Scopes with Simulink Real-Time Explorer. Target execution and scopes must be stopped.

Freerun Triggering

In Trigger Mode Freerun, the scope triggers automatically when it is started. It displays data until it is stopped. By default, Trigger Mode is set to Freerun.

  1. Start execution ( on the Applications toolbar).

  2. Select Scope 1 and open the Properties pane ( on the Scopes toolbar).

  3. In the Scope 1 pane, click Triggering.

  4. Select Trigger Mode Freerun.

  5. Start and stop Scope 1 ( and  on the toolbar).

    Signal data is displayed on the target computer monitor when the scope starts and stops when the scope stops.

  6. Stop execution ( on the Applications toolbar).

Software Triggering

In Trigger Mode Software, the scope triggers when you select Scope 1 and then click the Trigger button  on the toolbar.

  1. Start execution ( on the Applications toolbar).

  2. Select Trigger Mode Software.

  3. Start Scope 1 ( on the toolbar).

    The Trigger button   is enabled on the toolbar.

  4. Click the Trigger  button on the Scopes toolbar.

    The current signal data is displayed on the target computer monitor when you click the button.

  5. Stop Scope 1 ( on the toolbar).

    The dialog box looks like this figure.

    The target monitor looks like this figure.

  6. Stop execution ( on the Applications toolbar).

Signal Triggering

In Trigger Mode Signal, the scope triggers when a signal rises or falls through a specified level.

  1. Start execution ( on the Applications toolbar).

  2. Select Scope 1 and open the Properties pane ( on the Scopes toolbar).

  3. In the Scope 1 pane, click Triggering.

  4. Select Trigger Mode Signal.

    Settings Trigger Signal, Trigger Slope, and Trigger Level appear.

  5. Type the number displayed on the target computer screen for Signal Generator (here, 5) in the Trigger Signal text box.

  6. Set Trigger Slope to Rising.

  7. Leave Trigger Level as 0, indicating that the signal crosses 0 before Scope 1 triggers.

  8. Start Scope 1 ( on the toolbar).

    Signal data is displayed on the target computer monitor, with the rising pulse of Signal Generator just beyond the left side.

  9. Stop Scope 1 ( on the toolbar).

  10. Stop execution ( on the Applications toolbar).

Scope Triggering

In Trigger Mode Scope, the scope triggers when another scope triggers. In this example, Scope 2 triggers when signal-triggered Scope 1 triggers.

  1. Start execution ( on the Applications toolbar).

  2. Add scope Scope 2 ( on the Scopes toolbar).

  3. Open the Signals pane ( on the Applications toolbar).

  4. Add signal Integrator to Scope 2 in the Signals pane.

  5. In the Scope 2 pane, click Triggering.

  6. Select Trigger Mode Scope.

    Settings Trigger scope and Trigger scope sample appear.

  7. Set Trigger scope to 1. Press Enter. Scope 2 then triggers when Scope 1 triggers.

  8. Leave Trigger scope sample set to 0. Scope 2 triggers on the same sample as Scope 1.

  9. Explicitly start both Scope 1 and Scope 2 ( on the toolbar).

    Scope 1 and Scope 2 display signal data on the target computer monitor.

  10. Explicitly stop both Scope 1 and Scope 2 ( on the toolbar).

  11. Stop execution ( on the Applications toolbar).

Related Topics