---
title: "Domat R312/R313"
description: "Control 8 triac PWM outputs for floor heating valves and thermal actuators via Modbus RTU. TapHome integration template for Domat R312/R313."
url: "https://taphome.com/en/compatibility/domat-m312-pwm/"
language: en
lastmod: 2026-10-08
generator: hugo
ai:
  topics: ["modbus-rtu","i/o-module","rs485","pwm","hvac","floor-heating","din-rail","triac"]
  questions: ["How to integrate Domat R312/R313 with TapHome?","What does the Domat M312 PWM TapHome template control?","How to connect Domat R312 via RS-485 to TapHome?","How to set the Modbus address on Domat R312?","What is the difference between Domat M312 and R312?","How to configure PWM period for Domat R312 floor heating valves?"]
---

# Domat R312/R313

Communication: Modbus RTU

- [Domat R312 Product Page](https://www.domat-int.com/en/product/r312)

## Integration guide

The Domat R312 (24 V AC) and R313 (230 V AC) are 8-channel triac PWM output modules designed for HVAC applications such as floor heating distribution points and thermal actuator control. The modules communicate via Modbus RTU over an optically isolated RS-485 bus. The TapHome template exposes all 8 channels as independent dimmers with 0-100% duty cycle control (0.1% resolution).

The product was previously sold as M312/M313. The current R312/R313 models have an identical register map and are fully compatible with this template.

## Hardware connection

### Terminal assignments

![Domat R312/R313 terminal assignments and PCB layout](https://taphome.com/images/compatibility/domat-m312-pwm/terminals-pinout_hu_7c08f51877457924.jpg)

| Terminal | Function |
|----------|----------|
| **RS485 K+** | COM1 — serial link RS-485, terminal K+ (connect to A+/D+ on TapHome gateway) |
| **RS485 K-** | COM1 — serial link RS-485, terminal K- (connect to B-/D- on TapHome gateway) |
| **G** | Power supply 24 V AC/DC |
| **G0** | Power supply 24 V AC/DC |
| **TE** | Optional connection for shielding, technical ground |
| **GD (L)** | Power supply for outputs |
| **GDO (N)** | Power supply for outputs, common |
| **DO1** | Output 1 |
| **GDO (N)** | Power supply for outputs, common |
| **DO2** | Output 2 |
| **DO3** | Output 3 |
| **GDO (N)** | Power supply for outputs, common |
| **DO4** | Output 4 |
| **DO5** | Output 5 |
| **GDO (N)** | Power supply for outputs, common |
| **DO6** | Output 6 |
| **DO7** | Output 7 |
| **GDO (N)** | Power supply for outputs, common |
| **DO8** | Output 8 |

**LED indication:**

| LED | Function |
|-----|----------|
| **TxD** (red) | RS-485 transmitting data at COM1 (flashing: transmitting; OFF: no data traffic) |
| **PWR** (green) | Power (ON: power OK; OFF: no power applied, weak or damaged power supply) |

**DIP switches** (micro DIP switches next to RS-485 terminals):

| Switch | Function |
|--------|----------|
| **BUS END** | Both ON = 120 Ω bus termination; enable on the first and last device on the bus |
| **INIT** | If ON at power-up, configuration parameters are reset to factory defaults |
| **USR** | User-defined in customer configuration |

### Wiring diagram

![Domat R312 and R313 connection diagrams](https://taphome.com/images/compatibility/domat-m312-pwm/wiring-r312-r313_hu_e23e4f12ed251ef2.jpg)

The R312 requires 24 V AC for both module power (G, G0) and output power (GD, GDO). The R313 uses 24 V AC for module power and 230 V AC for output power (L, N connected to GD, GDO).

> [!WARNING]
> If the module is the first or last device on the RS-485 bus, enable the 120 ohm termination resistor by short-circuiting the **BUS END** jumper (micro DIP switches next to the RS-485 terminals).

## Configuration

### Setting the Modbus address

The default Modbus slave address is **1** with communication parameters **9600 baud, 8N1**. To change the address or baud rate, use the **ModComTool** configuration software (free download from domat.cz).

Address and baud rate changes are stored in EEPROM and require a module restart to take effect.

| Parameter | Register | Default | Notes |
|-----------|----------|---------|-------|
| Slave address | H:4 LSB | 1 | Range 1–247, EEPROM, restart required |
| Baud rate | H:4 MSB | 13 (9600) | 10=1200, 11=2400, 12=4800, 13=9600, 14=19200 |

### INIT mode (factory reset)

If the module address or baud rate is unknown, the **INIT** DIP switch provides a recovery method:

1. Set the INIT DIP switch to ON
2. Power-cycle the module
3. The address resets to **1** and baud rate to **9600, 8N1**
4. Set the INIT DIP switch back to OFF after configuration

### PWM period configuration

The PWM period is common for all 8 channels. The TapHome template sets it during import via the **PWM time (ms)** parameter (default: 1000 ms). The module stores the period in 100 ms units.

Typical PWM periods for floor heating applications range from 10 to 120 seconds. A period of about 60 seconds works well for most thermal actuators, so change the import default of 1000 ms accordingly.

### Communication failure protection

The module supports per-channel safe state configuration in case of Modbus communication loss:

| Register | Function |
|----------|----------|
| H:6 LSB | Enable comm failure behavior per channel (bitmask) |
| H:6 MSB | Target output state on comm failure (on/off per channel) |
| H:7 LSB | Comm failure timeout in seconds (0 = disabled) |

When enabled, if no Modbus communication is received within the timeout period, the module automatically sets each output to its configured safe state.

## Device capabilities

### PWM dimmer channels

The template provides 8 independent PWM Dimmer devices (channels 1–8), each mapped to a holding register. Each dimmer:

- **Reads and writes** the duty cycle as a value 0–1000 (corresponding to 0.0%–100.0%)
- TapHome scales the value automatically (divides by 1000 for display, multiplies by 1000 for writes)
- The initialization script enables the channel by setting the corresponding bit in the PWM enable bitmask and configures the common PWM period

All 8 channels share the same PWM period but have independent duty cycle control, making the module suitable for multi-zone floor heating distribution.

### Additional capabilities

The R312/R313 modules also expose registers for direct binary on/off output control (bypassing PWM), force-override bitmask, output status readback, error status flags, internal module temperature monitoring, and firmware version readback. These can be added in a future template update.

## Troubleshooting

### No Modbus communication

1. Verify RS-485 wiring: K+ to A+/D+ and K- to B-/D- on the Modbus gateway
2. Check that the module is powered (green PWR LED should be ON)
3. Confirm the slave address matches the TapHome configuration — use ModComTool to verify
4. If the address is unknown, use the INIT DIP switch to reset to address 1 / 9600 baud
5. Check bus termination: enable BUS END on the first and last device on the bus

### TxD LED not flashing

The red TxD LED flashes when the module transmits data on RS-485. If it never flashes:

1. The module is not receiving valid Modbus requests — check the slave address
2. Verify the baud rate matches (default 9600)
3. Try swapping K+ and K- if polarity is reversed

### Outputs not responding

1. Verify the channel is enabled for PWM mode — the initialization script sets this automatically on first connection
2. Check that the output power supply (GD/GDO terminals) is connected and correct voltage (24 V AC for R312, 230 V AC for R313)
3. Check the fuse — accessible from the front of the module (F3.15A for R312, F1A for R313)
4. Verify the minimum load current (5 mA for R312) is met — some LED loads may be below this threshold

## Available devices 8

These devices appear in TapHome after import.

Domat R312/R313 Module

PWM Dimmer 1 Dimmer Read and write

Triac output channel 1 — duty cycle 0-100% with 0.1% resolution, controls thermal actuators or heating valves via PWM

Register: H:9 Int16 Unit: % numeric

Initialize

```taphome
MODBUSWNE(H, 8, Int16, $[PWMtimems]);MODBUSW(H, 7, Int16, MODBUSR(H, 7, Int16) | (((MODBUSR(H, 7, Int16) >> 8) | 1) << 8));
```

Read level

```taphome
MODBUSR(H, 9, Int16)/1000
```

Write level

```taphome
MODBUSWNE(H, 9, Int16, Le*1000)
```

PWM Dimmer 2 Dimmer Read and write

Register: H:10 Int16 Unit: % numeric

Initialize

```taphome
MODBUSWNE(H, 8, Int16, $[PWMtimems]);MODBUSW(H, 7, Int16, MODBUSR(H, 7, Int16) | (((MODBUSR(H, 7, Int16) >> 8) | 2) << 8));
```

Read level

```taphome
MODBUSR(H, 10, Int16)/1000
```

Write level

```taphome
MODBUSWNE(H, 10, Int16, Le*1000)
```

PWM Dimmer 3 Dimmer Read and write

Register: H:11 Int16 Unit: % numeric

Initialize

```taphome
MODBUSWNE(H, 8, Int16, $[PWMtimems]);MODBUSW(H, 7, Int16, MODBUSR(H, 7, Int16) | (((MODBUSR(H, 7, Int16) >> 8) | 4) << 8));
```

Read level

```taphome
MODBUSR(H, 11, Int16)/1000
```

Write level

```taphome
MODBUSWNE(H, 11, Int16, Le*1000)
```

PWM Dimmer 4 Dimmer Read and write

Register: H:12 Int16 Unit: % numeric

Initialize

```taphome
MODBUSWNE(H, 8, Int16, $[PWMtimems]);MODBUSW(H, 7, Int16, MODBUSR(H, 7, Int16) | (((MODBUSR(H, 7, Int16) >> 8) | 8) << 8));
```

Read level

```taphome
MODBUSR(H, 12, Int16)/1000
```

Write level

```taphome
MODBUSWNE(H, 12, Int16, Le*1000)
```

PWM Dimmer 5 Dimmer Read and write

Register: H:13 Int16 Unit: % numeric

Initialize

```taphome
MODBUSWNE(H, 8, Int16, $[PWMtimems]);MODBUSW(H, 7, Int16, MODBUSR(H, 7, Int16) | (((MODBUSR(H, 7, Int16) >> 8) | 16) << 8));
```

Read level

```taphome
MODBUSR(H, 13, Int16)/1000
```

Write level

```taphome
MODBUSWNE(H, 13, Int16, Le*1000)
```

PWM Dimmer 6 Dimmer Read and write

Register: H:14 Int16 Unit: % numeric

Initialize

```taphome
MODBUSWNE(H, 8, Int16, $[PWMtimems]);MODBUSW(H, 7, Int16, MODBUSR(H, 7, Int16) | (((MODBUSR(H, 7, Int16) >> 8) | 32) << 8));
```

Read level

```taphome
MODBUSR(H, 14, Int16)/1000
```

Write level

```taphome
MODBUSWNE(H, 14, Int16, Le*1000)
```

PWM Dimmer 7 Dimmer Read and write

Register: H:15 Int16 Unit: % numeric

Initialize

```taphome
MODBUSWNE(H, 8, Int16, $[PWMtimems]);MODBUSW(H, 7, Int16, MODBUSR(H, 7, Int16) | (((MODBUSR(H, 7, Int16) >> 8) | 64) << 8));
```

Read level

```taphome
MODBUSR(H, 15, Int16)/1000
```

Write level

```taphome
MODBUSWNE(H, 15, Int16, Le*1000)
```

PWM Dimmer 8 Dimmer Read and write

Register: H:16 Int16 Unit: % numeric

Initialize

```taphome
MODBUSWNE(H, 8, Int16, $[PWMtimems]);MODBUSW(H, 7, Int16, MODBUSR(H, 7, Int16) | (((MODBUSR(H, 7, Int16) >> 8) | 128) << 8));
```

Read level

```taphome
MODBUSR(H, 16, Int16)/1000
```

Write level

```taphome
MODBUSWNE(H, 16, Int16, Le*1000)
```

**Connection:** Modbus RTU • 9600 baud• 8N1 • Slave ID: $\[SlaveId]

Possible improvements (6)

- H:1 Digital Outputs Bitmask — Direct on/off control of outputs via bitmask (lower byte), bypassing PWM dimming
- H:2 Digital Outputs Force Bitmask — Force output state override bitmask — forces outputs regardless of other control
- H:3 Output Status Readback — Read actual output states as bitmask — useful for verifying output is active
- H:4 Error Status — Module error flags — overtemperature, communication loss, etc.
- H:5 Module Temperature — Internal module temperature for thermal monitoring
- H:6 Firmware Version — Read-only firmware version identifier

## Import parameters

Enter these values when you import the XML.

| Asked in the app | Default       |
|------------------|---------------|
| PWM time (ms)    | `1000`        |
| Slave ID         | `1`           |
| IP address       | `192.168.0.1` |

## Sources

- R312/R313 Datasheet
  
  [domat.blob.core.windows.net](https://domat.blob.core.windows.net/cms/ContentItems/1486_r312/l0Qzx7/domat_R312_R313_en.pdf) 2026-03-29
  
  [PDF](https://taphome.com/compatibility/devices/domat-m312-pwm/manufacturer/datasheet.pdf)
- M312/M313 Modbus Register Table (legacy)
  
  [domat-int.com](https://domat-int.com/wp-content/uploads/modbus/M312_M313modbus_en.pdf) 2026-03-29
  
  [PDF](https://taphome.com/compatibility/devices/domat-m312-pwm/manufacturer/modbus-table.pdf)
- R312/R313 Modbus Register Table (current)
  
  [domat-int.com](https://domat-int.com/wp-content/uploads/modbus/R312_R313_modbus_en.pdf) 2026-03-29
  
  [PDF](https://taphome.com/compatibility/devices/domat-m312-pwm/manufacturer/modbus-table-r312.pdf)
- Domat R312 Product Page
  
  [www.domat-int.com](https://www.domat-int.com/en/product/r312) 2026-03-29

Manufacturer documents are © their respective owners. They are provided as published by the manufacturer, for reference only.

## Related Documentation

- [Modbus Integration](https://taphome.com/en/compatibility/modbus-guide/)
- [Modbus](https://taphome.com/en/docs/integration/modbus/)
- [Simple configuration using templates](https://taphome.com/en/docs/integration/modbus/templates/)
- [Modbus scripts and prefetch](https://taphome.com/en/docs/script/modbus-scripts/)
- [Modbus functions](https://taphome.com/en/docs/script/modbus/)
- [Modbus data types](https://taphome.com/en/docs/script/modbus-data-types/)

