> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/simulation-control-monitoring-and-logging/log-simulation-data-with-datalogger/log-simulation-data.md).

# Log Simulation Data

{% stepper %}
{% step %}

## Configure the Recorder parameters <a href="#step3choosesignalstolog" id="step3choosesignalstolog"></a>

1. In the **Project Explorer**, expand the **Recorders** section of your project to view the RECORDERS automatically created when the model was built. Recorders are automatically named using the model name combined with the subsystem block name (for example, `RECORDER_rtdemo1_sm_computation`). If a project contains multiple subsystems, each recorder is named after its respective subsystem. These names are system-generated and cannot be modified.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-2ecd48f6704923f3ab6d8177f476a8f8c8cb1ab0%2Fdatalogger-rtlab-recorders.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Double-click the RECORDER to configure its general parameters:

* **Recording Mode**
  * Automatic: Recording starts automatically based on the trigger configuration
  * Manual: Recording starts manually or via an API call
* **No Data Loss Mode:** Ensures no sample loss between acquisition frames (available only in non-real-time mode).
* **Configuration Mode:** Advanced mode provides additional debugging options.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-adbceb4b60f7e97190ef8e1d75c45ba0d25ca522%2Fdatalogger-rtlab-config.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Save

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-861f597245bd0acf4cb38bc67b029f75a1b705ec%2Fdatalogger-rtlab-save.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Create, remove, reorder or rename signal groups

Click the **Signal Groups** folder and use the **+** icon to add a new signal group, the **-** icon to remove an existing one, and the up and down **arrows** to reorder the groups according to your preferred sequence. Having multiple signal groups allows you to apply different sampling rates, triggers, and export settings to distinct sets of signals, making data logging more organized and flexible. To rename, click the signal group to rename in the general/signal groups section and type the new name. **Save your changes**.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-442fd81cc72b1d08aa54c1614f0243670f87b1a9%2Fdatalogger-rtlab-signal-groups.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Configure the signal groups parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-109a0276bff3e7b2ecefe44ce79dbac89a3232b1%2Fdatalogger-rtlab-parameters.png?alt=media" alt=""><figcaption></figcaption></figure>

Click the signal group you want to configure, adjust the following parameters, then **save your changes**:

* **Recording Mode**
  * Inherit: Uses the recording mode defined in the General tab
  * Automatic: Recording starts automatically based on the trigger configuration
  * Manual: Recording starts manually or via an API call
* **Export format:** OPREC (native format), CSV, or MAT.
* **Output file auto naming:** Auto or custom. The output file name must begin with an ASCII letter or digit and may include only ASCII letters, digits, hyphens (`-`), underscores (`_`), or periods (`.`).
* **Decimation factor:** Defines the logging frequency. For example, a value of 2 means data is recorded every second simulation step.
* **Frame length, frame length unit & number of frames to record:** These settings define how data is chunked during logging. Longer frames reduce data loss but create larger files; shorter frames make smaller chunks but risk gaps between frames. Choose the unit and number of frames based on how much data you need versus available storage. For critical signals, use longer frames; for large models or slower disks, use shorter frames.
* **Trigger settings:** These settings control when data logging begins, allowing you to capture specific events with precision. You can choose **Edge** triggers to start recording when a signal crosses a threshold or **Level** triggers to monitor sustained states above or below a set value. Combine these with **trigger polarity** and **trigger level** to define exact conditions, while adjusting **pre-trigger percentage** (relative to frame length) to include data before the event and **holdoff** (number of steps ignored after a record completes before re-arming trigger detection) to avoid immediate retriggering. The appropriate trigger signal will be selected later in the next step. **If no trigger signal is selected, the recording will start immediately**.
  {% endstep %}

{% step %}

## Select signals to log <a href="#step3choosesignalstolog" id="step3choosesignalstolog"></a>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-9e0136ea0509c147844925b3a42222fb26f109cc%2Fdatalogger-rtlab-signal-log.png?alt=media" alt=""><figcaption></figcaption></figure>

1. In RT-LAB **Project Explorer**, double-click the signal group you want to assign signals to. This opens the **Signal Group Signals List** in the bottom-right window.
2. In RT-LAB **Project Explorer**, expand the model down to the signal level (e.g., `sm_computation/Gain1/signal1`).
3. Select one or multiple signals by holding **CTRL** and **drag-and-drop** them into the **Signal List** window. Alternatively, right-click the signal and choose **Record**. If multiple signal groups exist, select the signal group in the dialog box.
4. In the **Signal List** window, you can manage individual signals by unchecking them in the **Save** column if they do not need to be recorded and re-checking them when required. Any signal in the list can also be designated as the **trigger signal**. The list displays each signal’s full path, its alias (if defined), and its dynamically updating value during simulation. When the simulation is running, these values update in real time; when the model is not running, they appear as question marks (`?`).
5. To remove a signal from the list, right-click the signal and select **Remove**.
   {% endstep %}

{% step %}

## Start recording <a href="#step6startrecording" id="step6startrecording"></a>

1. Load and execute the model.
2. In **Automatic mode**, recording starts automatically based on the trigger configuration. In **Manual mode**, right-click a signal group or recorder in the **Project Explorer** and select **Start recording** or **Stop recording**. Actions on a signal group apply only to that group, while actions on a recorder apply to all its signal groups in Manual mode.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-2a54d108a499ab8bf28c4b3fbd6253835bb05911%2Fdatalogger-rtlab-recording.png?alt=media" alt="" width="347"><figcaption></figcaption></figure>

3. During simulation, signal values in the **Signal List** update in real-time.
   {% endstep %}
   {% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/simulation-control-monitoring-and-logging/log-simulation-data-with-datalogger/log-simulation-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
