Step 4: How to Perform a Triggered Recording

Objective

You can define triggers for a recording, which means that you start and stop a recording according to defined start and stop conditions.

In this step you will define and perform a triggered recording. Then you will open the resulting measurement data file in the Measurement Data Pool.


Triggered measurement vs. triggered recording

The triggers for triggered recordings differ from those used for triggered measurements.

Triggered Measurement

Triggered Recording

Purpose

To trigger data captures on dSPACE platforms

To trigger recordings of data captures that have been uploaded from platforms/devices

Trigger Evaluation

On the dSPACE hardware during a running measurement

On the host PC after the data is captured

Focus

Determines which data is actually transferred from the hardware to the host PC.

Determines which data is stored in a measurement data file.


Video

Watch the video or follow the written instructions below.


Method: To perform a triggered recording

  1. In the Measurement Configuration pane, right-click Recorder 2 and select Properties.

    The Properties pane opens, displaying the properties of Recorder 2.

    Tip

    Click the pin button to toggle the pane's auto hide function.

  2. Activate Start condition – Use start trigger.

  3. Click the Browse button in the Trigger rule edit field.

    The Edit Trigger Rules dialog opens.

  4. In the dialog, click Add and configure Trigger Rule 1 via the Custom condition edit fields.

    Recording has to start when the SignalAmplitude/SG[0].amplitude parameter is equal to or greater than 60.

    To specify this, click the Browse button next to the left edit field and select the ModelRoot/SignalGenerator/SignalGenerator/SignalAmplitude/SG[0].amplitude parameter. Then select >= in the middle and enter 60 in the right edit field. Finally, click the Add button below the right edit field.

    The table below the Add button displays the condition created for Trigger Rule 1.

  5. Click OK to close the dialog.

    In the Properties pane, Trigger Rule 1 is now active as a start condition.

  6. Click Stop condition – Type and select Time limit.

  7. In the Time limit edit field, enter 5 to limit the recording time to 5 seconds.

  8. On the Layouting ribbon, click Layouts - Insert Layout.

    ControlDesk opens a new empty layout in the working area.

  9. Click Variables to open the Variables pane, and select the Model Root/Signal Generator/Signal Generator/SignalAmplitude node in the group view.

  10. In the variable list, select the following parameter and drag it onto Layout3 to place it in a Variable Array:

    • SG[0].amplitude

  11. In the Measurement Configuration pane, select Recorder 2 and click in its toolbar.

    • The toolbar turns yellow.

    • Waiting for trigger is displayed.

    • The recording does not start until you set SignalAmplitude/SG[0].amplitude to a value >= 60.

  12. In the Variable Array, set SignalAmplitude/SG[0].amplitude to 60.

    • The toolbar turns red when the recording starts.

    • A progress bar within the toolbar displays the recording time.

    • The recording stops after 5 seconds.

  13. In the Project pane, click the Measurement Data folder.

    The rec2_003.mf4 file is added to the measurement files. It is grayed out, because it has not been opened in the Measurement Data Pool.

  14. Right-click rec2_003.mf4 and select Open to open the new measurement data file in the Measurement Data Pool.

  15. Drag the three variables from rec2_003.mf4 in the Measurement Data Pool onto the new layout to place them in a Time Plotter.

    In the Time Plotter, you can see that recording has been stopped after 5 seconds, which matches your trigger settings for Recorder 2.

    Tip

    On your screen, the signals in the Time Plotter may look different to the illustration above because you have different settings for the time axis of the Time Plotter. You can adjust the settings via the Time Plotter properties.

    In the Time Plotter, click the x-axis and open the Properties pane. Set X-Axis - Length to 1.


Result

You performed a triggered recording, and created another measurement data file and opened it in the Measurement Data Pool.


What’s next

In the next step you partition long-term recordings.


Redaction