> 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-vi-scada/datran-dlp-ide/instruction-reference/io-types.md).

# I/O types and system registers

Every DLP register type and how many there are, the clock and system registers, comms fail flags, and labels.

Each register name is a type followed by a number, such as `RDIN12` or `NAOUT3`. These tables list the types, how many there are, and what they're for.

## How many registers there are

QTech RTU firmware later than version 7.0 (the XL4 Plus) supports the quantity of registers listed in the **Firmware 7.0 and later** column. RTUs with firmware earlier than 7.0 supported the number of registers listed in the **Earlier firmware** column. If the **Extended Point Count Support** check box in **Tools > Compiler Options** is checked, the valid indexes for IO points are in the \[1..65535] range rather than the usual \[1..255]. To use the extended point count this must be manually enabled in the comms object for the site in DATRAN: see [Extended point count](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/configure.md#extended-point-count).

| Type                          | Name                        | Firmware 7.0 and later | Earlier firmware | Where it goes                           |
| ----------------------------- | --------------------------- | ---------------------- | ---------------- | --------------------------------------- |
| Real digital input            | `RDIN`*x*                   | 65535                  | 256              | Real world                              |
| Telemetry digital input       | `TDIN`*x*                   | 65535                  | 256              | DATRAN                                  |
| Real digital output           | `RDOUT`*x*                  | 65535                  | 256              | Real world                              |
| Telemetry digital output      | `TDOUT`*x*                  | 65535                  | 256              | DATRAN                                  |
| Notional digital input        | `NDIN`*x*                   | 65535                  | 256              | DATRAN                                  |
| Notional digital output       | `NDOUT`*x*                  | 65535                  | 256              | DATRAN                                  |
| Extended digital input        | `EDIN`*x*                   | 0                      | 256              | Real world (LCD interface)              |
| Extended digital output       | `EDOUT`*x*                  | 0                      | 256              | Real world (LCD interface)              |
| Spare digital                 | `SPD`*x*                    | 65535                  | 225              | Internal to the DLP                     |
| Real analogue input           | `RAIN`*x*                   | 65535                  | 128              | Real world                              |
| Telemetry analogue input      | `TAIN`*x*                   | 65535                  | 128              | DATRAN                                  |
| Real analogue output          | `RAOUT`*x*                  | 65535                  | 128              | Real world                              |
| Telemetry analogue output     | `TAOUT`*x*                  | 65535                  | 128              | DATRAN                                  |
| Notional analogue input       | `NAIN`*x*                   | 65535                  | 128              | DATRAN                                  |
| Notional analogue output      | `NAOUT`*x*                  | 65535                  | 128              | DATRAN                                  |
| Extended analogue output      | `EAOUT`*x*                  | 0                      | 128              | Real world (LCD interface)              |
| Extended analogue input       | `EAIN`*x*                   | 0                      | 128              | Real world (LCD interface)              |
| Spare analogue                | `SPA`*x*                    | 65535                  | 100              | Internal to the DLP                     |
| Timer started (digital)       | `TIMERS`*x*                 | 128                    | 128              | Internal to the DLP                     |
| Timer done (digital)          | `TIMERD`*x*                 | 128                    | 128              | Internal to the DLP                     |
| Timer count (analogue)        | `TIMERC`*x*                 | 128                    | 128              | Internal to the DLP                     |
| Pulse digital (configuration) | `PDIG`*x*                   | 184                    | 184              | Internal to the DLP                     |
| Pulse analogue                | `PANL`*x*                   | 24                     | 24               | Internal: pulse counts                  |
| Expansion pulse analogue      | `E1PANL`*x* to `E20PANL`*x* | 160                    | 160              | Internal: expansion module pulse counts |

Note that Spare Analogues `SPA100` to `SPA256` are reserved, and Spare Digitals `SPD225` to `SPD256` are also reserved.

Expansion pulse counts are only available in the following firmware revisions and above: Q03 Rev 5.10, Q25 Rev 4.10 and Q26 Rev 1.10.

### What each kind is for

* **Real** inputs represent the values that are physically present on the RTU input terminals. The values are read by the RTU once every 100 ms, but do not update while the DLP is executing. Real outputs represent the values that are being physically written to the RTU output terminals. These registers are updated as the DLP execution proceeds, but are not physically published to the real world terminals until the end of the DLP iteration.
* **Telemetry** inputs are the versions of the physical inputs that are transmitted to the base station, after being potentially modified by the DLP. It is the TELEMETRY inputs that trigger such actions as COS messages, SMS messages (on SMS RTUs) and event logging triggers. Telemetry outputs represent the values that are being transmitted from the base station as RDOs and RAOs.
* **Notional** registers are passed between the base station and the RTU and are intended for passing values that have no corresponding real world termination, such as a setpoint from the base for the DLP to use.
* **Spare** registers are used internally in the DLP to hold values and as temporary registers for performing complex calculations or logic sequences, such as flags, and to "remember" a value so that it can be used in the next iteration. They are not transmitted to the base station and are not visible from Q90 either.

For how real and telemetry points are copied, see the XL4 Plus [data table](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/configure.md#how-the-data-table-works).

## System digitals

| Name                      | Firmware 7.0 and later | Earlier firmware | What it shows                |
| ------------------------- | ---------------------- | ---------------- | ---------------------------- |
| `POLLRXD`                 | 1                      | 1                | Poll received                |
| `COMFAIL`                 | 1                      | 1                | Communication fail           |
| `BATLOW1`                 | 0                      | 1                | Battery low 1                |
| `BATLOW2`                 | 0                      | 1                | Not used                     |
| `CMFAIL`                  | 0                      | 1                | Comms module failure         |
| `E1CFAIL` to `E20CFAIL`   | 20                     | 20               | Expansion module comms fail  |
| `E1BATLOW` to `E20BATLOW` | 0                      | 20               | Expansion module battery low |

## System analogues

| Name                                                                    | What it holds                                                                                                                                                                      |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ANLACC1`, `ANLACC2`                                                    | Arithmetical results. See [The analogue accumulators](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/instruction-reference/analogue.md#the-analogue-accumulators). |
| `CKSEC`                                                                 | The current value of the seconds register (0-59)                                                                                                                                   |
| `CKMIN`                                                                 | The current value of the minutes register (0-59)                                                                                                                                   |
| `CKHOUR`                                                                | The current value of the hour register (0-23)                                                                                                                                      |
| `CKDOW`                                                                 | The current day of the week (1-7 = Sunday to Saturday)                                                                                                                             |
| `CKDATE`                                                                | The current date (e.g. if it was the 5th of December, CKDATE = 5)                                                                                                                  |
| `CKMTH`                                                                 | The current value of the month of the year register (1-12)                                                                                                                         |
| `CKYEAR`                                                                | The last two digits of the current year (e.g. in 2012, CKYEAR = 12)                                                                                                                |
| `UCKSEC`, `UCKMIN`, `UCKHOUR`, `UCKDOW`, `UCKDATE`, `UCKMTH`, `UCKYEAR` | RTU Clock Seconds, Minutes, Hours, Day of Week, Day of Month, Month Of Year and Year in UTC. DLP IDE V4.03 or later.                                                               |
| `LOG_USED`                                                              | Number of bytes used in the data logging buffer                                                                                                                                    |
| `TEMPERATURE`                                                           | RTU CPU Board Temperature in units of Degrees Centigrade (e.g. 27 = 27 Degrees). DLP IDE V4.01 or later.                                                                           |
| `VOLTAGE`                                                               | RTU Supply Voltage in units of Volts, multiplied by 10 (e.g. 135 = 13.5V). DLP IDE V4.01 or later.                                                                                 |

{% hint style="info" %}
**Which time does the clock use?** For firmware version 7.07 and earlier the time is in UTC. Firmware version 7.08 and later all use local time as determined by DATRAN. On older RTUs, `SPA48` is used for battery voltage in 100mV steps and can be read from but not written to; on the XL4 Plus, the `VOLTAGE` keyword replaces `SPA48`. See [Port an XL4 site to the XL4 Plus](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/upgrade-xl4-to-xl4-plus/port-xl4-site.md#dlp-changes).
{% endhint %}

## Comms fail flags

In this topic, EXCFAIL flag stands for expansion communication failure flag e.g. `E1CFAIL`, `E2CFAIL`, etc.

1. EXCFAIL flags for IPB (Intelligent Peripheral Bus) objects and the `CMFAIL` flag are set when the applicable module has not responded to 5 successive polls from the RTU.
2. EXCFAIL flags for IPB objects and the `CMFAIL` flag are cleared every time the applicable module responds to a poll from the RTU.
3. EXCFAIL flags that apply to Comms Slaves are set when the Comms Module determines there is a comms fail to that module according to the configuration entered in that comms module.
4. All EXCFAIL, `CMFAIL` and `COMFAIL` flags are cleared on RTU boot-up.
5. All EXCFAIL and `CMFAIL` flags are cleared every time a change is made to the expansion module configuration of the RTU.

Prior to firmware version 5.11, the IPB error LED only blinks if all configured IPB modules fail to respond. From firmware version 5.11 and beyond, the LED will flash if any module fails to respond.

## Labels

| Labels                 | Quantity | Use                                                                                                                                                                       |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LABEL1` to `LABEL255` | 255      | Use in program for jumps. See [Jumps and labels](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/instruction-reference/digital-logic.md#jumps-and-labels). |
