> For the complete documentation index, see [llms.txt](https://wiki.inels.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.inels.com/inels-bus/inels-design-manager-idm3/idm3-wire-editor-reference.md).

# The wire editor

*Part 3 — Reference.*

**Functions** ribbon tab → **Wire manager**, or **Add connection** to create wires

***

## 18.1 What a wire is

A **wire** is one rule: an actor, one or more consumers, and a list of functions saying what happens when. Nothing to do with cable.

The model is in [Chapter 2](/inels-bus/inels-design-manager-idm3/how-programming-works-in-idm3.md). This chapter documents the screens.

***

## 18.2 Creating wires

1. Switch to the **Function** workspace tab.
2. **Functions** ribbon tab → click **Add connection**. It is a **toggle** — connectable icons turn **green**.
3. **Press and drag** from the actor to the consumer, and release.
4. Click **Add connection** again to stop.

An arrow on the line shows direction: actor → consumer.

### Basic objects

Drag from the actor's icon to the consumer's. Timers and counters connect the same way.

### Compound objects

Drag between two compound objects and a window opens showing the **first object's** basic objects on the left and the **second object's** on the right. Connect them individually there, then **Close**.

### System devices

Timers, counters and programs live inside the central unit. Drag from the **central unit icon** to your target and a **Select devices to create wires** dialog opens — choose which timer, counter or program you meant.

### Applying a macro as you draw

Tick **Use selected macro** and choose a macro. Every new wire whose **actor type** matches gets the macro's functions filled in automatically. See [Tutorial 10](/inels-bus/inels-design-manager-idm3/tutorial-macros-and-function-blocks.md).

***

## 18.3 The Wire manager

Shows **used / maximum** wires at the top — a real limit on large projects.

### Left — the wire list

Each row shows the actor, the consumer and the wire name.

| Control    | What it does                                           |
| ---------- | ------------------------------------------------------ |
| **–**      | Deletes the selected wire                              |
| filter box | Shows only wires whose name, actor or consumer matches |
| **x**      | Clears the filter                                      |

**Reorder wires by dragging** with the left mouse button. A green *"Unit will be inserted here:"* marks the drop position. Order matters when several wires react to the same event.

### Right — the selected wire

| Field                        | Notes                                               |
| ---------------------------- | --------------------------------------------------- |
| **Name:**                    | Name it. On a real project you will thank yourself. |
| **Description:**             | Free text                                           |
| **Actor:** / **Consumer:**   | What it connects                                    |
| **Actors:** / **Consumers:** | Counts, when there are several                      |
| **Functions:**               | The rules on this wire                              |

The function list columns are **Action**, **User defined function** and **Restrictions**.

| Button                      | What it does                                   |
| --------------------------- | ---------------------------------------------- |
| **+** / **Add function**    | Opens **Wire function**                        |
| pencil / **Edit function**  | Opens **Wire function** for the selected entry |
| **–** / **Remove function** | Deletes it                                     |
| **Remove all**              | Clears the list                                |

***

## 18.4 The Wire function window

Where a rule is actually defined.

| Field              | What it is                                                               |
| ------------------ | ------------------------------------------------------------------------ |
| **Action:**        | Which event on the actor fires this. The list depends on the actor type. |
| **User function:** | What to do. Defined in **Function manager**.                             |
| **Conditions**     | Optional gating                                                          |
| **Relation:**      | How multiple conditions combine                                          |

**OK** stores it, **Cancel** discards it.

> **If the function you want is not offered**, it was defined with the wrong **Function type** — a `Digital` function will not appear for an analog consumer. Fix it in **Function manager**.

### Conditions

**Add condition**, then choose:

| Button                 | Compares                                        |
| ---------------------- | ----------------------------------------------- |
| **Restriction value**  | a device's state against a value you type       |
| **Restriction object** | a device's state against another device's state |
| **Combination**        | groups conditions so they evaluate as a unit    |
| **Remove restriction** | deletes one                                     |

Each condition row has four parts:

1. **which device** — a key opens the selector; you can also choose the wire's own **actor** or **consumer**
2. **which input or output** on it
3. the **operator**
4. the **value**

Operators:

| Operator | Meaning               |
| -------- | --------------------- |
| `=`      | equals                |
| `<>`     | does not equal        |
| `>`      | greater than          |
| `>=`     | greater than or equal |
| `<`      | less than             |
| `<=`     | less than or equal    |

With more than one condition, **Relation:** appears — **A** = AND, **O** = OR.

| first | second |  AND  |   OR  |
| :---: | :----: | :---: | :---: |
| false |  false | false | false |
| false |  true  | false |  true |
|  true |  false | false |  true |
|  true |  true  |  true |  true |

> **"In this case is allowed only AND operation"** — or the OR version — means the structure you have built supports only one relation. Restructure, or use **Combination**.

Condition examples:

| Goal                        | Condition                                      |
| --------------------------- | ---------------------------------------------- |
| only when the output is off | **Restriction value** — output `=` OFF         |
| only below 18 °C            | **Restriction value** — sensor `<` `18`        |
| only at full brightness     | **Restriction value** — dimmer `=` `100`       |
| only when two outputs agree | **Restriction object** — output A `=` output B |

For digital devices the values are ON and OFF; for analog, the percentage; for temperature, the measured value.

***

## 18.5 Virtual wires

Counted separately from ordinary wires in **Prefernces** (**Wires count** and **VirtualWires count**).

***

## 18.6 Practical advice

|                                       |                                                                   |
| ------------------------------------- | ----------------------------------------------------------------- |
| **Name every wire**                   | The list is unusable otherwise                                    |
| **One wire, several actions**         | Better than several wires from the same button                    |
| **Use the filter**                    | Faster than scrolling on any real project                         |
| **Mind wire order**                   | It decides what happens first when one event drives several rules |
| **Prefer groups over many consumers** | Change the group once instead of every wire                       |

***

**Next:** [Chapter 19 — Managers](/inels-bus/inels-design-manager-idm3/idm3-managers-reference.md).
