> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/configure-ios/communication-protocol-ios/dnp3-slave/dnp3-slave-example.md).

# DNP3 Slave Example

## Description <a href="#description" id="description"></a>

The **DNP3 Slave** example can be created by starting a new RT‑LAB project. From the menu bar, select **File > New > RT‑LAB Project**. Enter a name and location for your project, then click **Next**. From the available templates list, navigate to **IO > \_Generic\_ > DNP3\_Slave** and select **DNP3 Slave**, then click **Finish**. This example demonstrates how to use the DNP3 slave interface to communicate with a DNP3 master and exchange analog, binary, and double‑bit binary data. The main objective of this example is to show how to configure the DNP3 slave, receive data from a master device, and send updated values defined in the console subsystem.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-dcd724778ddcbcb3d93fdfccb02c404253e4a8ec%2FDR-rtlab-dnp3sl-ex.png?alt=media" alt="" width="383"><figcaption></figcaption></figure>

In this example:

* The model receives 2 analog, 2 binary, and 2 double‑bit binary values. These are displayed in the console subsystem.
* The model sends 2 analog, 2 binary, and 2 double‑bit binary values, which are defined in the console subsystem.

## Requirements <a href="#requirements" id="requirements"></a>

In addition to the requirements stated in the DNP3 slave **Requirements, Features & Limitations** section, this example requires an external DNP3 master to provide data to the DNP3 slave interface. The master can be any external tool, such as the [Triangle Communication Protocol Test Harness](https://www.trianglemicroworks.com/products/downloads) configured as a DNP3 master.

## Detailed explanation <a href="#detailedexplanation" id="detailedexplanation"></a>

This example illustrates the setup, configuration, and operation steps required to simulate a DNP3 slave that communicates with a DNP3 master.

### Using Triangle Communication Protocol Test Harness <a href="#usingthetrianglecommunicationprotocoltestharness" id="usingthetrianglecommunicationprotocoltestharness"></a>

The Triangle Communication Protocol Test Harness can simulate a DNP3 master on your workstation. Set the tool’s host IP address to `*.*.*.*`. This configuration allows the Test Harness to listen on all network interfaces of your workstation, making the DNP3 master accessible through your workstation’s IP address.

### Model preparation and configuration <a href="#modelpreparationandconfiguration" id="modelpreparationandconfiguration"></a>

1. Adjust the DNP3 slave interface parameters (TCP port, IP address, link addresses, read mode, etc.) if required.
2. Build the DNP3 Slave model.
3. Load and execute the model.
4. Then start the DNP3 master on the external tool.

## Simulation and results <a href="#simulationandresults" id="simulationandresults"></a>

Once communication is established, the DNP3 slave and DNP3 master begin exchanging data according to their configured read and control parameters.

Users can modify analog, binary, and double‑bit binary values in the master external tool, and these updates will appear in the model console, confirming that the DNP3 slave is correctly receiving data. Conversely, any values changed in the model console are reported back to the master external tool, demonstrating that the slave correctly transmits data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/configure-ios/communication-protocol-ios/dnp3-slave/dnp3-slave-example.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
