> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oryx.mechatronstudio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CKP / CMP generator

> Building the crankshaft and camshaft signal from the wheel parameters.

Instead of drawing sixty teeth by hand, the generator builds the whole signal
from the tone wheel parameters.

It opens from **Settings → Create CKP CMP Signal**.

<Note>
  **Digital mode only.**
</Note>

## What it generates

* **CKP** on the first active channel: **two full crankshaft revolutions**, which
  is one complete four-stroke engine cycle.
* **CMP** on the second active channel: **a single pulse** per two crankshaft
  revolutions, that is, one camshaft turn.

Whatever those two channels already held **is replaced**. The other channels are
left untouched.

## CKP setup

### Preset wheels

| Preset             | Total teeth | Missing teeth |
| ------------------ | ----------- | ------------- |
| **60-2** (default) | 60          | 2             |
| **36-2**           | 36          | 2             |
| **36-1**           | 36          | 1             |

### Custom

| Parameter         | Range    |
| ----------------- | -------- |
| **Total teeth**   | 1 to 360 |
| **Missing teeth** | 0 to 10  |

## How the wheel is drawn

Every tooth position takes **two steps**, so the waveform has visible rising and
falling edges:

* **Real tooth**: high on the first step, low on the second.
* **Missing tooth**: low on both steps.

That gives the total length of the signal:

```
steps per revolution = total teeth × 2
steps per cycle      = total teeth × 4
```

With a 60-2, then: 120 steps per revolution and **240 steps** for a full cycle.

The missing-teeth zone sits at the end of each revolution.

## CMP synchronization

A slider from **−360° to +360°**, with a **Reset** button to go back to 0°.

The CMP pulse:

* Lasts **5 tooth widths**, that is 10 steps, always.
* Starts by default a quarter of the way into the second revolution.
* The sync angle shifts it: the 360° of one crankshaft revolution are
  `total teeth × 2` steps, so **+90° advances it a quarter turn**.

The result is wrapped inside the cycle: if the shift pushes it out one end, it
comes back in the other.

## After generating

The signal sits on the timeline like any other: you can edit, repeat, label,
export it and send it to the ESP32.

<Tip>
  When you send it to the device, the **Cycles (RPM)** control closes the circle:
  with cycles above 0, one full pass of the signal is one engine revolution and the
  step time comes from there:

  ```
  step time (µs) = 60 000 000 / (rpm × total steps)
  ```

  That way you sweep the range without redrawing anything. See
  [Connect the device](/en/device/connect).
</Tip>

## Where the parameters live

The parameters the signal was built with are stored **with that mode's project**:
reopening the window, they are as you left them.
