# Tool Life

Every mold wears. Kanoa counts each tool's **cycles** (shots) and **run minutes** while it's mounted, against the limits
on its Details tab, and gives it a status: *Due for PM* at the tool's **Warn at %** of a limit, and *Over limit* past
it.

::embed-section{src="../../../kanoa-ops/tooling/tool-life.md" collapsed="true" summary="Reference Materials: Tool Life - Counts, statuses and recording maintenance."}

## Where the Counts Come From

- **Shots** come from Injection Press 1's `Tooling/Inputs/Cycle Count` tag, which you pointed at the simulator's shot
  counter in [A New Press](./1-a-new-press.md). Each increase is added to every tool mounted on the press. On a real
  press, it's the PLC's shot counter.
- **Run minutes** are counted from the time Injection Press 1 was *Running* with the mold mounted. They need no setup.

A mold with its own shot counter can report through `Tooling/Inputs/Tool Shot Counter` instead, so its count follows the
mold from press to press.

::embed-section{src="../../../kanoa-ops/tooling/tooling-tags.md#inputs" collapsed="true" summary="Reference Materials: Tooling Tags - The inputs a PLC writes."}

## Watch the Shots Come In

`M-EC32-2` has been on Injection Press 1 since the changeover, at about 5 shots a minute.

:::action[Watch M-EC32-2's life]

1. Navigate to **Configuration → Ops → Tooling** and double-click `M-EC32-2`. Open the **Life** tab and note its
   lifetime and since-PM shots.
2. Close the editor, wait a couple of minutes, and open it again. Both counts have gone up by about 5 a minute.
3. Open `M-EC25-4`'s **Life** tab too. It kept the shots from its run in [Run and Change
   Over](./3-run-and-change-over.md), but they stopped when it came off the press.

:::

## Due for PM

`M-EC32-2` has a PM interval of 60 shots and warns at 80%, so it's *Due for PM* at 48 shots: about 10 minutes after it
went on the press. At 60 it's *Over limit*.

:::action[See the mold come due]

1. Once `M-EC32-2` has passed 48 shots, reopen its **Life** tab. The status is *Due for PM* (or *Over limit*, past 60).
2. Open the tools list in **Configuration → Ops → Tooling**. `M-EC32-2`'s **Alert** column shows the PM coming due, and
   **Worst limit %** shows how far through the interval it is.
3. Open the Operator Station for `Injection Press 1`. The info panel's **Tooling** card shows *PM 50/60 cycles* (or however many
   shots it's at) with an orange warning icon, red once it's past 60. Hover the icon for the details.

:::

Tools that are due or over a limit also appear on the info panel's **Notifications** card, as *1 tooling alert*, and in the
**Event Notifications** dashboard widget, so maintenance can plan
the PM. The gateway also checks every tool's limits every hour, so a calendar-day or calibration limit comes due even
when nothing is counting.

:::note[Over a limit]
Kanoa still lets you mount a mold that's over a limit, because stopping production is a call for people to make, but the
mount panel shows a **Mount warnings** popup that has to be accepted, and the accepted warning is saved with the mount.
A tool that is *In repair*, *Damaged* or *Retired* can't be mounted at all.
:::

## Record the PM

:::action[Record the PM]

1. On `M-EC32-2`'s **Life** tab, enter the **Note** `PM - vents cleaned, ejector pins checked`.
2. Click **PM done**.
3. Confirm the since-PM shots are back to 0, the lifetime shots are unchanged, and the status is back to *Mounted*.

:::

The note is saved with the adjustment, so the mold's history shows who did the PM and why. **Refurbished** and
**Calibrated** work the same way for the refurbishment and calibration limits. **Correct a count** sets a count by hand,
for example the lifetime shots of a used mold you've just started tracking.

:::tip[With Kanoa Maintenance]
Recording the PM by hand needs no other license. With Kanoa Maintenance, a work order template with the **Tool Life**
condition creates a work order when the mold comes due, and completing the work order resets the count for you. The tool
editor's **Maintenance** tab lists them. See [With Kanoa Maintenance](../../../kanoa-ops/tooling/tool-life.md#with-kanoa-maintenance).
:::

Injection Press 1 keeps shooting, so `M-EC32-2` will come due again after another 48 shots. That's the low training
interval; it won't matter for the rest of this chapter.

:::check

Copy this script into the Ignition Designer Script Console (**Tools → Script Console**) and run it. It checks that
`M-EC32-2` has at least 48 lifetime shots and that a PM has been recorded, so its since-PM shots are below its lifetime
shots. Each check prints PASS or FAIL with what to fix. It doesn't change anything.

<details>
<summary>Show the check script</summary>

::check-script{src="ops/12-tooling/4-tool-life.py" title="checkLesson-toolLife.py"}

</details>

:::
