> 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/rt-lab/simulink-blocks-reference/rt-lab-i-o-library/datain-send.md).

# DataIn Send

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-39973489362f7a27fc633d96bc508acc1cc45ecc%2F7b8ed937-0dbd-444b-b9ab-babf3d80f36e.jpg?alt=media" alt=""><figcaption></figcaption></figure>

The **DataIn Send** block, located in the **RT-LAB I/O/Opal-RT/Common** library, sends raw data at every simulation time step **directly to the FPGA**, bypassing standard I/O unpacking blocks. Data is transferred through the FPGA **DataIN ports** and is intended for use cases where the bitstream logic directly consumes raw data words. Each DataIN port supports up to **250 32‑bit data words**, enabling high‑bandwidth data transmission from the model to the FPGA logic implemented on the board.

Correct use of this functionality requires a clear understanding of the **bitstream logic** that processes the transmitted data. An incorrect data frame configuration may result in **invalid or undefined FPGA behavior**. Refer to the **System Description Document** for details on the bitstream implementation.

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-571510b8c508d00c9b29b573ac60c239bf9d78a3%2F65a50933-8be4-4555-bb7d-98957ccc10a2.png?alt=media" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="194.333251953125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Controller Name</strong></td><td>Specifies the <strong>OpCtrl</strong> block this block is bound to. Enter the same <strong>Controller Name</strong> as defined in the corresponding <strong>OpCtrl</strong> block.</td></tr><tr><td><strong>DataIn port number</strong></td><td>Specifies which DataIn port this block uses to send raw data words. Configure the <strong>DataIn port number</strong> according to your <strong>System Description Document</strong> or <code>.conf</code> file.</td></tr><tr><td><strong>Data inport width</strong></td><td>Specifies the maximum number of data words that will be sent to the FPGA at each calculation step.</td></tr><tr><td><strong>Data inport type</strong></td><td><p>Selects the data type of the DataIn Send input port. Available options are <strong>uint32</strong> and <strong>double</strong>.</p><p>When <strong>double</strong> is selected, the driver <strong>typecasts values from double to uint32</strong> before transmission. As a result, input values are limited to the valid range <strong>0 ≤ x ≤ 2³² − 1</strong>.</p><p>Selecting <strong>uint32</strong> avoids typecasting and provides <strong>optimal performance</strong>.</p></td></tr><tr><td><strong>Check application version</strong></td><td><em>This parameter is not used and should be left <strong>unchecked</strong>.</em></td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="137.5">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Data</strong></td><td>Inputs data to be sent to the FPGA at each calculation step. No scaling or formatting is applied. If the <strong>Data inport type</strong> parameter is set to <strong>double</strong>, values are <strong>typecast from double to uint32</strong> before being transmitted.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="148.6666259765625">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Status</strong></td><td><p>Outputs the block status:</p><ul><li><code>0</code>: No error.</li><li><code>-1</code>: Block not associated with an <strong>OpCtrl</strong> block (check the <strong>Controller Name</strong> parameter), or FPGA initialization failure.</li><li><code>-2</code>: Internal memory initialization failure.</li></ul></td></tr></tbody></table>

## Characteristics and limitations

| Characteristic           | Value     |
| ------------------------ | --------- |
| **Direct Feedthrough**   | No        |
| **Discrete sample time** | Inherited |
| **XHP support**          | Yes       |
| **Work offline**         | No        |


---

# 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/rt-lab/simulink-blocks-reference/rt-lab-i-o-library/datain-send.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.
