> 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/smart-power-simulation-software-sps/blocks-functions-tools/control-and-measurements/pulse-and-signal-generators/stair-generator.md).

# Stair Generator

## Description

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-3a55fb5cc541c6630a8b540ef329e530db090671%2Fstair_generator_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Stair Generator** block, located in the **OPAL-RT SPS Software/Sources / Signal Generator Sources** library, generates a signal changing at specified transition times. Use the Stair Generator block to generate a logical signal to control the opening and closing of the Breaker block and the Ideal Switch block. You can also use the Stair Generator block to generate a signal whose amplitude changes by steps at specified transition times.

## Characteristics

<table data-header-hidden><thead><tr><th width="250.44439697265625"></th><th></th></tr></thead><tbody><tr><td>Sample Time</td><td>Specified in the <strong>Sample Time</strong> parameter Continuous if <strong>Sample Time</strong> = 0</td></tr><tr><td>Scalar Expansion</td><td>No</td></tr><tr><td>Dimensionalized</td><td>No</td></tr><tr><td>Zero-Crossing Detection</td><td>No</td></tr></tbody></table>

## Parameters

<table data-header-hidden><thead><tr><th width="249.55560302734375"></th><th></th></tr></thead><tbody><tr><td><strong>Time (s)</strong> — Transition times<br>[0, 1, 3, 3.5] (default) | vector of nonnegative scalars</td><td><p>Transition times, in seconds, when the output changes to the values specified in the <strong>Amplitude</strong> parameter.</p><p>The output is zero until the simulation reaches the first transition time.</p></td></tr><tr><td><strong>Amplitude</strong> — Amplitude sequence of output signal<br>[1, -1, 2.5, 0] (default) | vector of scalars</td><td><p>Specify the amplitude sequence of the output signal. The amplitude is constant between the transition times specified in the <strong>Time (s)</strong> parameter.</p><p>The amplitude of the output is 0 until the simulation reaches the first transition time.</p></td></tr><tr><td><strong>Sample time</strong> — Sample time of block<br>0 (default) | nonnegative scalar</td><td>Specify the sample time of the block, in seconds. Set to 0 to implement a continuous block.</td></tr></tbody></table>

## Examples

The power\_SignalGenerators example shows the use of the Stair Generator block.


---

# 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/smart-power-simulation-software-sps/blocks-functions-tools/control-and-measurements/pulse-and-signal-generators/stair-generator.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.
