> 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/wrtu-wireless-rtu/add-to-datran.md).

# Add a WRTU to DATRAN

Add the WDR's USB channel and the WRTU site in DATRAN Browser, set the data points, and use pulse counting.

The device is added as a class of device when adding a new site. The WRTU uses the USB interface so before adding the site add a new channel for the USB interface which will also add a virtual com port.

{% hint style="info" %}
**Applies to:** DATRAN VI V6.77 or later. Please ensure DATRAN™ is updated to v6.77 (or above) before adding a WRTU - please contact QTech for the latest version. This page requires knowledge of the configuration and operation of DATRAN™.
{% endhint %}

## 1. Add a USB channel

The WRTU uses the USB interface so before adding the site add a new channel for the USB interface which will also add a virtual com port.

1. In DATRAN Browser, add a new USB channel. This also adds a virtual COM port.
2. When connected to DATRAN™ the device comm port assignment must be matched with the channel comms object Port name (e.g. COM35).

## 2. Add the site

1. Add the site by pressing the INS key (or right click on **Sites** and select **add node**).
2. Select the WRTU device and complete the configuration form. This will create the comms object. Default values will be added to the site when the WRTU is applied.
3. Assign the node to the USB channel and provide a device DATRAN™ address (range 1-239). The WRTU's Address setting is the DATRAN comms object address for the site.
4. Click **Apply RTU**.
5. Enable PUP if required.
6. Set RTU Active to True to enable the device to be polled periodically.

Double clicking the comms object for the site will bring up the node properties. Thereafter comms settings and frequency of polling or point count can be reconfigured.

## Data points

| Model   | Default points                                                      |
| ------- | ------------------------------------------------------------------- |
| WRTU-D  | RDI1–RDI3 (digital inputs), RDO1–RDO3 (digital outputs)             |
| WRTU-DA | RDI1–RDI2, RDO1–RDO2, RAI1 (analogue input), RAO1 (analogue output) |

DATRAN supports a new class of device (WRTU) and if the device is added to a DATRAN site it will be preconfigured with the data point count per a WRTU-D hardware device. If analogue data points are required, the DATRAN administrator can add these nodes per normal methods. The data points must correspond to the actual hardware. For example, RDI3 is not present in the WRTU-DA therefore it should not be configured for use in a DATRAN site for that device.

DATRAN supports the following messaging to the WRTU: poll, change of state (COS), power-up poll (PUP), and fixed and variable status.

## Count pulses

Any digital input can count pulses, for example from a flow meter.

1. In Workbench, set **Pulse Count Enable** to True for the input. See [Configure with Workbench](https://help.qtech.co.nz/datran/datran-telemetry/wrtu-wireless-rtu/configure-with-workbench.md).
2. In DATRAN, one NDO and one NAI are assigned to each digital input to be used as a pulse counter. NAI1 corresponds to assigning INP1 as a pulse counter, NAI2 to INP2 and NAI3 to INP3, respectively.

* Pulses are counted when a digital input is asserted (e.g. switch closure) then negated (switch open). The count occurs on the rising edge of the signal transition.
* Each count accumulates to a maximum value of 65535 (the count will roll over to 0 if this value is exceeded).
* Accumulated counts can be reset by writing a '1' to the corresponding notional digital output (NDO1, NDO2, NDO3).
* Configuring a digital input as a pulse counter automatically disables COS for that input to prevent excessive messaging to DATRAN™. The RDI and RDO can still be modified and polled.
* Pulses can be up to 10 Hz, with a minimum width of 10 ms.
