# Bus Mux (`busMux`)

> Joins up to eight signals into one bus, a single wire that carries them all.

![busMux](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/busMux.svg)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/control/busMux/)

**Group:** Control · **Kind:** `{"block":"busMux","kind":"control"}`

## When to use it

Use it to carry the three phases (abc), the dq pair or a set of gate signals on one wire instead of several, so a control drawing stays readable. Element-wise blocks (gain, sum, PI, logic, dead time) act on every element of a bus at once, and Clarke, Park and the three-phase PWM take a bus on their first pin.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `in1` | signal | First element of the bus (or the first elements, when a bus arrives here). |
| `in2` | signal | The next element. |
| `in3` | signal | The next element (joined when n is 3 or more). |
| `in4` | signal | The next element (joined when n is 4 or more). |
| `in5` | signal | The next element (joined when n is 5 or more). |
| `in6` | signal | The next element (joined when n is 6 or more). |
| `in7` | signal | The next element (joined when n is 7 or more). |
| `in8` | signal | The last element (joined when n is 8). |
| `out` | signal | The bus: in1 first, then in2 and so on. |

## Common parameters

- `n`: Number of inputs joined into the bus, 2 to 8 (in1 … in8); a bus on an input adds all its elements (Default: 2)

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `n` | — | 2 |  | Number of inputs joined into the bus, 2 to 8 (in1 … in8); a bus on an input adds all its elements |

_Parameter descriptions are in English in both languages._

## Model

The block is wiring, not computation: before a run every bus is taken apart into its elements, each element is its own net, and an element-wise block on a bus becomes one copy per element. A circuit drawn with buses therefore simulates exactly as the same circuit drawn with separate wires. A bus on an input adds all its elements, so two buses of three make one of six. A bus is drawn thicker than a wire, with its width beside a slash.

## Common mistakes

- Only element-wise blocks and the first pin of a pin group (the a, b, c of Clarke, Park and the three-phase PWM, with b and c left open) take a bus. Any other block, and every electrical pin, reports the bus as an error; split it with a Bus Demux first.
- A bus fed back into its own mux never settles and is an error. Feed a signal back through the element-wise block that computes it, not through the mux that builds the bus.

## Datasheet and sources

There is no datasheet. Set `n` to the number of inputs you wire, 2 to 8; inputs past `n` are hidden while open.

## Example

Open the example with the command `file.openExample` and the name `demo:busMux`.

---
Generated by `cargo xtask reference` from the usage texts and parameter specs. Do not edit by hand.
