> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/function-blocks/blocks-reference/data-logic/flow-control/subsystem-in.md).

# Subsystem In

This block is used to import a value from a parent scenario into a subsystem (a nested scene) and make it available to blocks inside that subsystem. It acts as a numbered input port for the subsystem and automatically synchronizes with the parent scenario's inputs.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

This block does not declare any direct inputs (it receives data from the parent scenario rather than from local sockets).

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Generic` This output provides the value supplied from the parent scenario. Inside the subsystem, connect this output to any blocks that need the parent-provided data.

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Title` The block displays a number that identifies its position among the subsystem inputs (e.g., 1, 2, 3).\
`Scene Index` Each block is assigned a scene index that determines which parent input it maps to. The displayed title reflects this index.

Note: The numbering is managed automatically. When you add, remove, or reorder subsystem input blocks, their displayed numbers update to match their order.

## ⚙️ Running mechanism <a href="#running-mechanism" id="running-mechanism"></a>

* When the subsystem runs, each `Subsystem In` block provides the value coming from the matching input of the parent scenario.
* In the main (parent) scenario, the corresponding parent input supplies the data that flows into the subsystem input.
* The block keeps its mapping in sync with the parent scenario so the subsystem receives the correct input even if inputs are added or reordered in the parent.
* The block supports being used in test or memory-backed contexts (the system adapts behavior depending on whether the subsystem is run standalone or embedded).

## 🎯 Features <a href="#features" id="features"></a>

* Automatic numbering and index mapping so subsystem inputs are easy to identify.
* Dynamic synchronization with parent inputs — socket types and order follow the parent scenario automatically.
* Works seamlessly with enabled/disabled subsystem modes (when you use the subsystem enabling mechanism, input behavior adapts accordingly).
* Designed to be lightweight and non-resizable for a compact flow-control layout.

## 📝 How to use <a href="#usage" id="usage"></a>

1. Place a subsystem and open its child scene.
2. Add one or more `Subsystem In` blocks inside the child scene. Each will appear with a number (1, 2, ...) that indicates which parent input it maps to.
3. In the parent scenario, provide data to the corresponding subsystem input sockets. That data will become available from the `Generic` output inside the subsystem.
4. Inside the subsystem, connect the `Generic` output to other blocks that need the parent-supplied value.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* Use together with `Subsystem Out` to return results from the subsystem back to the parent scenario.
* Combine with `Subsystem Enabled` when you need conditional or toggleable subsystem execution; the input behavior adapts when the subsystem is enabled/disabled.
* If you want to persist or freeze an input value inside the subsystem, pair the `Generic` output with `Data Memory` to hold the value across runs.
* For debugging or to inspect what the parent is sending into the subsystem, feed the `Generic` output into `Debug Input` or display it with appropriate viewer/output blocks.
* To pass configuration values (numbers, text, or booleans) from the parent, use parent-side blocks like `Number Input`, `String Input`, or `Logic Input` and map them via the corresponding `Subsystem In` inside the child scene.

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* If a `Subsystem In` block shows an unexpected number, try adding or removing other subsystem inputs; numbering updates automatically.
* If the subsystem does not receive values, ensure the parent scenario provides data on the matching input socket and that the subsystem is properly added to the parent.
* If socket types need to change, the system will synchronize child ports to match the parent — reconnect flows after major changes to confirm correct behavior.
