> 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/rescale-to-double-format.md).

# Rescale to double format

## Description

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

The **Rescale to double format** block, located in the **RT-LAB/Miscellaneous** library, converts and rescales a fixed‑point signal from the FPGA domain into a double‑precision value usable in the Simulink model.

The input is an integer signal encoding a signed or unsigned fixed‑point value, and the output is a **double** signal. The scaling is defined by the total number of bits and the number of fractional bits.

## Mask parameters

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

<table><thead><tr><th width="235.25">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Type of numerical format</strong></td><td>Specifies whether the fixed‑point signal is <strong>Signed</strong> or <strong>Unsigned</strong>.</td></tr><tr><td><strong>Total number of bits</strong></td><td>Defines the total bit width of the fixed‑point representation.</td></tr><tr><td><strong>Number of fractional bits</strong></td><td>Specifies the number of bits to the right of the binary point. This parameter determines the signal resolution.</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="147.75">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>INT</strong></td><td>Input signal in fixed‑point format, represented as a <strong>uint32</strong> value. The effective data corresponds to the least significant bits (LSBs), with the width defined by the <strong>Total number of bits</strong> parameter.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="152.75">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>DBL</strong></td><td>Output signal in <strong>double‑precision</strong> format for use in the Simulink model.</td></tr></tbody></table>

## Characteristics and limitations

| Characteristic           | Value   |
| ------------------------ | ------- |
| **Maximum bit width**    | 32 bits |
| **Direct feedthrough**   | No      |
| **Discrete sample time** | Yes     |
| **XHP support**          | No      |
| **Work offline**         | Yes     |


---

# 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/rescale-to-double-format.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.
