> 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/communications.md).

# Communications

Ports and wiring, radios, expansion modules, and links to cellular, dual failover and store and forward.

The XL4 Plus has two RS232 ports, an RS485 port, an Ethernet port and two USB ports. It can talk to DATRAN over radio, Ethernet or cellular, and to PLCs, instruments, expansion modules and other RTUs. You set each port's protocol in QTech Workbench.

{% hint style="info" %}
**Applies to:** XL4 Plus, firmware v7.x. For the devices and protocols each port supports, see [Configure](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/configure.md).
{% endhint %}

## In this section

* [Dual failover comms](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/communications/dual-failover-comms.md): Ethernet to DATRAN, with a radio taking over if Ethernet fails
* [CM910 4G cellular modem](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/communications/cm910-cellular-modem.md): connect to DATRAN over the cellular network with a [CM910 Cellular Modem](https://help.qtech.co.nz/datran/datran-telemetry/cm910-cellular-modem.md)
* [Slave RTUs and store and forward](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/communications/slave-rtus-store-and-forward.md): pass DATRAN traffic on to up to eight slave RTUs

## Which port for what

| Port    | Where                    | Use                                                                                                          |
| ------- | ------------------------ | ------------------------------------------------------------------------------------------------------------ |
| RS232-A | Q04 Plus processor board | Radios, modems, PLCs and other serial devices                                                                |
| RS232-B | Q22 I/O board            | Radios, modems, PLCs and other serial devices. The MU, Rx, KY and TX lights show this port's radio activity. |
| RS485   | Side panel               | Expansion modules, Modbus, long-distance high-speed links                                                    |
| ETH     | Side panel               | DATRAN base station, Modbus TCP, DNP3                                                                        |
| CNFG    | Side panel               | QTech Workbench: configuration, diagnostics, firmware                                                        |
| USB     | Side panel               | USB drive for firmware updates and log downloads                                                             |

## RS485 port

1. To terminate the RS485 lines with 120 Ω, close jumper **A** of **485TERM** on the processor board. Don't fit jumper B.
2. On a multi-drop network, terminate only the devices at the two ends. Up to 32 devices are allowed.
3. It is recommended that a surge protection device be fitted on any exposed cable runs or runs exceeding 200 meters in length.

|                    | Value                |
| ------------------ | -------------------- |
| Connector          | RJ12                 |
| Termination        | 120 Ω, built in      |
| Galvanic isolation | 2500 V               |
| Devices            | Up to 32, multi-drop |
| Line length        | 1000 m               |

| Pin | Function          |
| --- | ----------------- |
| 1   | Not used          |
| 2   | Not used (yellow) |
| 3   | 485 + (green)     |
| 4   | 485 – (red)       |
| 5   | Ground (black)    |
| 6   | Not used          |

![RJ12 plug pin numbering](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2FHQPz4RwQbtyswquvXsJR%2Fxl4plus-rj12-pins.png?alt=media)

{% hint style="warning" %}
The RS485 socket looks like the one on the older Q03 RTU, but the plugs aren't the same. Use the 6-contact RJ12 plug in the XL4 Plus. The older 4-contact RJ10 plug goes in the expansion module (Q23, Q26). Forcing a Q03 plug into the XL4 Plus can damage the socket.
{% endhint %}

## RS232 ports

Both RS232 ports are 8-way RJ45 sockets: RS232-A is on the processor board and RS232-B on the I/O board.

* Set each port's protocol and settings in Workbench.
* In electrically noisy places, use screened cable and keep it short. The maximum length is 15 m; beyond that, comms are unreliable.
* Jumper J23 on the Q22 board can put +V on pin 8 of RS232-B, for the Q71 external 1200 bps modem. See [Q71 1200 bps radio modem](https://help.qtech.co.nz/datran/datran-telemetry/radios/q71-radio-modem.md).
* For the cable that connects each radio, modem or PLC, see [Cables between radios and RTUs](https://help.qtech.co.nz/datran/datran-telemetry/planning-and-design/cables-between-radios-and-rtus.md).

| Pin | Function |
| --- | -------- |
| 1   | DTR      |
| 2   | RTS      |
| 3   | CTS      |
| 4   | Ground   |
| 5   | RXD      |
| 6   | TXD      |
| 7   | DCD      |
| 8   | RI       |

![RJ45 plug pin numbering](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2FdMKpKITpnZj6UGmgVN6K%2Fxl4plus-rj45-pins.png?alt=media)

## Ethernet port

The **ETH** port is 10/100BASE-T with automatic polarity reversal, so you don't need a crossover cable for a direct connection. Use it for DATRAN (QComms), Modbus TCP or DNP3. The maximum cable length is about 30 m.

* The orange LED is the Link LED and turns on when a good link is established then flashes off for Ethernet traffic.
* The green LED is the Speed LED and turns on for 100 MBit connections and off for 10 MBit connections.

| Pin        | Function |
| ---------- | -------- |
| 1          | Tx +     |
| 2          | Tx –     |
| 3          | Rx +     |
| 6          | Rx –     |
| 4, 5, 7, 8 | Not used |

To set up the address and DATRAN link, see [Configure](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/configure.md).

## USB ports

* **CNFG (Type B):** connect QTech Workbench for configuration, diagnostics and firmware. No setup needed. Maximum cable length 5 m. Bootloader upgrades also use this port, with the ISP jumpers fitted.
* **USB (Type A host):** insert a USB drive (FAT32) to update the application firmware or, on V7.18 and later, to copy the RTU log. No jumpers needed. See [Update the firmware](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/update-firmware.md).

## Radios

The XL4 Plus supports [Tait TM8xxx radios](https://help.qtech.co.nz/datran/datran-telemetry/radios/tait-radios.md) on either RS232 port (QComms protocol, 2400, 14400 or 19200 baud, no parity, no flow control), and the [Q71 1200 bps radio modem](https://help.qtech.co.nz/datran/datran-telemetry/radios/q71-radio-modem.md).

## Expansion modules

Q23 and Q26 expansion modules add I/O over the RS485 port, using QTech's IPB protocol at 9600 baud.

* Set each module's address on its DIP switches, then add the modules in Workbench's expansion modules category. Tick **Enabled** and choose **RS485**.
* Connect each module's **C** input to the RTU's **O/P** terminal. The modules power down when the RTU's supply drops too low.
* Modules can be chained over [QDR](https://help.qtech.co.nz/datran/datran-telemetry/radios/qdr-900mhz-digital-radio.md) radio links. Allow longer gap times: see [Expansion modules aren't responding](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/troubleshooting/expansion-modules-not-responding.md).

## DNP3

The XL4 Plus can be a DNP3 outstation (slave) on an RS232 port or Ethernet. DNP3 units are sold and licensed as a separate model. See [Licensing and features](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/licensing-and-features.md).
