# Data Read Global

This function block reads a value stored in the global data storage of the current scenario. Use it to retrieve data that was written by other parts of the scenario or by other blocks running in different scopes.

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

This function block does not have any input sockets.

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

`Generic` This output returns the value retrieved from the global storage for the provided key. If the key cannot be found, a fallback value is returned and a warning is produced.

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

`Key` Enter the name of the global storage entry you want to read.

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

* Global access: Read values that are shared across the entire scenario.
* Loop-friendly: Useful when different execution branches or loops need to share information.
* Safe feedback: If the requested key is missing, the block provides a warning and returns a fallback value to keep the flow running.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. Set the desired key in the `Key` control.
2. Use the `Generic` output to feed the retrieved value into other blocks.
3. Combine with blocks that write to global storage to exchange data between different parts of your scenario.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

When executed, the block looks up the entered key in the global storage and outputs the corresponding value. If the key is not present, a fallback is returned and a warning is logged.

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

* Use `Data Write Global` to store values that other blocks should read with this block.
* Use `Data Read Local` / `Data Write Local` when you want scoped storage for loops or subsystems instead of global sharing.
* Use `Is None` or `Debug Input` after the `Generic` output to validate or inspect returned values when keys may be missing.
* Use `Data Memory` to freeze or gate values if you need the read value to remain stable until explicitly updated.
* Combine with `CSV Export` or `Image Logger` to persist read values alongside logged images or exported data for traceability.

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

* If you see a warning about a missing key: verify the exact key name (case-sensitive) and ensure some block has previously written that key to global storage.
* If the returned value is unexpected: use `Debug Input` to log or inspect the value, and confirm the writing block used the intended key and value format.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.augelab.com/function-blocks/data-logic/referencing/data-read-global.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
