> 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/configure-ios/analog-digital-and-sfp-ios/opal-rt-board-workflow/digital-and-encoder-configuration.md).

# Digital & Encoder Configuration

This page describes the **OPAL‑RT Board** configuration for **digital** sections, which define how physical digital I/O modules are connected to and used by the simulation. Available options and behaviors depend on the installed hardware and the **supplied** **bitstream**.

## Digital out I/O section

In the **Folders** list, click **SlotXX - Digital out** to view its read-only parameters. Then, click **Channels 0–7**, **Channels 8–15**, **Channels 16–23**, or **Channels 24–31** to configure the corresponding subsection.

### Static, PWM and Event generator subsection

Digital output subsections are typically configured in the bitstream to give the user the flexibility to select one of the following signal types: **static** digital signals, **pulse‑width modulated** (PWM) signals, or **event generator** (time‑stamped / event‑based) signals.

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

{% tabs %}
{% tab title="Static" %}
The following parameters apply when the **Digital type** is set to **Static**.

<table><thead><tr><th width="150">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td><p><strong>Checked:</strong> Exposes the <strong>Channels x–x (Static)</strong> vector connectable points for the selected subsection. This channel vector can then be connected to the model and used to transmit signals <strong>from the model</strong> during execution.</p><p><strong>Unchecked:</strong> Static digital transmission is disabled, and no connection points are exposed.</p></td></tr><tr><td><strong>Digital type</strong></td><td><strong>Static</strong>: Generates static digital signals from <code>0</code> or <code>1</code> values.</td></tr></tbody></table>
{% endtab %}

{% tab title="Pulse width modulated" %}
The following parameters apply when the **Digital type** is set to **Pulse width modulated**.

<table><thead><tr><th width="150">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td><strong>Checked:</strong> Exposes the <strong>Frequency</strong> and <strong>Duty cycle</strong> connectable points for each channel in the selected subsection. These connectable points can then be connected to the model and used to control the PWM frequencies and duty cycles <strong>from the model</strong> during execution.<br><strong>Unchecked:</strong> PWM transmission is disabled and no connectable points are exposed.</td></tr><tr><td><strong>Digital type</strong></td><td><strong>Pulse width modulated</strong>: Generates PWM signals from frequency (Hz) and duty cycle (<code>0</code> to <code>1</code>) values.</td></tr><tr><td><strong>Output complementary</strong></td><td><p><strong>Checked:</strong> Generates a complementary PWM signal on every adjacent channel pair. As a result, the number of user‑configurable channels is divided by two. Channels 1, 3, 5, and 7 (numbering starting from 0) appear grayed out and are used to output complementary signals.<br><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-d1186ea87660ff2d07ba89246c8d48b2acfa5246%2FRTLIO_pwm_out_signal.png?alt=media" alt=""><br>The two following parameters can be configured:</p><ul><li><strong>Enable RT dead time control:</strong> When <strong>checked</strong>, the <strong>Dynamic dead time</strong> connectable point is exposed for each channel in the selected subsection. This connectable point can then be connected to the model and used to adjust the dead-time <strong>from the model</strong> during execution.<br>When <strong>unchecked</strong>, the dead time is fixed and defined only by the <strong>Dead Time</strong> configuration parameter.</li><li><strong>Dead time:</strong> Specifies the amount of time (in µs) during which both complementary signals remain inactive, reducing the effective duty cycle of both outputs. Accepted values: floating‑point numbers between <strong>0.00 and 10.23 µs</strong>.<br>When <strong>Polarity</strong> is set to <strong>Active high</strong>, low voltage is output during the dead time. When set to <strong>Active low</strong>, high voltage is output during the dead time.<br><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-e8893b4df59c494d79810cd72c72090c02fce92a%2FRTLIO_pwm_out_dead_time.png?alt=media" alt=""></li></ul><p><strong>Unchecked:</strong> No complementary signals are generated.</p></td></tr><tr><td><strong>Enable RT phase shift control</strong></td><td><strong>Checked:</strong> Exposes the <strong>Dynamic phase shift</strong> connectable point for each channel in the selected subsection. This connectable point can then be connected to the model and used to control the real‑time phase <strong>from the model</strong> during execution.<br><strong>Unchecked:</strong> Phase is fixed and defined only by the <strong>Initial Phase</strong> parameter in the configuration.</td></tr><tr><td><strong>Allow disabling channel</strong></td><td><strong>Checked:</strong> Exposes the <strong>Disable</strong> connectable point for each channel in the selected subsection. This connectable point can then be connected to the model and used to disable or enable the channel <strong>from the model</strong> during execution. If <strong>Output complementary</strong> is <strong>checked</strong>, the disable control applies to both the channel and its complementary output.<br><strong>Unchecked:</strong> Channels cannot be disabled dynamically.</td></tr><tr><td><strong>Polarity</strong></td><td>Specifies the polarity of each PWM signal:<br><strong>Active high:</strong> High voltage during the active portion of the duty cycle.<br><strong>Active low:</strong> Low voltage during the active portion of the duty cycle.<br>This setting affects complementary signal behavior when <strong>Output complementary</strong> is <strong>checked</strong> and <strong>Dead Time</strong> is non‑zero.</td></tr><tr><td><strong>Wave mode</strong></td><td>Specifies the carrier waveform used by each PWM signal to generate pulse‑width‑modulated outputs:<br><strong>Symmetric:</strong> Triangular carrier waveform. The active phase is centered within the period.<br><strong>Asymmetric:</strong> Sawtooth carrier waveform. The rising edge of the active phase is aligned with the start of the period.<br><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-3b4d1263cdfa403afce0618c605001865c52ab80%2FDR-opalboard-pwm-wave-mode.png?alt=media" alt=""></td></tr><tr><td><strong>Initial phase</strong></td><td>Specifies the phase offset between each PWM signal and the carrier waveform. Expressed as a <strong>fraction of the signal period</strong>. Accepted values: floating‑point numbers between <strong>0 and 1</strong>.<br>Example: For a 10 kHz signal (100 µs period), an initial phase of 0.1 delays the rising edge by 10 µs.</td></tr></tbody></table>
{% endtab %}

{% tab title=" Event generator" %}
The following parameters apply when the **Digital type** is set to **Event generator**.

<table><thead><tr><th width="150">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td><strong>Checked:</strong> Exposes the <strong>Events</strong> and <strong>Timestamps</strong> connectable points for each channel in the selected subsection. These connectable points can then be connected to the model and used to control the PWM transitions <strong>from the model</strong> during execution. Transitions must be defined <strong>in chronological order</strong>. The first vector element corresponds to the first transition occurring during the next calculation step, the second element to the second transition, and so on.<br><strong>Unchecked:</strong> Transmission is disabled and no connectable points are exposed.</td></tr><tr><td><strong>Digital type</strong></td><td><p><strong>Event generator</strong>: Generates time-stamped output signals from events and timestamps values.</p><p>Events input:</p><ul><li><code>1</code>: Rising‑edge transition requested</li><li><code>0</code>: Falling‑edge transition requested</li><li><code>−1</code>: No transition</li></ul><p>Timestamps input: depends on the <strong>Time unit</strong> parameter.</p></td></tr><tr><td><strong>Time unit</strong></td><td><p>Specifies how transition timestamps are interpreted:</p><ul><li><strong>Ratio</strong>: Transition time is expressed as a ratio of the simulation time‑step (<code>0</code> to <code>1</code>). <code>1</code> means no transition.</li><li><strong>Second</strong>: Transition time is expressed as a delay (in seconds) from the beginning of the calculation step. <code>Ts</code> means no transition.</li></ul></td></tr><tr><td><strong>Number of events</strong></td><td>Specifies the number of generated transitions per channel per calculation step. This parameter defines the width of the <strong>Events</strong> and <strong>Timestamps</strong> input vectors. The maximum number of transitions per channel is <strong>250</strong>. The maximum number of generated events per subgroup of 8 channels is also <strong>250</strong>. Multiple channels can share the same event if transitions occur at the same time, reducing the total number of generated events.<br>A higher number of generated events increases both processing time and the amount of data exchanged between the digital output module and the CPU.</td></tr></tbody></table>

The **Event generator** also exposes a single, global **Status** connectable point that applies to all channels within the subsection. This connectable point can then be connected to the model to input and monitor the status **in the model** during execution. A value of `0` indicates normal operation with no errors, while a value of `−2` indicates that more than 250 events were required to accommodate the number of transition requests for the current subgroup of 8 channels.
{% endtab %}
{% endtabs %}

### PWM synchronize Ain (RCP) subsection

A digital output subsection may be configured in the bitstream to operate in **PWM synchronize Ain** mode. In this mode, it provides the same parameters and functionalities as a standard PWM out subsection, with the addition that its generated PWM signals can be used to synchronize analog input acquisition on a specific analog input subsection. The availability of this mode depends entirely on the bitstream supplied with the system.

### Encoder out subsection

A digital output subsection may be configured in the bitstream to operate in **Encoder Out** mode, in which case it is dedicated exclusively to quadrature encoder signal generation. In this mode, the physical modules generate **A, B, and Z** signals based on the angular rate provided by the simulation. The availability of this mode depends entirely on the bitstream supplied with the system. Refer to the **System Description Document** provided with your order for connector pin assignments.

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

<table><thead><tr><th width="165">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td><strong>Checked:</strong> Exposes the encoder out <strong>Input</strong> connectable point for each encoder in the selected subsection. This connectable point can then be connected to the model and used to control the angular rate <strong>from the model</strong> during execution.<br><strong>Unchecked:</strong> Transmission is disabled and no connectable point is exposed.</td></tr><tr><td><strong>Digital type</strong></td><td><strong>Encoder out</strong>: Generates A, B and Z output signals from an angular rate value.</td></tr><tr><td><strong>Number of encoder signals</strong></td><td>Specifies how many encoders in the subsection are controlled (maximum of <strong>two</strong> per subsection).</td></tr><tr><td><strong>Frequency unit</strong></td><td>Specifies the unit used to interpret the angular rate from the model: <strong>Hertz (Hz)</strong> or <strong>revolutions per minute (RPM)</strong>. The supported angular rate range is <strong>±166 Hz</strong> or <strong>±10,000 RPM</strong>.</td></tr><tr><td><strong>Resolution (# of cycles per revolution)</strong></td><td>Also known as <strong>PPR</strong> (pulses per revolution) or <strong>CPR</strong> (counts per revolution). Defines the number of A/B cycles per mechanical revolution. The maximum supported resolution is <strong>32 767 PPR</strong>. This parameter must be set correctly to ensure an accurate rate measurement.</td></tr><tr><td><strong>Clockwise rotation</strong></td><td>Defines whether clockwise rotation corresponds to signal <strong>A leading B</strong> or <strong>B leading A</strong>.</td></tr><tr><td><strong>Polarity</strong></td><td>Specifies the electrical polarity of the encoder <strong>A, B, and Z</strong> signals. <strong>Active High</strong>: Indicates that the signal is asserted at a high‑voltage level during the active portion of its duty cycle.<br><strong>Active Low</strong>: Indicates that the signal is asserted at a low‑voltage level during the active portion of its duty cycle.</td></tr></tbody></table>

## Digital in I/O section

In the **Folders** list, click **SlotXX - Digital in** to view its read-only parameters. Then, click **Channels 0–7**, **Channels 8–15**, **Channels 16–23**, or **Channels 24–31** to configure the corresponding subsection.

### Static, PWM and Event detector subsection

Digital input subsections are typically configured in the bitstream to give the user the flexibility to select one of the following signal types: **static** digital signals, **pulse‑width modulated** (PWM) signals, or **event detector** (time‑stamped / event‑based) signals.

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

{% tabs %}
{% tab title="Static" %}
The following parameters apply when the **Digital type** is set to **Static**.

<table><thead><tr><th width="150">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td><p><strong>Checked:</strong> Exposes the <strong>Channels x–x (Static)</strong> vector connectable points for the selected subsection. This channel vector can then be connected to the model and used to receive signals <strong>into the model</strong> during execution.</p><p><strong>Unchecked:</strong> Static digital reception is disabled, and no connectable points are exposed.</p></td></tr><tr><td><strong>Threshold low (V)</strong></td><td><p>This parameter is <strong>available only on certain digital module models</strong>.</p><p>Specifies the voltage threshold below which the digital input is considered a logical low (<code>0</code>).</p></td></tr><tr><td><strong>Threshold high (V)</strong></td><td>This parameter is <strong>available only on certain digital module models</strong>.<br>Specifies the voltage threshold above which the digital input is considered a logical high (<code>1</code>).</td></tr><tr><td><strong>Digital type</strong></td><td><strong>Static</strong>: Measures static digital signals, where logical <em>true</em> maps to <code>1</code> in the model and logical <em>false</em> maps to <code>0</code>; logical states typically correspond to high and low voltages, respectively.</td></tr></tbody></table>
{% endtab %}

{% tab title="Pulse width modulated" %}
The following parameters apply when the **Digital type** is set to **Pulse width modulated**.

<table><thead><tr><th width="150">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td><strong>Checked:</strong> Exposes the <strong>Frequency</strong> and <strong>Duty cycle</strong> connectable points for each channel in the selected subsection. These connectable points can then be connected to the model enabling direct, real‑time monitoring of the PWM frequencies and duty cycles <strong>in the model</strong> during execution.<br><strong>Unchecked:</strong> PWM reception is disabled and no connectable points are exposed.</td></tr><tr><td><strong>Threshold low (V)</strong></td><td><p>This parameter is <strong>available only on certain digital module models</strong>.</p><p>Specifies the voltage threshold below which the digital input is considered a logical low (<code>0</code>).</p></td></tr><tr><td><strong>Threshold high (V)</strong></td><td>This parameter is <strong>available only on certain digital module models</strong>.<br>Specifies the voltage threshold above which the digital input is considered a logical high (<code>1</code>).</td></tr><tr><td><strong>Digital type</strong></td><td><strong>Pulse width modulated</strong>: Measures PWM signals frequency (Hz) and duty cycle (<code>0</code> to <code>1</code>) values.</td></tr></tbody></table>
{% endtab %}

{% tab title="Event detector" %}
The following parameters apply when the **Digital type** is set to **Event detector**.

<table><thead><tr><th width="150">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td><strong>Checked:</strong> Exposes the <strong>Events</strong> and <strong>Timestamps</strong> connectable points for each channel in the selected subsection. These connectable points can then be connected to the model enabling direct, real‑time monitoring of transitions <strong>in the model</strong> during execution. Transitions are defined <strong>in chronological order</strong>. The first vector element corresponds to the first transition occurring during the next calculation step, the second element to the second transition, and so on.<br><strong>Unchecked:</strong> Reception is disabled and no connectable points are exposed.</td></tr><tr><td><strong>Threshold low (V)</strong></td><td><p>This parameter is <strong>available only on certain digital module models</strong>.</p><p>Specifies the voltage threshold below which the digital input is considered a logical low (<code>0</code>).</p></td></tr><tr><td><strong>Threshold high (V)</strong></td><td>This parameter is <strong>available only on certain digital module models</strong>.<br>Specifies the voltage threshold above which the digital input is considered a logical high (<code>1</code>).</td></tr><tr><td><strong>Digital type</strong></td><td><p><strong>Event detector</strong>: Measures time-stamped input signals reporting events and timestamps values.</p><p>Events input:</p><ul><li><code>1</code>: Rising‑edge transition detected</li><li><code>0</code>: Falling‑edge transition detected</li><li><code>−1</code>: No transition</li></ul><p>Timestamps input: depends on the <strong>Time unit</strong> parameter.</p></td></tr><tr><td><strong>Time unit</strong></td><td><p>Specifies how transition timestamps are interpreted:</p><ul><li><strong>Ratio</strong>: Transition time must be expressed as a ratio of the simulation time‑step (<code>0</code> to <code>1</code>).</li><li><strong>Second</strong>: Transition time must be expressed as a delay (in seconds) from the beginning of the calculation step. <code>Ts</code> means no transition.</li></ul></td></tr><tr><td><strong>Number of events</strong></td><td>Specifies the expected number of transitions per channel per calculation step. This parameter defines the width of the <strong>Events</strong> and <strong>Timestamps</strong> output vectors. The maximum number of transitions per channel is <strong>250</strong>. The maximum number of expected events per subgroup of 8 channels is also <strong>250</strong>. Multiple channels can share the same event if transitions occur at the same time, reducing the total number of reported events.<br>A higher number of expected events increases both processing time and the amount of data exchanged between the digital input module and the CPU.</td></tr></tbody></table>

The **Event detector** also exposes a single, global **Status** connectable point that applies to all channels within the subsection. This connectable point can then be connected to the model to input and monitor the status **in the model** during execution. A value of `0` indicates normal operation with no errors. A value of `−3` indicates a data reception error where less data was received from the Digital Input module than expected based on the **Number of events** parameter; any missing data are automatically replaced with `0`. A value of `−4` indicates that more data was received than expected, in which case the extra data are discarded. A value of `−5` is a warning indicating that at least one channel in the subgroup is operating in **static digital input** mode, which occurs when only one expected event is configured through the **Number of events** parameter.
{% endtab %}
{% endtabs %}

### Encoder in subsection

A digital input subsection may also be configured in the bitstream to operate in **Encoder in** mode, in which case it is dedicated exclusively to quadrature encoder signal acquisition. In this mode, the physical modules measure the A, B, and Z signals and, at each simulation time step, provide the encoder’s **angular rate**, **wheel position**, **direction of movement**, and **status** through the corresponding connectable points. The availability of this mode depends entirely on the bitstream supplied with the system. Refer to the **System Description Document** provided with your order for connector pin assignments.

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

<table><thead><tr><th width="165">Parameter</th><th>Value (Description)</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td><strong>Checked:</strong> Exposes the angular <strong>Rate</strong>, <strong>Wheel position</strong> and <strong>Direction</strong> connectable points for each encoder in the selected subsection. These connectable points can then be connected to the model enabling direct, real‑time monitoring <strong>in the model</strong> during execution.<br><strong>Unchecked:</strong> Reception is disabled and no connectable points are exposed.</td></tr><tr><td><strong>Digital type</strong></td><td><strong>Encoder in</strong>: Measures the angular rate, wheel position, and direction of rotation (reported as <code>1</code> for forward, <code>−1</code> for backward, or <code>0</code> for no movement) by processing the <strong>A, B, and Z</strong> input signals.</td></tr><tr><td><strong>Number of encoder signals</strong></td><td>Specifies how many encoders in the subsection are monitored (maximum of <strong>two</strong> per subsection).</td></tr><tr><td><strong>Frequency unit</strong></td><td>Specifies the unit used to interpret the angular rate provided to the model: <strong>Hertz (Hz)</strong> or <strong>revolutions per minute (RPM)</strong>. The supported angular rate range is <strong>±166 Hz</strong> or <strong>±10,000 RPM</strong>.</td></tr><tr><td><strong>Resolution (# of cycles per revolution)</strong></td><td>Also known as <strong>PPR</strong> (pulses per revolution) or <strong>CPR</strong> (counts per revolution). Defines the number of A/B cycles per mechanical revolution. The maximum supported resolution is <strong>65 535 PPR</strong>. This parameter must be set correctly to ensure an accurate rate measurement.</td></tr><tr><td><strong>Clockwise rotation</strong></td><td>Specifies whether clockwise rotation corresponds to signal <strong>A leading B</strong> or <strong>B leading A</strong>.</td></tr><tr><td><strong>Auxiliary output type</strong></td><td><p><strong>Raw:</strong> Reports the wheel position as encoder count values.<br><strong>Angle:</strong> Reports the wheel position converted to an angular quantity in the selected unit:</p><ul><li><strong>Angle unit:</strong> Specifies the unit used to express position: <strong>Degree</strong>, <strong>Radian</strong>, or <strong>Revolution</strong>.</li></ul></td></tr><tr><td><strong>Minimal rate</strong></td><td>Specifies the lowest detectable angular rate. Rates below this threshold are treated as zero. The minimum supported value is <strong>±0.1 RPM</strong> (approximately <strong>±0.0017 Hz</strong>), using the unit specified by <strong>Frequency Unit</strong>.</td></tr></tbody></table>

The **Encoder in** also exposes a single, global **Status** connectable point that applies to all encoders within the subsection. This connectable point can then be connected to the model to input and monitor the status **in the model** during execution. A value of `0` indicates normal operation with no errors while a value of `−5` indicates a computation error.

## Digital bi-directional section

In the **Folders** list, click **SlotXX - Digital bi-directional** to view its read-only parameters. Then, click **Channels 0–7**, **Channels 8–15**, **Channels 16–23**, or **Channels 24–31** to configure the corresponding subsection.

Each subsection can operate either as an input or an output. To configure a subsection as an output, set the **Direction** parameter to **Output** and refer to the [Digital out I/O section](#digital-out-i-o-section) for further configuration details. To configure it as an input, set **Direction** to **Input** and refer to the [Digital in I/O section](#digital-in-i-o-section) for further configuration details.

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


---

# 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/configure-ios/analog-digital-and-sfp-ios/opal-rt-board-workflow/digital-and-encoder-configuration.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.
