Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Interface for DNP3

DNP and other debugging messages

  • Last UpdatedNov 18, 2022
  • 3 minute read

The PI DNP3 interface can send the incoming and outgoing DNP messages to the console window (if running interactively) and/or to a log file. The DNP messages are written to a log file that is separate from the PIPC.log file. This log file is referred to as the RTU log file and the name of the log will be PIDNP3_ps_id_n.log where ps is pointsource of the interface instance, id is the interface identification, and n is the DNP address of the RTU.

The output of these messages is controlled by the /dnpdbg=level parameter in the start-up command file. The level is a 16-bit integer value that is expressed as a series of four hexadecimal numbers. Each bit of the debug flag turns on and off debugging in a different section of the interface. For example:

  • The least significant bit (the far right bit) is the bit that turns on and off writing the raw messages to the RTU log file. So, to turn on the logging of these messages, the /dnpdbg parameter must be set to /dnpdbg=0x0001.

  • The next bit to the left controls the writing of Data Link Layer descriptions of the message to the RTU log file. So, to turn on the logging of the Data Link Layer descriptions, the /dnpdbg parameter must be set to /dnpdbg=0x0002.

Each of the four hexadecimal digits represents 4 bits. From left to right, the 1st bit's value is 8, the 2nd bit's value is 4, the 3rd bit's value is 2 and the least significant bit's value is 1. To turn on multiple flags, add the value of the flags. For example, to turn on both the logging of the raw messages and the Data Link Layer explanations, the parameter must be set to /dnpdbg=0x0003.

Note: The 0x preceding the numbers in the above example denote the number is expressed as a hexadecimal number. The parameter can also be represented as a decimal number. The hexadecimal number 0x77 is equal to 119 in decimal. Therefore, the two parameters /dnpdbg=0x0077 and /dnpdbg=119 are equivalent. Although the two are equivalent and they will both work, OSIsoft recommends using the hexadecimal version because it is easier to determine which bits are set to 1.

The following table provides a list of debug bit values and what they control. For each bit, setting the bit to 1 will turn on that section of debugging messages and setting the bit to 0 will turn them off.

Bit Position (right to left)

Hex Value

Decimal Value

What the bit turns on and off

1

0x0001

1

Raw messages written to RTU log file

2

0x0002

2

Description of Data Link Layer written to the RTU log File

3

0x0004

4

Description of Transport Layer written to the RTU log File

4

0x0008

8

Description of Application Layer written to the RTU log File

5

0x0010

16

Raw messages written to the console window

6

0x0020

32

Description of Data Link Layer written to the console window

7

0x0040

64

Description of Transport Layer written to the console window

8

0x0080

128

Description of Application Layer written to the console window

9

0x0100

256

Start Up Procedures

10

0x0200

512

Load PI Point Procedures

11

0x0400

1024

Data Sent to PI (not including Heartbeat Points)

12

0x0800

2048

Scanning for Current Values

13

0x1000

4096

Communications Medium

14

0x2000

8192

Scaled Value

Caution: The debug messages are intended only for debugging. There is no mechanism for removing old RTU log files. If the debug messages are left on, the log files will become large and unmanageable in a short period of time.

TitleResults for “How to create a CRG?”Also Available in