> 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/gates.md).

# Gates

## Overview

In the **System Explorer** window configuration tree, expand the **Power Electronics Add-On (OPAL-RT Circuit)** custom device and select **Circuit >> Gates** to display this page. After a model is successfully loaded in the **Circuit Section**, this page is added to the configuration tree and populated with a named list of the **Gates** blocks found in the circuit model. An incoming digital signal must be mapped to each switch to control its state as it is simulated in the **eHS solver**.

Gates accept gating control signals. They are controlled with digital signals (i.e. HIGH, LOW signals) which can come from custom device channels, digital inputs, signal generators, and more. Switches modeled in eHS are characterized by their Switch Conductance (Gs). Refer to the [**Switches** ](https://github.com/Opal-RT-Technologies/product-docs-ni-opal-rt-circuit/tree/main/library-blocks-reference/switches-blocks/README.md)documentation for all supported gate components.

<figure><img src="https://1300141755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCyfrFRdgX5VC5iwM13Zm%2Fuploads%2FHxQZ7KBWx6SqcSEYYjFh%2Fimage.png?alt=media&amp;token=aae4e54a-a734-472c-bb04-96e27b20fe56" alt=""><figcaption></figcaption></figure>

### Gates channels <a href="#gates-section-channels" id="gates-section-channels"></a>

After a model has been loaded in the **Circuit Section**, the Gates section of the Configuration Tree is populated with a list of channels corresponding to each gate component found in the circuit model that has the Comes from VeriStand Channel option selected. Switches connected to a Digital Input will not appear as a VeriStand channel in the system definition tree.

<figure><img src="https://1300141755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCyfrFRdgX5VC5iwM13Zm%2Fuploads%2FOmS9guvkdQDOD4may6Xi%2Fimage.png?alt=media&amp;token=9c6bc8f4-8fc3-4cab-beb1-2daf5ec3d40b" alt="" width="480"><figcaption></figcaption></figure>

If a gate is mapped to the **CPU (VeriStand)** Group described in the **Gates Configuration Page** section, then the value of its corresponding channel defines the state of the gate during the simulation. If the **CPU (VeriStand)** Group is not used, then the value of the channel does not affect the circuit simulation.

## Parameters

<figure><img src="https://1300141755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCyfrFRdgX5VC5iwM13Zm%2Fuploads%2FknGmnjaY5z2gVLKV7KRD%2Fimage.png?alt=media&amp;token=eee53572-f1a7-4082-9e09-7aad95912e25" alt="" width="563"><figcaption></figcaption></figure>

For each switch, the following information and mapping options are available at edit-time.

<table><thead><tr><th width="218.4444580078125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Displays the name of the Gate. Refer to the <strong>Switches</strong> documentation for all supported gate components.</td></tr><tr><td><strong>Source</strong></td><td>Filters the list of available elements to be mapped to the Gate. The available options are defined by the selected <strong>Hardware Configuration</strong>, however it is typical to see the following options by default:<br><strong>CPU (VeriStand):</strong> VeriStand custom device channels on the CPU. If this Group is selected, the <strong>Element</strong> dropdown is populated with a single option displaying the name of the custom device channel whose value is mapped.<br><strong>PWMs:</strong> PWM outputs of the <strong>PWM Generators Section</strong>. In the Element dropdown, select the index of the PWM Generator whose output signal to map.</td></tr><tr><td><strong>Element</strong></td><td>The name or index of the signal to be mapped to the switch. The options available in this dropdown depend on the selected <strong>Source</strong>.</td></tr><tr><td><strong>Polarity</strong></td><td>The polarity of the switch component. Active High switches are open when LOW is applied to the gate and closed when HIGH is applied to the gate. Active Low switches are closed when LOW is applied to the gate and open when HIGH is applied to the gate</td></tr></tbody></table>


---

# 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/gates.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.
