I’m trying to communicate with the OpenPLC Linux SoftPLC via pydnp3. In this setup the SoftPLC is operating as the outstation and my code in pydnp3 is operating as the master.

There are a few ways that you can do a on-shot read from the device (remembering that all reads are async). The documentation for pydnp3 says something like the following:

Function Usage
Scan A scan using a vector of headers.
ScanAllObjects A scan for all objects with the specified group/variation pair.
ScanClasses A scan for all matching classes.
ScanRange A scan of all objects with the specified group/variation pair between indices.

To understand what these actually do, we need to get through the jargon.

## Jargon

Point Types

There are several important point types

• binary input
• counter input
• binary (status) output
• analog (status) output

which we can see some are inputs and some are outputs, but it is important to recognize that your view of whether something is an input or output depends on your frame of reference. Our frame is that of the DNP3 master. In general, we read from inputs and we write to outputs.

• Indices*

For each of the point types, DNP3 supports multiple instances. These instances are identified by a zero-based index. In some contexts, this is called the point number.

Group

Groups tell you something about the characteristics of the point type at the specified index. That is, binary input at index 2 might report itself in multiple ways, for example a current or frozen value. It could also be descriptive of the value - for example the number of binary outputs or the maximum binary output index. So, the group gives a semantic meaning to the data.

Variation

Another consideration is the variation. Variations tell you about the encoding of the value. In general, you can think of this as being the data type (e.g. a 16-bit integer), but DNP3 supports a more diverse set of encodings than what software developers are normally familiar with. The particular set of variations depends on the group, so you don’t have feedom to choose them aribtrarily - you need to select the correct pairing.