Scaling
- Last UpdatedNov 18, 2022
- 3 minute read
- PI System
- PI Interface for DNP3 3.3.1.38
- Interfaces
All data coming from a DNP 3.0 compliant device is one of four types: binary, 8-bit status, 16-bit integer, or 32-bit integer. The PI DNP3 interface supports scaling the 16-bit and 32-bit integer types. The scaling for these types adheres to one of the following formulas depending on the value of the PI point squareroot attribute. The following definitions describe the different variables of the formula:
-
value is the 16-bit or 32-bit value received from the RTU
-
def range is the default range and is equal to 65,536 (216) for 16-bit values and 4,294,967,296 (232) for 32-bit integer/short float values. Long float (64-bit real) values received from the RTU will be treated the same as 32-bit values due to limitations of the operating system
-
def min is the default minimum and it is equal to is -32,768 (-215) for 16-bit values and -2,147,483,648 (-231) for 32-bit integer/short float values. Long float (64-bit real) values received from the RTU are treated the same as 32-bit values due to limitations of the operating system.
-
instra_min is the instrument zero and is found in the PI point UserReal1 attribute
-
instra_ range is the instrument range and is equal to the PI point UserReal2 attribute
-
pispan is equal to the PI point attribute span
-
pizero is equal to the PI point attribute zero
Note: The default behavior of the PI DNP3 interface is to treat all integer values received from a DNP device as signed integers. If this is not the desired behavior, the squareroot attribute must be set to the appropriate value.
Examples of squareroot data handling:
-
Example 1: A DNP 3.0 compliant device is used to read and transmit the temperature of a beaker of water. The water temperature range is between 0o C and 100o C. The range of values from the device is between -10000 and +10000, where -10000 correspond to 0o C and 10000 corresponds to 100o C. To properly convert the value from the PLC to a temperature in o C, use the following settings:
pizero = 0 pispan = 100
instr_min = -10000 instr_range = 20000
squareroot = 6 -
Example 2: A DNP 3.0 compliant device is used to measure the volume of liquid in a tank. The results of the measurement are transmitted as a 16-bit signed integer with the minimum (0x8000 hex or -32768) being equal to zero gallons and the maximum (0x7FFF hex or 32767) being equal to 250 gallons. To properly convert the value to the number of gallons, use the following settings:
pizero = 0 pispan = 250
squareroot = 4 -
Example 3: The 16-bit analog inputs received from a device should be treated as unsigned integers so that the range of values is from 0 to 65,536 instead of -32,768 to 32,767. To properly store values larger than 32767 use the following setting:
squareroot = 3
-
If any of the above settings result in dividing a number by 0, the formula will be ignored and an error message will be written to the pipc.log file once. The raw values are stored in the PI Data Archive.