> 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-library/opasyncsend.md).

# OpAsyncSend

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-242cc7d21eba367b781f6a42b2b342d7b3f97473%2FRTL_opasynch_send_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **OpAsyncSend** block, located in the **RT-LAB/Communication/Asynchronous** library, sends data from the model to the asynchronous application started by the associated controller. The block writes the input data into shared memory, which the asynchronous program can access using AsyncAPI calls. For more information, refer to the RT-LAB Connectivity chapter, section RT-LAB Asynchronous process, in the User Guide.

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-0ce2ff627a1758f9eac6d477be3ebb335401466a%2FRTL_opasynch_send_mask.png?alt=media" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="270.3636474609375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Controller ID</strong></td><td>Specifies the controller ID used by the OpAsyncSend block.</td></tr><tr><td><strong>Send ID</strong></td><td>Specifies the ID of this block. The asynchronous program uses this ID as an identifier.</td></tr><tr><td><strong>Sending mode</strong></td><td><p>Defines the interaction between the asynchronous program and this block.</p><ul><li><strong>NEED_REPLY_BEFORE_NEXT_SEND</strong>: The block requires confirmation that the data was sent, but only before the next send request. Confirmation is provided by the asynchronous program using the OpalAsyncSendRequestDone() function.</li><li><strong>NEED_REPLY_NOW</strong>: The block requires immediate confirmation that the data was sent. The model stops until the asynchronous program confirms the send using the OpalAsyncSendRequestDone() function.</li><li><strong>DONT_NEED_REPLY</strong>: No confirmation is required.</li></ul></td></tr><tr><td><strong>Display parameters list</strong></td><td>Shows or hides the parameters described below.</td></tr><tr><td><strong>Float parameter 1 .. 5</strong></td><td><p>Values entered in these fields are available to the asynchronous application by calling the OpalGetAsyncSendParameters function. The five values are stored in the FloatParam array of the Opal_SendAsyncParam structure.</p><p><em>EX:Opal_SendAsyncParam Param;</em><br><em>int SendID=1;</em><br><em>OpalGetAsyncSendParameters(&#x26;Param,sizeof(Opal_SendAsyncParam), SendID);</em><br><em>printf("The 1st floating point parameter is %f\n",Param.FloatParam[0]);</em></p></td></tr><tr><td><strong>String parameter 1 .. 5</strong></td><td><p>Text entered in these fields is available to the asynchronous application by calling the OpalGetAsyncSendParameters function. The five strings are stored in the StringParam array of the Opal_SendAsyncParam structure.</p><p><em>EX: Opal_SendAsyncParam Param;</em><br><em>int SendID=1;</em><br><em>OpalGetAsyncSendParameters(&#x26;Param,sizeof(Opal_SendAsyncParam), SendID);</em><br><em>printf("The first string parameter is %s\n",Param.StringParam[0]);</em></p></td></tr></tbody></table>

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

<table><thead><tr><th width="157.63641357421875">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Data ready</strong></td><td>When this input is 1, the block writes the Data input to shared memory.</td></tr><tr><td><strong>Data</strong></td><td>Data to copy into shared memory. You can use a mux to send multiple values. Data is written when Data ready is asserted.</td></tr></tbody></table>

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

| Output    | Description                                                                                             |
| --------- | ------------------------------------------------------------------------------------------------------- |
| **Error** | Outputs error values set by the user's asynchronous program via the OpalSetAsyncSendIconError function. |

## Characteristics and limitations <a href="#characteristics-and-limitations" id="characteristics-and-limitations"></a>

| Characteristic       | Value                  |
| -------------------- | ---------------------- |
| Direct Feedthrough   | N/A                    |
| Discrete sample time | No                     |
| XHP support          | Yes (Partial XHP only) |
| 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-library/opasyncsend.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.
