# Item Sets and Tolerances

Different products often need different limits for the same measurement. You don't want a check sheet for each one. Instead,
a check refers to an **attribute**, and the attribute holds the **tolerances**. **Item sets** group products that share a
tolerance. This lesson shows you how to set that up for the CoreForge machined parts.

:::info
Item sets and attributes need the **Configure Quality** security function.
:::

## Create Item Sets

Items are grouped by item class. An **item set** groups items from different classes, or items that share a specification.
It makes tolerances easier to manage, because you set them once for the set.

1. Open **Configuration → Quality → Item Sets**.
2. Click the pencil icon (**Edit Item Sets**) to open the item set editor.
3. Add the item sets you need. The CoreForge example uses `Coupling Pins`, `Precision Rods` and `Shaft Cores`.
4. Select the items for a set and click the link button to link them.

![Item Set Editor](https://docs.kanoa.ai/img/quality/itemSetEditor.png)

An item can belong to only one item set at a time, so it's always clear which tolerance applies.

{/*
TODO: Confirm on a gateway that Item Sets sits at Configuration, Quality, Item Sets and that the editor has an add button and a link button as the product docs describe.
*/}

::embed-section{src="../../kanoa-quality/itemSets.md" collapsed="true" summary="Reference Materials: Item Sets - Grouping items to share tolerances."}

## Create an Attribute

An **attribute** is a named quality variable, such as a diameter. Check items refer to it, so the check doesn't need a
fixed spec. Attributes are organized in folders.

1. Open **Configuration → Quality → Attributes**.
2. Select a parent attribute in the tree, if there is one, then click the add icon.
3. Enter a name. Names don't have to be unique, but a name and asset combination does.
4. Add a description if you want, and click **Save**.

![Attributes](https://docs.kanoa.ai/img/quality/ProcessAttributeOverview.png)

If the value can be read from an asset, add a **Data Source**. Choose the asset and tag, and set **Scale Factor** or
**Ignore zero values** if needed. The Developer Training covers tag-based attributes.

::embed-section{src="../../kanoa-quality/attributes.md#adding-attribute" collapsed="true" summary="Reference Materials: Adding an Attribute - Create, edit and delete attributes."}

## Set Tolerances

Select an attribute and click **View Attribute Settings**. On its tolerance tab, click **Add Tolerance**. Leave the Asset,
Item and Item Set fields blank to apply the tolerance to all items. Or choose an asset, an item or an item set.

![Tolerance editor](https://docs.kanoa.ai/img/quality/ProcessAttributeToleranceEditor.png)

When a check is taken, Kanoa picks the tolerance in this order:

1. A tolerance for the current item.
2. A tolerance for the item set the item belongs to.
3. The tolerance for all items.

Only enabled tolerances count. Clear **Enabled** to stop one applying without deleting it.

Each tolerance has these limits:

| Limit | What it does |
| --- | --- |
| **LEL** / **UEL** | The lowest and highest value that can be entered. |
| **LSL** / **USL** | The pass or fail limits. A value outside them fails and shows red. |
| **LCL** / **UCL** | Control limits. A value outside them still passes but shows orange. |
| **Target** | The ideal value. |

For example, the FAI Diameter for `Coupling Pins` has a target of 10.00 mm, spec limits of 9.90 and 10.10, and entry limits
of 9.85 and 10.15. A reading of 10.12 fails. A reading of 10.20 can't be entered.

The values must make sense. For example, the upper entry limit can't be smaller than the lower one, or Kanoa shows them in
red.

::embed-section{src="../../kanoa-quality/attributes.md#tolerances" collapsed="true" summary="Reference Materials: Tolerances - Limits, order of use and the Enabled setting."}

## Use the Attribute on a Check

1. Open the check sheet and select the check item.
2. In **Data Properties**, choose the attribute in **Assign Attribute**.
3. In **Specification**, choose **Attribute Tolerance**.

Now one check sheet covers every item. The inspector sees the limits for the item they're checking. Turn on **Dynamic** to hide the
check for items that have no tolerance.

## Check Your Understanding

1. Why use an item set instead of setting a tolerance per item?
2. Kanoa finds no tolerance for the current item. What does it look for next?
3. What happens when a reading is above the **USL**?

<details>
<summary>Answers</summary>

1. You set the tolerance once for the whole set, so there's much less to manage.
2. A tolerance for the item set the item belongs to, and then the tolerance for all items.
3. It fails and shows red. A reading beyond the **UEL** can't be entered at all.

</details>
