# Configure Assets

Almost everything in Kanoa MES hangs off an **asset**: a piece of equipment, or a place in the plant. Runs, downtime,
counts, checks and work orders are all recorded against one. This lesson shows you how to look after the asset model, and
where to find each part of an asset's setup.

Adding, editing and deleting assets needs the **Configure Assets** security function.

## The Asset Model

Assets form a tree, following the ISA-95 levels: **Enterprise → Site → Area → Line → Cell**. In the CoreForge sample plant:

```text
CoreForge                 Enterprise
└── Philadelphia          Site
    ├── Machining         Area
    │   └── Machine 1     Line
    ├── Coating           Area
    │   └── Spray Line 1  Line
    └── Finishing         Area
        └── Manual Pack 1 Line
```

The equipment that makes product, usually a line or a cell, is **OEE Enabled**. The enterprise, site and areas organize
the tree; they don't run production themselves.

## Add or Edit an Asset

1. Open **Configuration → Ops → Assets**.
2. To add an asset, select its parent in the tree and click **Add**. To change one, select it and click the edit button.
3. Fill in the asset:
   - **Asset Name**: unique under its parent.
   - **Asset Type**: its level, such as **Site**, **Area** or **Line**.
   - **Asset Group** (optional): groups similar assets across the plant for reporting, such as all box formers.
   - **Sort Order**: its position among its siblings.
   - **OEE Enabled**: on for equipment that runs production. You can then set its OEE targets, and Kanoa creates its
     data interface tag.
   - **Custom Attributes** (optional): extra information, such as the asset's name in the ERP.
4. Save the asset.

A site needs a **Timezone** before it can be saved.

![Asset editor](https://docs.kanoa.ai/img/asset-config/asset-editor.png)

::embed-section{src="../../configuration/assets.md#add-or-edit-an-asset" collapsed="true" summary="Reference Materials: Add or Edit an Asset - Every field, and duplicate, delete, import and export."}

## Move, Duplicate or Delete an Asset

- **Move**: drag the asset onto its new parent, and confirm. You can move or rename an asset at any time, even while it's
  running: its history is stored against its ID, which never changes.
- **Duplicate**: select the asset and click **Duplicate**. The copy has the whole setup, including child assets, custom
  attributes, and mode, state and item links. It's the quickest way to add a line like one you already have.
- **Import / Export**: copy an asset and its setup to another gateway.

:::warning[Deleting an asset deletes its history]
If the asset has child assets or recorded events, Kanoa warns that deleting it also removes its historical data. This
can't be undone.
:::

{/*
TODO: Confirm on a gateway whether an asset can be disabled instead of deleted, to keep its history, and the label of
the edit button on Configuration → Ops → Assets.
*/}

## Everything Else an Asset Needs

The asset editor holds the basics. The rest of an asset's setup lives in these places, most of them on the tabs of
**Configuration → Ops → Assets**:

| Setup | What it decides | Where |
| --- | --- | --- |
| **Modes** | What the asset is meant to be doing: Production, Idle, Changeover, Maintenance | Linked to the asset on the **Modes** tab |
| **States** | What the asset is actually doing, and every downtime reason an operator can pick | Linked to the asset on the **States** tab |
| **Production rates** | Which items the asset makes, and how fast | **Configuration → Ops → Materials** |
| **Item states** | The scrap and waste reasons for the asset | **Configuration → Ops → Item States** |
| **Counters** | The infeed, outfeed and waste counts the asset records | The asset's counters |
| **Custom attributes** | Fixed information about the asset, and the reserved ones that change Kanoa's screens for it | The asset editor |
| **OEE targets** | The thresholds that color OEE green, orange or red | The asset editor |
| **Shifts** | The shift pattern, inherited from the asset above unless set here | **Ops → Scheduling → Shifts** |
| **Dynamic attributes** | Values that change over time, such as a recipe or a room humidity | **Configuration → Ops → Dynamic Attributes** |
| **Measures** | Process values collected and summarized, such as a temperature | **Configuration → Ops → Measures** |
| **Tooling** | The molds or dies the asset runs with, and their rates | **Configuration → Ops → Tooling** |
| **Data interface tag** | How the asset's PLC signals reach Kanoa | The asset's tag in the Kanoa tag provider |

Connecting an asset's data interface tag to the PLC is done in the Ignition Designer, so it's covered in Developer Training,
not here.

{/*
TODO: Confirm on a gateway the tab names on Configuration → Ops → Assets (Modes, States) and where an asset's counters
and OEE targets are edited.
*/}

### Reference Materials

::embed-section{src="../../kanoa-ops/assets/modes.md" collapsed="true" summary="Modes - What an asset is meant to be doing, and how modes are linked to assets."}

::embed-section{src="../../kanoa-ops/assets/states.md" collapsed="true" summary="States - What an asset is actually doing, and linking states to assets."}

::embed-section{src="../../kanoa-ops/items/item-rates.md" collapsed="true" summary="Production Rates - Which items an asset makes, and how fast."}

::embed-section{src="../../kanoa-ops/items/item-states.md" collapsed="true" summary="Item States - Scrap and waste reasons, linked to assets."}

::embed-section{src="../../kanoa-ops/assets/counters.md" collapsed="true" summary="Counters - The counts an asset records."}

::embed-section{src="../../kanoa-ops/assets/custom-attributes.md" collapsed="true" summary="Custom Attributes - Fixed asset information, and the reserved attributes."}

::embed-section{src="../../configuration/oee.md" collapsed="true" summary="OEE - How OEE is worked out, and its color thresholds."}

::embed-section{src="../../kanoa-ops/shifts.md" collapsed="true" summary="Shifts - Shift patterns, and how assets inherit them."}

::embed-section{src="../../kanoa-ops/dynamic-attributes.md#defining-and-linking-dynamic-attributes" collapsed="true" summary="Dynamic Attributes - Defining them and linking them to assets."}

::embed-section{src="../../kanoa-ops/measures.md" collapsed="true" summary="Measures - Collecting and summarizing process values."}

::embed-section{src="../../kanoa-ops/tooling.md#setting-up-a-tool-where-everything-lives" collapsed="true" summary="Tooling - Where each part of a tool's setup lives."}

::embed-section{src="../../kanoa-ops/assets/assetOEEInfo.md" collapsed="true" summary="Data Interface Tag - How an asset's PLC signals reach Kanoa."}

## Check Your Understanding

1. Which assets should be OEE Enabled?
2. You need a second line just like Machine 1. What's the quickest way to set it up?
3. Why is it safe to rename or move an asset that has been running for a year?

<details>
<summary>Answers</summary>

1. The equipment that runs production, usually a line or a cell. The enterprise, site and areas only organize the tree.
2. Duplicate Machine 1. The copy has its whole setup, including its mode, state and item links.
3. Kanoa stores the asset's history against its ID, which never changes.

</details>
