> For the complete documentation index, see [llms.txt](https://docs.motion4sim.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.motion4sim.com/controller-and-firmware/direct-motion-mode.md).

# Direct Motion Mode

## Direct Mode Overview

In **Direct Mode**, each actuator is controlled individually. The actuator position is transmitted in a **bit-coded** format with a **24-bit resolution** (3 bytes per actuator). This means:

* **Value = 0x000000 (Decimal = 0)** → Actuator at the lowest position
* **Value = 0x7FFFFF (Decimal = 8,388,607)** → Actuator at the middle position
* **Value = 0xFFFFFF (Decimal = 16,777,215)** → Actuator at the highest position

Each actuator can be set to **16,777,215 different positions**.

#### Data Format

* **ID** consists of two bytes: `0xFF + 0xFF`
* **Each axis** is represented by **24 bits (3 bytes)**
* **Line Feed + Carriage Return (LF+CR)** is required at the end (`0x0A + 0x0D`)

**Packet Structure:**

```
ID   AXIS1   AXIS2   AXIS3   AXIS4   AXIS5   AXIS6   AXIS7   AXIS8   LF/CR
```

#### Byte Layout:

* **2 Start Bytes** → `<255><255>`
* **24 Data Bytes** → **3 Bytes (24-bit) per channel/actuator** (up to 8 channels)
* **2 Stop Bytes** → `<10><13>`

### Important Notes for Mover/SimTools

To prevent errors, follow these guidelines:

* The transmitted string must always have a fixed length of **28 bytes**, even if not all actuators are used.
* If only a single actuator (e.g., **Wind**) is used, **21 additional characters** must be included before/after the wind data.
* Example for one actuator (`Wind`):

  ```
  <255><255>aaabbbccc<Wind>eeefffggghhh<10><13>
  ```
* In **Rig Mode** or **Direct Mode**, ensure that the **Wind actuator value is set to 24-bit**, so it is always 3 bytes long.

<div align="center"><figure><img src="https://552729631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFOktTW0VPzVWExwAQG2G%2Fuploads%2Fgit-blob-5923dd9a66cfb992a0b4c048211f8a6ae7ed3cc3%2Fgrafik.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://552729631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFOktTW0VPzVWExwAQG2G%2Fuploads%2Fgit-blob-f7bb24a08084cae63bc670b534fd2f5f3c217baf%2Fgrafik.png?alt=media" alt=""><figcaption></figcaption></figure></div>


---

# 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://docs.motion4sim.com/controller-and-firmware/direct-motion-mode.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.
