# Record Downtime

Every time your machine stops, Kanoa records how long it was down. What it can't know on its own is **why**. The reason you
give is what your supervisor and engineers use to decide what to fix, so a stop with no reason, or the wrong one, is a
stop nobody can fix.

## Set the Reason When the Machine Stops

When the machine goes down, the **State** card on the info panel shows the stop and how long it has lasted. If Kanoa
couldn't tell why, it shows a general state, such as *Unplanned Downtime*.

1. Tap the **State** card. The **Set State** popup opens with the machine's states in a tree, grouped by category.
2. Open the category that fits, such as *Mechanical* or *Material*, and select the reason.
3. Click **Set State**.

The **State** card now shows the reason you picked.

{/*
TODO screenshot: the Set State popup with its reason tree, on a standard install.
*/}

:::tip
Set the reason while the stop is happening, or as soon as the machine is running again. It's far easier to remember why
the machine stopped ten minutes ago than at the end of the shift.
:::

## Catch Stops You Missed

If a stop ends without a reason, the **Notifications** card counts it as *uncoded downtime* for the shift, and its stripe
turns orange. Tap the card, then tap the notification to open the stops that need a reason. Before you hand over, check
the card has no uncoded downtime left.

## Give Slow Running a Reason

The machine can lose output without stopping, by running below its standard rate. While it does, a **Speed loss** card
appears on the info panel, showing how far below the rate it is.

1. Tap the **Speed loss** card. The **Set Speed Loss** popup opens with the reasons in a tree, grouped by class.
2. Select the real reason, such as reduced speed for a material problem.
3. Confirm it.

Setting a speed-loss reason needs the **Edit Operations** security function. If the card has no chevron (›) for you, tell
your supervisor why the machine is running slow.

## Correct a Reason You Got Wrong

You can correct earlier stops in the **Downtime Editor**, from the **Downtime** tile on the Asset Operation screen
(*View and edit downtime states*). It needs the **Edit Operations** security function.

![Downtime Editor](https://docs.kanoa.ai/img/asset-operation/downtimeEditor.png)

1. Tap the **Downtime** tile.
2. Select the stop you want to correct, and click the edit button.
3. Pick the right reason, and save. The corrected stop is marked with a check box.

From the same screen you can also **split** a stop that had two causes into two stops, each with its own reason, and
**revert** a change you made by mistake.

:::warning
Don't delete a stop to get rid of it. Deleting it adds its time to the state before it, which hides the downtime instead of
explaining it, and a deleted stop can't be brought back.
:::

::embed-section{src="../../kanoa-ops/asset-operation.md#downtime-event-editor" collapsed="true" summary="Reference Materials: Downtime Event Editor - Edit, split, delete and revert states."}

## Check Your Understanding

1. The machine stopped because a feeder jammed. Where do you give the reason?
2. What tells you there are stops on this shift with no reason?
3. You picked the wrong reason for a stop an hour ago. How do you fix it?

<details>
<summary>Answers</summary>

1. Tap the **State** card and pick the reason in the **Set State** tree.
2. The **Notifications** card counts uncoded downtime, and its stripe turns orange.
3. Edit the stop in the **Downtime Editor**, from the **Downtime** tile, or ask your supervisor if you don't have Edit
   Operations.

</details>
