> 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/hypersim/library-blocks-reference/network-switches-and-breakers/controlled-switch.md).

# Controlled Switch

## Description

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-9c0ac859bf6626a483b7b2fe067eadc34673cabc%2Fimage%20(449).png?alt=media" alt="" width="162"><figcaption></figcaption></figure>

The **Controlled Switch** block, located in the **Network Switches and Breakers** library, is an ideal switch controlled by an external command. The model turns the circuit ON or OFF based on the holding current, with an optional precision valve model that recalculates switching using the exact time between steps.

## Mask parameters

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-ebc9b1af46418234685e6b5029e748cd01b8c4ec%2Fimage%20(450).png?alt=media" alt="" width="498"><figcaption></figcaption></figure>

<table><thead><tr><th width="229.20001220703125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Precision Valve model</strong></td><td>Enable: Recalculation of the switch operation using the exact time between steps (in percentage of Ts) of the valve command. Disable: Precision valve model not used.</td></tr><tr><td><strong>Rsnubber</strong></td><td>Snubber resistance (Ohm), Valid values: {0, 1e12}.</td></tr><tr><td><strong>Csnubber</strong></td><td>Snubber capacitance (F), Valid values: {0, 1e12}.</td></tr><tr><td><strong>Imin</strong></td><td>Holding current (A), Valid values: {0, 1e12}.</td></tr><tr><td><strong>Ropen</strong></td><td>Switch open resistance (Ohm), Valid values: {0, 1e12}.</td></tr><tr><td><strong>Rclose</strong></td><td>Switch close resistance (Ohm), Valid values: {0, 1e12}.</td></tr><tr><td><strong>Control Type</strong></td><td>External (inputs) or External (sensors from hardware).</td></tr></tbody></table>

## Conserving ports

<table><thead><tr><th width="239.5999755859375">Port</th><th>Description</th></tr></thead><tbody><tr><td><strong>Net_1</strong></td><td>Network connection; the “+” indicates the current measurement direction (supports only 3-phase connections).</td></tr><tr><td><strong>Net_2</strong></td><td>Network connection (supports only 3-phase connections).</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="239.60003662109375">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>D</strong></td><td>Delay used by the precision valve model. Expressed as a fraction of the time step.</td></tr><tr><td><strong>P</strong></td><td>Binary-coded firing pulses. Bits 0, 1, 2: forward pulses of phases A, B, C. For single-phase, only phase A is used.</td></tr></tbody></table>

## Outputs

This block has no outputs.

## Signals available for monitoring and external I/O connections (via sensors form)

All block inputs and outputs are available as signals for monitoring and for external I/O connections.

Additional signals are also available and are listed below with their descriptions.

<table><thead><tr><th width="240.4000244140625">Signal</th><th>Description</th></tr></thead><tbody><tr><td><strong>DelayExt12</strong></td><td>Time delay through external signal (s)</td></tr><tr><td><strong>CmdExt12</strong></td><td>Command signal through external signal.</td></tr><tr><td><strong>State12</strong></td><td>Switch status.</td></tr><tr><td><strong>Cmd12</strong></td><td>Switch command.</td></tr><tr><td><strong>I (A)</strong></td><td>Switch current.</td></tr><tr><td><strong>Delay</strong></td><td>Switch delay (s)</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/hypersim/library-blocks-reference/network-switches-and-breakers/controlled-switch.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.
