# Configuring the Backplane

The Backplane Configuration screen defines which module is fitted in each slot of the rail. This declaration generates the project's I/O map, which provides every address referenced by the program.

Open it from **Device → Backplane Configuration**, with **SLM-RP4** selected as the target device.

```{image} ../../images/editor/backplane-configuration.png
:alt: The Backplane Configuration screen
:width: 750px
:align: center
```

## The screen

**Left Panel:** the slot list, in rail order. Each card shows the slot number, the
module name, and a summary of its channels (`8DI / 8DO`). Below the last slot is 
the **+ Add module** button.

**Right Panel:** the detail panel for the selected slot with a module picker, the
module's description and specifications, its photo, any per-module configuration
form, and the **I/O Mapping** table.

**Top:** Clear All Slots button, which empties the configuration after
confirmation.

## Adding a module on the backplane

1. Click **+ Add module** to append a slot.
2. Open the **Module** dropdown in the detail panel. It lists all eighteen
   supported modules and has a search box. Type `AI` or `RLY` to filter.
3. Pick the module fitted in that physical position.

Repeat for every module on the rail, in order, left to right, starting with the
one immediately beside the base.

```{image} ../../images/editor/backplane-slots-populated.png
:alt: The Backplane Configuration screen with several slots populated
:width: 750px
:align: center
```

**Remove module** clears a slot. Slots can also be reordered by dragging their
cards, which avoids retyping the stack when the order is wrong.

## The I/O Mapping table

Scroll the detail panel to **I/O Mapping**. Every channel the module offers is
listed with the address the editor generated for it:

| Channel | Type | IEC Address | Alias |
|---|---|---|---|
| DI1 | digitalInput | `%IX0.0` | |
| DI2 | digitalInput | `%IX0.1` | |
| … | | | |

Addresses are assigned automatically, in slot order. You do not choose them, and
they shift if you insert or remove a slot earlier in the stack. For this reason, use aliases rather than raw
IEC addresses for I/O allocation (see below).

### Aliases

The **Alias** column is free text. Give a channel a name here, like `Start_PB`,
`Motor_Run`, or `Tank_Level`, and it becomes available as a symbolic name in your
program instead of a raw address.

```{image} ../../images/editor/io-mapping-aliases.png
:alt: The I/O Mapping table with aliases filled in
:width: 194px
:align: center
```

`Start_PB` survives a module being inserted into slot 2 later; `%IX3.0` does
not.

## Per-module configuration

Discrete modules have no configuration parameters. Analog and temperature modules do. When a configurable module is selected, a **Configuration** form appears below the I/O Mapping table. The parameters available depend on the module and are labelled on the screen.

In addition to the module-specific parameters, analog modules have two settings that decide how their values reach the program.

**Reading Format** selects the data type:

| Option | Behavior |
|---|---|
| **Raw counts** (default) | Each channel is an integer count, as a `UINT` on `%IW` (inputs) or `%QW` (outputs). |
| **Engineering units** | Each channel is converted to the module's physical unit (volts, milliamps, degrees Celsius or Fahrenheit, depending on the module), as a `REAL` on `%ID` or `%QD`. |

**Counts Scaling** applies only to **Raw counts** and selects the range of those counts:

| Option | Behavior |
|---|---|
| **Module resolution** (default) | Counts are reported at the converter's native resolution: 0–8191 for a 13-bit input, 0–4095 for a 12-bit output. This matches the Python and C++ libraries. |
| **Rescaled to 0 - 65535** | Counts are stretched linearly across the full `UINT` range, whatever the module's native resolution. Useful for code shared with other OpenPLC hardware. |

```{admonition} Thermocouple burnout
:class: note

For thermocouple modules, the **Burnout Detection** setting determines what the channel reports when the thermocouple circuit opens, such as a broken wire or a disconnected probe. *Low* drives the reading to the bottom of the range; *High* drives it to the top. Choose the direction that drives the control logic toward its safe state: for a heating process, use *High*, so a broken sensor reads as over-temperature and turns the heat off rather than on. In either case, also monitor the channel's burnout status bit. See {doc}`../programming/examples/thermocouple-monitoring`.
```

## Next

{doc}`hal-settings`, covering how fast the backplane is scanned and what happens when it
faults.
