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

# DATRAN DLP IDE

Windows software for writing, compiling and loading DLPs, the control programs that run inside DATRAN RTUs.

The DATRAN DLP IDE (integrated development environment) is a sophisticated package to design and develop DLP control programs for DATRAN RTUs. A DLP (downloadable program) is the control program that runs inside a DATRAN RTU (remote telemetry unit), such as the [XL4 Plus](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu.md). You write the DLP as source code or as ladder logic, compile it, load it into the RTU, and watch it run.

![The DLP IDE main window, with the Module Connectivity pane on the left and a new source file on the right](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2FU39psA5HwSgNcBxKNpeA%2Fdlp-ide-main-window.png?alt=media)

{% hint style="info" %}
These pages are for DLP IDE V4.05, with the help for V4.3. Where earlier versions differ, the page says so.
{% endhint %}

## What it does

* Two different editors for ASM and LADDER editing.
* Colour syntax highlighting for ASM and DLP code in both editors.
* ASM editing - Additional keywords to provide more powerful instructions.
* LADDER editing - Simple implementation of ladder logic similar to that used for PLC programming.
* Multiple ASM code files may be edited simultaneously.
* Integrated compiler, code can be compiled at the touch of a button.
* Upload DLP - Upload a compiled DLP to the module. Download DLP - Download the DLP from the module. Clear DLP - Erase the DLP in the module. Enabled DLP - Run the DLP in the module. Disable DLP - Stop the DLP in the module.
* Use the Watch List to debug your DLP.
* Synchronize RTC - Synchronize the attached module's real time clock (RTC) to this computer's time and date. Set RTC - Manually set the attached module's real time clock (RTC).

## How a DLP fits in the RTU

In a normal RTU without a DLP all real inputs are connected to the telemetry inputs and all telemetry outputs are connected to the real outputs. There is no manipulation of signal either way and so the RTU firmware copies the real signal directly to telemetry signals. With a DLP input and output signals may be cut and appropriate logic placed in between.

This logic may be as simple as reconnecting the signals, or as complicated as adding timers to OR'ed inputs before relaying a signal to an output.

![The DLP sits inside the RTU between the telemetry I/O, which talks to the DATRAN base station, and the real I/O, which connects to the real world and expansion modules](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2F28gJLRvqjARPUvGaWU3Y%2Fdlp-ide-rtu-dlp-methodology.png?alt=media)

The main body of the DLP lies between the PROGSTART and PROGEND statements. This part of the DLP is executed sequentially the whole time the RTU is turned on. The RTU uses two accumulators, one for digital control (TRUE or FALSE) and one for analog control (values between 0 and 65535). The result from an instruction is stored in the accumulator for action in the following instructions, e.g.

```
TCE RDIN1    ; Is real digital input 1 on? The answer goes in the accumulator.
EC  RDOUT1   ; Copy the accumulator to real digital output 1.
```

TCE RDIN1 will test Real Digital Input 1. If it is ON, a TRUE value will be put into the accumulator. If it is OFF a FALSE value is put into the accumulator. The next instruction EC RDOUT1 will place the contents of the accumulator to Real Digital Output 1, thereby making Output 1 follow Input 1.

## What you need

| You need                | Details                                                                                                                                                                                                                                             |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A Windows PC            | In V4.04 an issue was fixed for Windows 10 installations which restrict access to the `%PROGRAMDATA%` folder.                                                                                                                                       |
| A licence               | DLP IDE is individually licensed to each machine. Before installing the software please ensure you have a license key from QTech. See [Install and license the DLP IDE](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/install.md). |
| A connection to the RTU | You will need a serial port on your computer and a RS232 serial cable. Plug one end of the RS232 serial cable to the serial port of your computer and plug the other end to the DIAG (diagnostic) port of the RTU.                                  |
| A DATRAN RTU            | See the table below.                                                                                                                                                                                                                                |

DATRAN DLP\_IDE (recommend running on a separate PC)

## Which RTUs it supports

| RTU                                                                                                 | What you need to know                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [XL4 Plus](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu.md) (firmware v7.x) | New Features in DLPIDE Version 4.1: Extended Point Count, which allows 65536 of most of register types to be used (valid indexes \[1..65535] rather than the usual \[1..255]). Battery Voltage. Board Temperature. Version 4.3: Added new registers for support the UTC time of the RTU (UCKSEC, UCKMIN, UCKHOUR, UCKDOW, UCKDATE, UCKMTH, UCKYEAR). V4.04 is an optional upgrade but is required to operate XL4 Plus RTUs connected to Modbus slave devices that implement 32-bit Floating-Point Modbus registers; see the release notice for XL4 Plus RTU Firmware v7.16. |
| [XL4](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-rtu.md) (Q04 firmware v6.x)       | Supported.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| eXcel (Q03) and older QRTUs                                                                         | Supported. The NCOSMASK command is only supported in firmware version v5.20 and above.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

## Start here

* [Install and license the DLP IDE](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/install.md)
* [Write your first DLP](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/your-first-dlp.md): a short program from start to finish
* [DLP self-help course](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/dlp-self-help-course.md): seven lessons, from first principles to jumps

## Use it

* [Source editor](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/source-editor.md): write a DLP as code, name your points, reuse code with macros
* [Ladder editor](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/ladder-editor.md): draw a DLP as ladder logic, or open an existing DLP as ladder
* [Compile and load a DLP into the RTU](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/compile-and-load.md): build, load, read back and test with the Watch List
* [Instruction reference](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/instruction-reference.md): every instruction and register

## Fix a problem

* [Troubleshooting](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/troubleshooting.md)
* [Common questions](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/common-questions.md)

## Reference

* [DLP IDE release notes](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/release-notes.md)
* [DLP IDE downloads](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/downloads.md)
