Section 8. Operation
Syntax
DNPUpdate (DNPSlaveAddr,DNPMasterAddr)
8.6.1.2.3 Programming for DNP3 Data Acquisition
As shown in CRBasic example
Implementation of DNP3
(p. 410),
program the
CR1000 to return data when polled by the DNP3 master using the following three
actions:
1. Place
DNP()
at the beginning of the program between
BeginProg
and
Scan()
.
Set COM port, baud rate, and DNP3 address.
2. Setup the variables to be sent to the master using
DNPVariable()
. Dual
instructions cover static (current values) and event (previous ten records) data.
o
For analog measurements:
DNPVariable
(
Variable_Name,Swath,30,2,0,&B00000000,0,0)
DNPVariable
(
Variable_Name,Swath,32,2,3,&B00000000,0,10)
o
For digital measurements (control ports):
DNPVariable
(
Variable_Name,Swath,1,2,0,&B00000000,0,0)
DNPVariable
(
Variable_Name,Swath,32,2,3,&B00000000,0,10)
3. Place
DNPUpdate()
after
Scan()
, inside the main scan. The DNP3 master is
notified of any change in data each time
DNPUpdate()
runs; e.g., for a 10
second scan, the master is notified every 10 seconds.
CRBasic Example 66.
Implementation of DNP3
'This program example demonstrates a basic implementation of DNP3 in the CR1000. The CR1000
'is programmed to return data over IP when polled by the DNP3 master. Essential elements
'of the program are as follows:
' 1. DNP() instruction is placed at the beginning of the program between BeginProg
' and Scan(). COM port, baud rate, and DNP3 address are set.
' 2. Variables are set up to be sent to the master using DNPVariable(). Dual instructions
' cover static data (current values) and event data (previous ten records). Following
' are the sets of dual instructions for analog and digital measurements:
' 'For analog measurements:
' 'DNPVariable(Variable_Name,Swath,30,2,0,&B00000000,0,0)
' 'DNPVariable(Variable_Name,Swath,32,2,3,&B00000000,0,10)
' 'For digital measurements (control ports):
' 'DNPVariable(Variable_Name,Swath,1,2,0,&B00000000,0,0)
' 'DNPVariable(Variable_Name,Swath,32,2,3,&B00000000,0,10)
' 3. DNPUpdate() is placed after Scan(), inside the main scan. The DNP3 master is
' notified of any change in data each time DNPUpdate() runs. For example, for a 10
' second scan, the master is notified every 10 seconds.
410
Summary of Contents for CR1000
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 40: ......
Page 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Page 96: ......
Page 98: ...98 ...
Page 302: ......
Page 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Page 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Page 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Page 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Page 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Page 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Page 478: ......
Page 506: ......
Page 536: ......
Page 636: ......
Page 642: ......
Page 644: ......
Page 676: ......
Page 677: ......