> 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/ehs/3.7/model-in-sps-rt-lab-only/configure-the-ehs-circuit-interfaces/configure-source-inputs.md).

# Configure Source Inputs

## Interface source blocks

**Source** blocks operate using external inputs. To select the external input source:

1. Double-click the **eHS CPU Block** to open it's mask.
2. Navigate to the **Inputs** tab.

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-6cdac3a6ba1fb0426f7eb8a5f82bb8c6923264ae%2Fimage%20(16).png?alt=media" alt=""><figcaption></figcaption></figure>

3. Click the **Configure Inputs** button.
4. For each source, define the external signal that drives its gate:
   * Set **Input Source** to **CPU Model** for standard firmware (or to the appropriate user-defined source for custom firmware). Then set the **Index**. The **Index** specifies the position of the signal within the vector connected to the **Inputs** port of the **eHS CPU Block**.
   * Set the source **Input Source** to **Analog Input** (or to the appropriate user-defined source for custom firmware) to drive the source from a physical Analog Input module channel. Then set the **Index**. The **Index** identifies the analog input channel. **Index 1** corresponds to the first channel (**channel 00**), **Index 2** to the second channel (**channel 01**), and so on.
   * Set the source **Input Source** to **Sine Wave Generator** (or to the appropriate user-defined source for custom firmware) to drive the source from internal Sine Wave generators embedded in the FPGA firmware. When one or more sources are configured this way, the **eHS CPU Block** exposes four additional input ports: **Sine Wave Frequencies**, **Sine Wave Amplitudes**, **Sine Wave Phases**, and **Sine Wave Offsets**. These ports are used to define the characteristics of each generated sine wave. The **Index** specifies which sine wave generator is associated with the source and corresponds to the position of the frequency, amplitude, phase, and offset values within the vectors connected to these input ports. Multiple sources can use different generators by assigning different indexes.
   * The selected firmware may provide additional input sources, such as **PMSM**, **Generic Machine**, **SFP**, etc. Refer to the **firmware documentation** or **RT-XSG model**.

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-ffe5fc3ba3a4573ec5422ee620b035e106df1839%2Fimage%20(19).png?alt=media" alt=""><figcaption></figcaption></figure>

3. For each switch, define the **Gate Polarity:**

* **HIGH**: The gate signal is active when the digital input is **high**.
* **LOW**: The gate signal is active when the digital input is **low**.

{% hint style="info" %}
Multiple switches can be assigned to the same **Index**. When doing so, ensure that the polarity of each gate signal is configured appropriately.
{% endhint %}


---

# 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/ehs/3.7/model-in-sps-rt-lab-only/configure-the-ehs-circuit-interfaces/configure-source-inputs.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.
