> 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/pe-add-on-opal-rt/system-definition-configuration/configure-the-circuit-model/waveforms.md).

# Waveforms

## Overview

Waveforms allow users to view selected simulation signals at **higher speeds and with better resolution** than that offered by custom device channels.

Custom device channels perform single-point acquisition, a non-buffered operation that occurs at the rate at which the Real-Time CPU runs. Waveforms, on the other hand, read and stream FPGA-generated data at rates faster than the Real-Time CPU.

In the **System Explorer** window configuration tree, expand the **Power Electronics Add-On (OPAL-RT Circuit)** custom device and select **Circuit >> Waveforms** to display this page.

## Parameter

<table><thead><tr><th width="262">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Sample Rate (S/s/channel)</strong></td><td>Sample rate of the data acquisition performed on the FPGA signals by the waveform engine. This <strong>Sample Rate</strong> is per channel, and applies to all the Waveform channels defined. See <strong>Waveform Data Transfer and Streaming Rate</strong> for more information.</td></tr><tr><td><strong>Maximum Achievable Sample Rate (S/s/channel)</strong></td><td>Maximum achievable sample rate of the data acquisition performed on the FPGA signals by the waveform engine. This upper limit is automatically calculated based on the capabilities of the FPGA design.</td></tr><tr><td><strong>Number of Active Channels</strong></td><td><p>Number of waveform channels being utilized at the FPGA level. This does <strong>NOT</strong> equate to the number waveform channels in the system definition.</p><p>To achieve the highest <em>Sample Rates</em>, it is recommended to:</p><ol start="1"><li>Minimize the number of measurements that are connected to waveforms in the Schematic Editor model</li><li>Select waveform channels in the Schematic Editor such that they are in ascending order avoiding gaps in the channel selections. For example, if three waveform channels are needed, connect the three measurements to Waveform 00, Waveform 01, and Waveform 02 (Number of Active Channels = 3). Avoid connecting the three measurements to Waveform 00, Waveform 03, Waveform 06 (Number of Active Channels = 7).</li></ol></td></tr><tr><td><strong>Block Size per Channel</strong></td><td><p>Size of reserved memory on the real-time controller to store the waveform data being transferred from the FPGA to the CPU.</p><p>The Block Size per Channel is automatically calculated as follows:</p></td></tr><tr><td><strong>Enable Advanced Settings?</strong></td><td><p>Enables the <em>Buffer Size Multiplier</em>, <em>Engine Loop Rate</em>, and <em>Engine Loop Rate Multiplier</em> parameter.</p><p>If it recommended to leave this checkbox disabled and use the default values. However, in some rare instances it may be useful to tune these parameters depending on the hardware platform being used.</p></td></tr><tr><td><strong>Buffer Size Multiplier</strong></td><td><p>Multiplier factor that is used to reserve memory on the real-time controller to store the waveform data being transferred from the FPGA to the CPU. In most situations leaving this setting to its default value is recommended.</p><p>The buffer size is calculated as follows:</p></td></tr><tr><td><strong>Engine Loop Rate (s)</strong></td><td>Execution rate of the loop that consumes and processes the waveform data being transferred from the FPGA to the real-time controller.</td></tr><tr><td><strong>Engine Loop Rate Multiplier</strong></td><td>Multiplier factor applied to the <em>Engine Loop Rate</em>. Forces the engine to execute faster then needed to ensure the DMA transfer from the FPGA does not overflow the memory. In most situations leaving this setting to its default value is recommended.</td></tr></tbody></table>

## Waveforms section channels

The Waveforms section of the Configuration Tree is populated with a list of Waveform channels corresponding to each **Waveform connected to a measurement** in the Schematic Editor. Use these tree items to display the mapped signals in Waveform Graphs in the VeriStand Workspace, or in charts in the VeriStand Editor. More information about this process can be found in the page [**Display Simulated Signals using Waveforms**](https://www.opal-rt.com/docs/pe-add-on-opal-rt/simulation-control-monitoring-and-logging/display-simulated-signals-using-waveforms.md).

To connect a measurement from the circuit to a given waveform channel, select any measurement and enable the **Waveform** **destination**.

<figure><img src="https://1300141755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCyfrFRdgX5VC5iwM13Zm%2Fuploads%2F544CRBoYbHKvJbn8SDTX%2Fimage.png?alt=media&amp;token=fd767dc4-da54-4541-a693-94c43ed7fb32" alt="" width="480"><figcaption></figcaption></figure>

## Waveform Data Transfer and Streaming Rate

As the simulation executes, data generated on the FPGA is sampled by the waveform engine at the user-specified **Sample Rate**, then streamed to one or more of the Waveform channels (typically up to a maximum of 32 channels) on the real time CPU.

Each individual channel is sampled at the full **Sample Rate**. Because the FPGA executes much faster than the acquisition rate of the waveform engine, the data is first decimated on the FPGA and subsequently stored in an FPGA FIFO. The values stored in the FIFO are transferred over the PXI backplane to a real time buffer on the CPU, then to the VeriStand Waveform channels. All data transfer occurring after the FPGA decimation is lossless.

<figure><img src="https://1300141755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCyfrFRdgX5VC5iwM13Zm%2Fuploads%2F8ePPvzCpWvq068HcNb8k%2Fimage.png?alt=media&amp;token=cc2533d5-fb24-42f1-b94f-ecfbf6bc3596" alt=""><figcaption></figcaption></figure>

The maximum achievable Waveform **Sample Rate** is dependent upon the characteristics of the system, although rates of up to **3,125,000 Samples/second** with 32 active waveform channels have been achieved in all supported versions of VeriStand. The number of configured Waveforms affects the maximum achievable **Sample Rate**. The table below details best case scenario.

| Number of Channels | Sample Rate (Samples/second) |
| ------------------ | ---------------------------- |
| 1                  | 100,000,000                  |
| 8                  | 12,500,000                   |
| 16                 | 6,250,000                    |
| 32                 | 3,125,000                    |


---

# 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/pe-add-on-opal-rt/system-definition-configuration/configure-the-circuit-model/waveforms.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.
