Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

DNP3 Master

Description

This section explains how to use the DNP3 master interface to connect with DNP3 slave(s) and exchange analog and binary data in both directions.
Many slaves can be connected to the same master interface.

Connections are performed when the model is loaded and depending on the configuration, data are retrieved by unsolicited responses or by polling (Event or Integrity polling).
Write operations (from master to slave) are performed at a configurable rate.

Only the TCP protocol is supported for now. Please refer to the Limitations section for more information.

See additional details in the Configuration and Connections sections.

Supported Features

The following is a list of the features supported by this driver:

  • Read and write analog data points
  • Read and write binary data points
  • Read double-bit binary data points
  • Read data points in polling modes or unsolicited responses mode
  • Connect to multiple slaves
  • Operate over TCP/IP
  • Configurable network interface
  • Configurable DNP3 link addresses
  • Configurable read (polling) and write rates

Configuration

The driver is entirely configurable via the RT-LAB GUI. Users can add, delete and duplicate DNP3 slaves to connect to analogs and binaries in order to quickly obtain the desired configuration.

General configuration

The first parameters to be configured are found below:

  • Use an RT core for asynchronous computation:
    • If set to true, the driver reserves a real-time CPU core for its communication system and is able to handle a bigger amount of slaves, phasors, analogs, and digitals.
    • If set to false, the communication system will default to core 0.
  • Verbose: If set to true, the entire configuration will be displayed during the loading of the model.
  • Protocol: Communication protocol that the DNP3 master will use to communicate with the DNP3 slave. Only 'TCP' is supported for now.
  • Link address: DNP3 link address of the master. The slave(s) has/have to be configured to wait for a connection from a master associated with this link address.

Slave configuration

By default, the driver is configured with one slave to connect to, which contains 2 analog inputs, 2 binary inputs, 2 analog outputs, and 2 binary outputs.

Each slave has multiple parameters:

  • Link address: DNP3 link address of the slave to be reached by the master.
  • Channel name: Name given to the DNP3 channel. It is only used to print information in the log file for debugging.
  • NIC name: The desired network interface name. By default, eth0 is used but the proper interface name should be selected based on the information given by the Linux command ifconfig. It is only required to use a different network interface than eth0 when better performances are required.
  • IP address: IP address of the DNP3 slave to be reached by the master.
  • TCP port: TCP port on which the DNP3 slave is waiting for a connection.
  • Read mode: If the master is configured to read data points from a slave, it can be done either in event polling, integrity polling, or unsolicited response mode.

If this parameter is set to Event polling or Integrity polling, the master will request data from the slave at the rate specified by the Polling rate (ms) parameter.

Note that the Integrity polling read mode consists of a class 0 scan and acquires data that is not associated with either class 1, 2, or 3. Whereas for the event polling mode, only data of classes 1, 2, or 3 are taken into account.

If set to Unsolicited responses, the master will not ask for data but will expect the slave to report data points whenever their values change.

This last mode allows us to not waste network bandwidth when no data is changing. A polling mode must be used in case the slave does not support unsolicited responses.

  • Analog write rate (ms): Rate, in milliseconds, at which the master sends analog point values to the slave.
  • Binary write rate (ms): Rate, in milliseconds, at which the master sends binary point values to the slave.
  • Polling rate (ms)*: Rate, in milliseconds, at which the master requests analog and binary point values to the slave.

*This parameter is used only if a polling mode is set as read mode and if at least one data point is configured to be read by the master.

  • Promiscuous: Parameter denoting if the current slave interacts with other DNP3 master devices besides the one at hand.
    The enhancement of the speed of communication between the master and slave device is only possible when the slave interacts solely with the current master device.

This means that the purpose of this parameter is to check if this enhancement is possible.

Therefore, the possible values for this parameter are :

  • True, for when the user knows that the slave interacts with other master devices; in this case, the master sends values to the slave using the select - and-operate method
  • False, for when the user knows that the slave does not interact with other master devices; in this scenario, values are changed by the master using the direct-operated method
  • Unknown, for when the user does not have any information regarding the promiscuity of the slave device; in this situation, the select-and-operate method is used since it provides the protection needed for the data in the slave device's database.

Analog and binary configuration

Each slave contains a list for each of the data types (analog inputs/outputs, binary inputs/outputs, double bit binary inputs). These lists are configured depending on the desired address and the default value of each point.

For analog, binary, and double bit binary inputs, if Read mode is set to a polling mode (Event or Integrity), the master will issue read requests to the slave at the rate specified by the Polling rate (ms) parameter.

If Read mode is set to Unsolicited responses, it is the responsibility of the slave to report data to the master when a value change is detected.

Each item on the list must have a unique address and can have an initial value.

If the initial value parameter is omitted, the initial value of the data point is zero.

For analog and binary outputs, data points will be transmitted to the slave at the rate specified by the Analog write rate (ms) and Binary write rate (ms) parameters.

Each data has two parameters:

  • Address: DNP3 address of the analog/binary data point.
  • Default value: Initial value to be applied to this data point. This parameter is optional.

Connections

Once the driver has been configured as desired, the user will have to connect points in the model to points in the driver by using the designated RT-LAB GUI. This connection panel will show all the driver's and model's connectable points, once the model has been compiled. It is also possible to make connections to LabVIEW panels.

The driver's connectable points depend on the number of slaves and on the number of analog and digital inputs and outputs of each slave.

The following lists the driver connectable points for an input (analog, binary or double bit binary) and an output (analog or binary).

Analog / Binary / Double bit binary Inputs

Connectable NameDescriptionDirection
Analog input X, Binary input X or Double bit binary input XData valueFrom model
(X being the number of the point in its related configuration list)

Analog / Binary Outputs

Connectable NameDescriptionDirection
Analog output X or Binary output XData valueTo model
(X being the number of the point in its related configuration list)

The example model provided with RT-LAB is already packaged with connections between the driver and the model. It can be used to understand how the connections between the model and the driver should be done.

Limitations

The current version of the driver has the following limitations:

  • RS-232/RS-422/RS-485 and UDP communication links are not supported (TCP/IP only).
  • Polling on specific DNP3 group(s) is not supported.
  • Reading/writing with specific DNP3 variations is not supported.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter