> 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/position-motion-mode.md). Agents can also search and read this documentation through its [MCP server](https://docs.motion4sim.com/~gitbook/mcp).

# Position Motion Mode

## Position Mode Configuration

### Overview

In **Position Mode**, positions are sent to the controller using millimeters (mm) for translational movements (Surge, Sway, Heave) and degrees (°) for rotational axes (Yaw, Roll, Pitch). These values are represented as 32-bit floating-point numbers (`float`). Additionally, a "Belt" value (7th) and a "Wind" value (8th) can be included as 32-bit unsigned integers (`uint32`) when required. Each value (whether `float` or `uint32`) is 4 bytes in size, and the total packet length is fixed at 36 bytes.

### Data Structure

The position data is transmitted as follows:

* **Translational Movements**:
  * **Sway**: 4-byte `float` (in mm)
  * **Surge**: 4-byte `float` (in mm)
  * **Heave**: 4-byte `float` (in mm)
* **Rotational Axes**:
  * **Yaw**: 4-byte `float` (in degrees)
  * **Roll**: 4-byte `float` (in degrees)
  * **Pitch**: 4-byte `float` (in degrees)
* **Optional Actuators**:
  * **Belt** (7th value): 4-byte `uint32` (only when needed)
  * **Wind** (8th value): 4-byte `uint32`, `0x00000000` = fan off, `0xFFFFFFFF` = full speed (only when needed, see [Dual Channel Wind Simulator](https://docs.motion4sim.com/hardware/dual-channel-wind-simulator.md))

### Packet Format

The complete data packet adheres to a fixed structure:

* **Start Bytes**: `<252> <252>` (2 bytes)
* **Data Payload**: 8 × 4-byte values (32 bytes total)
* **Stop Bytes**: `<10> <13>` (2 bytes)

This results in a total packet length of **36 bytes**.

#### Handling Missing Values

If fewer than 8 values are used, the remaining slots must be padded with 4-byte placeholders (e.g., `0000`) to maintain the fixed 36-byte packet length. The "Belt" (7th) and "Wind" (8th) values are optional and only included when needed; otherwise, their slots are filled with 4-byte placeholders.

#### Example Packets

1. **Without Belt Value**:

   ```
   <252><252><PSway><PSurge><PHeave><PYaw><PRoll><PPitch><0000><0000><10><13>
   ```

   * `<PSway>`, `<PSurge>`, `<PHeave>`: 4-byte `float` values (in mm)
   * `<PYaw>`, `<PRoll>`, `<PPitch>`: 4-byte `float` values (in degrees)
   * `<0000><0000>`: 4-byte placeholders for unused axes (7 and 8)
   * Total length: 36 bytes
2. **With Belt Value**:

   ```
   <252><252><PSway><PSurge><PHeave><PYaw><PRoll><PPitch><PBelt><0000><10><13>
   ```

   * `<PSway>`, `<PSurge>`, `<PHeave>`: 4-byte `float` values (in mm)
   * `<PYaw>`, `<PRoll>`, `<PPitch>`: 4-byte `float` values (in degrees)
   * `<PBelt>`: 4-byte `uint32` value for the 7th actuator (Belt)
   * `<0000>`: 4-byte placeholder for unused Axis 8
   * Total length: 36 bytes
3. **With Belt and Wind Values**:

   ```
   <252><252><PSway><PSurge><PHeave><PYaw><PRoll><PPitch><PBelt><PWind><10><13>
   ```

   * `<PBelt>`: 4-byte `uint32` value for the 7th actuator (Belt)
   * `<PWind>`: 4-byte `uint32` value for the wind fan (8th value)
   * Total length: 36 bytes

### Summary

* Translational and rotational axes use 32-bit (4-byte) `float` values.
* The optional "Belt" (7th) and "Wind" (8th) values use 32-bit (4-byte) `uint32` values, included only when needed.
* The packet always transmits 8 values (6 axes + optional Belt + optional Wind), totaling 32 bytes of data.
* Including start and stop bytes, the fixed packet size is 36 bytes.


---

# 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/position-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.
