> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/configure.md).

# Configure

What you set in QTech Workbench and DATRAN VI, the Ethernet port, supported devices, and how the RTU's data table works.

You set the XL4 Plus's address, ports, protocols and I/O in QTech Workbench. You set how DATRAN VI polls the site and logs its data in DATRAN VI. The RTU's control program, the DLP, is written in the QTech DLP IDE (integrated development environment).

{% hint style="info" %}
**Applies to:** XL4 Plus firmware v7.x, with QTech Workbench v2.x (V2.16 or later for firmware V7.19) and DLP IDE v4.x.
{% endhint %}

New to Workbench? Start with [Install Workbench](https://help.qtech.co.nz/qtech/qtech-workbench/install.md) and [Connect to a device](https://help.qtech.co.nz/qtech/qtech-workbench/connect.md). If Workbench itself won't install or can't find the RTU, see [Workbench troubleshooting](https://help.qtech.co.nz/qtech/qtech-workbench/troubleshooting.md).

## What goes where

| Set in          | What                                                                                                                                                                                                                                                 |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| QTech Workbench | RTU address, Ethernet, serial ports and the equipment on them, Modbus, DF1, DNP3, expansion modules, General Purpose I/O blocks, digital input modes, analogue calibration, battery alarm thresholds, licence, archive log, diagnostics and firmware |
| DATRAN VI       | The site's comms object and point counts, extended point count, RTU data logging and DLP autoload                                                                                                                                                    |
| DLP IDE         | The DLP, including copying values between real and telemetry points                                                                                                                                                                                  |

The XL4 Plus is also compatible with QTech XL4-Connect (version 1.x) Archive Log Download application for the XL4 Plus RTU.

## Save and load a configuration

* **Save:** **File > Save**. Keep a copy: you need it after a bootloader upgrade, which overwrites the configuration.
* **Load:** **File > Open**, then **Write to Device**, then restart the RTU.

For working offline and updating old configuration files, see [Save, open and update configuration files](https://help.qtech.co.nz/qtech/qtech-workbench/configuration-files.md).

## Set up the Ethernet port

The XL4 Plus can use DHCP, a static IP address, or a NetBIOS name. The default NetBIOS name is `xl4-` followed by the RTU serial number. You can change it in the **Configuration Name** field.

* Static IP addressing is preferable because depending on your network configuration NetBIOS over TCP may not be enabled, or it may not be routable (that is it won’t work unless you are on the same subnet).
* The **Current State** shows the current values greyed out as they are the read only, assigned values from DHCP.
* To test the connection, ping the RTU's name or IP address from a command prompt.

Then set up the link to DATRAN:

1. Assign the RTU address as used in Datran (e.g. 13).
2. Assign the TCP Port used by Datran (e.g. 4001).

## Supported devices and protocols

Set each port's protocol and settings in Workbench.

**RS232 ports (A and B)**

| Device                        | Protocol         | Baud rate          | Parity  | Flow control  |
| ----------------------------- | ---------------- | ------------------ | ------- | ------------- |
| Raw serial interface          | QTech QComms     | 300–115200         | N, O, E | RTS/CTS, none |
| PLC                           | DF1, Modbus      | 300–115200         | N, O, E | RTS/CTS, none |
| Modbus device (RTU as slave)  | Modbus ASCII/RTU | 300–115200         | N, O, E | RTS/CTS, none |
| Modbus device (RTU as master) | Modbus ASCII/RTU | 300–115200         | N, O, E | RTS/CTS, none |
| Q71 1200 bps radio modem      | QTech QComms     | 1200               | N, O, E | None          |
| Tait TM8xxx radio             | QTech QComms     | 2400, 14400, 19200 | N       | None          |
| CM910 cellular modem          | QTech QComms     | 9600               | N       | RTS/CTS, none |
| DNP3 master (RTU as slave)    | DNP3             | 9600–115200        | N, O, E | RTS/CTS, none |

**RS485**

| Device                        | Protocol         | Baud rate                  |
| ----------------------------- | ---------------- | -------------------------- |
| PLC                           | Modbus           | 300–115200 (19200 default) |
| Q23, Q26 expansion modules    | QTech IPB        | 9600                       |
| Modbus device (RTU as slave)  | Modbus ASCII/RTU | 300–115200                 |
| Modbus device (RTU as master) | Modbus ASCII/RTU | 300–115200                 |

**Ethernet**

| Device                                  | Protocol   |
| --------------------------------------- | ---------- |
| PLC                                     | Modbus TCP |
| Modbus device (RTU as client or server) | Modbus TCP |
| DNP3 master (RTU as slave)              | DNP3       |

Modbus, DF1 and DNP3 must be licensed. See [Licensing and features](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/licensing-and-features.md).

## How the data table works

The RTU keeps its values in a data table with three kinds of point:

| Kind      | Names              | What they are                                                     |
| --------- | ------------------ | ----------------------------------------------------------------- |
| Real      | RDI, RDO, RAI, RAO | The physical I/O, and I/O read from devices such as Modbus slaves |
| Telemetry | TDI, TDO, TAI, TAO | The values DATRAN and other masters read and write                |
| Notional  | NDI, NDO, NAI, NAO | Internal values, for example calculated in the DLP                |

(DI is digital input, DO digital output, AI analogue input and AO analogue output.)

* With no DLP loaded, or a DLP without the `telinp` and `telout` commands, the RTU copies real inputs to telemetry inputs, and telemetry outputs to real outputs, automatically.
* A DLP that uses `telinp` and `telout` stops the automatic copying. The DLP must then copy the values itself, for example with `CPDIG`.

The native I/O is 8 digital inputs, 8 digital outputs, 6 analogue inputs and 2 analogue outputs. To make room for more points, for example for a PLC, right-click **General Purpose I/O** in Workbench and select **Add IO Block**.

### Extended point count

The XL4 Plus can reference up to 65535 points of each type, not just 255. To use more than 255:

* In DATRAN, enable it in the site's comms object. See [Upgrade an XL4 to an XL4 Plus](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/upgrade-xl4-to-xl4-plus.md).
* To write a program (DLP) that uses the extended point count, an option needs to be set in the DLP-IDE. This is found on the menu bar at **Tools → Compiler Options** and check the box **Extended Point Count support**.

### Notional point count

If no (zero) Notionals are specified in the top level of the DATRAN-Slave RTUs notional point count, Workbench will, by default, attempt to show the first 16 points of the data type. To change this, go to **Comms Options > Datran > Datran Slave RTUs**. You only have to set the notional point count if you use slave RTUs.

## Digital input modes

* **Pulse counting:** for pulses as short as 20 ms.
* It is now an option in Workbench to configure digital input 8 for fast pulse counting (up to 40kHz).
* For the other digital inputs and for DI8 when fast counting is not selected, the pulse sampling interval is now configurable from 10ms to 100ms.

## Next steps

* [Communications](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/communications.md): radios, cellular, Ethernet, slave RTUs and expansion modules
* [Modbus](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/modbus.md)
* [PLC interfacing (DF1)](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/plc-interfacing-df1.md)
* [Data logging and the archive log](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/data-logging.md)
