# Required Tooling

**Required tooling** says which tools an item needs on a machine: `EC-25` runs in mold `M-EC25-4` on Injection Press 1.
It's the link from an **item** to its **tools**. (A tool's [positions](./positions.md) are the link the other way: what
the tool makes each cycle.)

Required tooling is used in three places:

- **Starting a run.** When an operator starts a run on the Operator Station without a required tool mounted, Run Control
  lists what's missing and asks *Start anyway?*. A required tool that makes the item (its output positions are set to
  the item, or to no item) is also met by a mounted tool with an unblocked position set to the item, such as a family
  mold: what matters is that the item can be made. See [A Family Mold Standing In](#a-family-mold-standing-in).
- **Scheduling.** An operation scheduled on the machine reserves its required tools, so the Operations scheduler can warn
  when a tool is booked twice or is in repair. See [Scheduling with Tools](#scheduling-with-tools).
- **The event editor.** The Operations scheduler's event editor has a **Tooling** section that shows the tool reserved for
  each requirement, and lets the planner pick another.

## Setting It Up

Required tooling is set per item, in **Configuration > Ops > Materials**, on the **Required Tooling** tab.

1. Pick the **Item** at the top, or **Every item** to list them all.
2. Click **Add a required tool** (**+**), or select a row and click the edit button.
3. Fill in the editor:

   | Field | Meaning |
   | --- | --- |
   | Item | The item that needs the tool. |
   | Machine | The machine it's needed on. **Any machine** applies it wherever the item runs on a machine that uses tooling. |
   | Needs | **A specific tool** (pick it under **Tool**), or **Any tool of a type** (pick the **Tooling type**, for example any Mold). |
   | Sort order | The order the requirements are listed in. |
   | Required | Ticked: warn when it isn't mounted, and reserve it when the item is scheduled. Unticked: listed as a tool that may be used, with no warning. |
   | Enabled | An unticked requirement is kept but not checked. |

4. Click **Save**.

The machine must have **Uses tooling** turned on, and the same tool (or type) can't be required twice for an item and
machine.

### The Check Column

The **Check** column of the Required Tooling list catches a requirement that points at the wrong tool: one that can never
make the item. It works from the item set on each of the tool's output [positions](./positions.md):

| The tool's output positions | The tool can make | Check column |
| --- | --- | --- |
| No item on any position (a single-item mold) | Whatever item is running | Empty |
| At least one position set to this item, or with no item | This item, from those positions | Empty |
| Every position set to **other** items (a family tool made for something else) | Only those other items | *Can't make this item: the tool's positions are all set to other items* |

The editor shows the same warning when you pick the tool. You can still save the requirement, but it almost certainly
points at the wrong tool. To fix it, either set one of the tool's
positions to this item (or to no item) on its **Positions** tab, or pick another tool.

A tool with no positions (a fixture, for example), and a requirement for a tooling type, aren't checked, so their
Check column is always empty.

### A Family Mold Standing In

When an operator starts a run, a required tool that isn't mounted is still met when the item can be made another way:

- The required tool has output positions set to the item, or to no item (a mold for it), **and**
- A mounted tool has an output position set to the item that isn't blocked or retired.

For example, `EC-25` requires `M-EC25-4` on Injection Press 1. With the family mold `M-ECF-4` mounted, whose cavities 1
and 2 are set to `EC-25`, an `EC-25` run starts without a warning. Block both of those cavities and it warns again. A
required tool with no positions (a fixture, for example) has to be the one mounted, and a mounted tool whose positions
aren't set to an item doesn't stand in for another tool.

This is only for the warning when a run starts: a scheduled operation still reserves the required tool itself.

## Scheduling with Tools

When an operation is scheduled for an item, it reserves a tool for each of the item's required tools on that machine: the
tool itself, or a free tool of the required type. In the Operations scheduler's event editor, the **Tooling** section
lists each requirement with its reserved tool; pick another tool there, or leave it blank to let the scheduler choose.
Saving an operation whose tools have warnings (booked elsewhere, over a limit, in repair) asks you to confirm.

The `toolingConflictMode` configuration setting decides what a hard conflict (a double booking, a tool in repair) does: `warn` (the
default) asks to confirm, `block` refuses to schedule the operation.
