Abstract:
This document describes and shows a basic example of using the DNP Slave Driver in Crimson.
Products:
CR3000 HMI / Graphite® HMI / Graphite® Controllers
Use Case:
Configuring a Red Lion device as a DNP Slave.
Required Software:
Crimson 3.1
Crimson Configuration
This document will cover the Ethernet and Serial specific settings and then close with Common settings between the two options. It is a companion to the driver information sheet, which can be found here.
Ethernet
1. Navigate to the Communications section.
2. Click on Network.
3. Click on Ethernet 1 (or Ethernet 2 depending on the application).
4. Referring to Figure 1, configure the Port Settings as needed for the application.
Figure 1.
5. Click on the first available Ethernet Protocol, Protocol 1 in the example shown in Figure 2.
6. Click the Pick button next to the Driver.
7. Under Manufacturer, select DNP3.
8. Under Driver, select IP Slave.
Figure 2.
9. Click OK.
10. Referring to Figure 3, set the Source Number of the Red Lion device.
Figure 3.
11. Click on PLC1.
12. Referring to Figure 4, configure the Device settings.
A. Destination Number: The address of the device that will be receiving the data from the Red Lion device.
B. IP Address: IP address of the device that will be receiving the data from the Red Lion device.
C. TCP Port: TCP Port to use for DNP3 communications.
D. UDP Port: TCP Port to use for DNP3 communications.
E. Connection Timeout: The amount of time that the system will wait when attempting to establish a socket connection.
F. Transaction Timeout: The amount of time the system will wait for a response to a transmission. If there were previous communications, three attempts of the same transmission will be attempted before determining a communications error and moving on to the next device.
G. TCP Keep Alive: The interval at which the link status should be requested or reported.
Figure 4.
Serial
1. Navigate to the Communications section.
2. Click on the serial port to configure, RS-485 Comms Port in the example shown in Figure 5.
3. Click the Pick button next to the Driver.
4. Under Manufacturer, select DNP3.
5. Under Driver, select Slave.
Figure 5.
6. Click OK.
7. Referring to Figure 6, set the Source Number of the Red Lion device and configure the Port Settings.
Figure 6.
8. Click on PLC1.
9. Referring to Figure 7, configure the Device Settings.
A. Destination Number: The address of the device that will be receiving the data from the Red Lion device.
B. Transaction Timeout: The amount of time the system will wait for a response to a transmission. If there were previous communications, three attempts of the same transmission will be attempted before determining a communications error and moving on to the next device.
C. Link Status Interval: The interval that the link status should be requested or reported. A value of 0 will disable this feature.
Figure 7.
Common Settings
The following settings, shown in Figure 8, are common between both the Ethernet and Serial versions of the DNP3 Slave driver.
Figure 8.
1. Event Mode Configuration: Crimson allows selection of Event Modes and Event Buffer Limits for each available data item associated with solicited events. Specify which active events should be sent in response to an event request.
A. All Events: All events since the last event request (up to the Buffer Limit)
B. Most Recent Event Only
2. Event Buffer Limits: The unit has a limited amount of memory, these settings allow one to choose how many events for each data type should be buffered. Red Lion supports Event Buffer sizes up to 32000 events for each data item.
3. Event Buffer Full Mode: Specify what to retain when the buffer(s) are filled (Crimson 3.1 only).
A. Oldest Events: Keep the oldest events, discarding newer events.
B. Most Recent Events: Discards older events once the buffer(s) are filled.
4. Analog Input Event Calculation: Specify what to return when an Analog Input event is requested. Since Analog Input events can be “filtered” when coupled with an Analog Input
Deadband value, Analog Input Events includes a “Current Value Only” mode setting.
A. Current: Respond with the current analog value.
B. Last Reported Event: Respond with the last reported analog event.
Usage
Exposing Data
1. Click on PLC1.
2. Scroll to the bottom of the Editing pane.
3. Click the Add Gateway Block link.
4. Referring to Figure 9, click on Block 1.
Figure 9.
5. Select the appropriate Data Item for the application, BI Binary Inputs in this example.
6. Select the first element to expose, 0 in this example.
7. Choose 0-Current Value from the drop-down menu.
8. Click OK.
9. Referring to Figure 10, set the block size as appropriate, 5 in this example.
Figure 10.
10. Set the Direction as needed for the application/Data Item.
A. G07 (device being programmed) to Device will be outgoing data, as shown in this example.
B. Device to G07 (device being programmed) will be incoming data.
NOTE: 0-Current Values items are READ-ONLY.
11. Referring to Figure 11, click on the first address below the block, BI00000 in this example.
12. Click on Data Tags in the Resource Pane.
13. Drag the tags from the Resource Pane on to the register they will be associated with in the Navigation Pane.
Figure 11.
14. Repeat step 13 as needed.
15. Repeat steps 1 through 14 for 1-Flags, 2-TimeStamp, and 3-Class as needed.
Available Data Types
Data Item | DNP3 Object Group | DNP3 Event Group |
Binary Inputs | 1 | 2 |
Double-bit Inputs | 3 | 4 |
Binary Outputs | 10 | 11 |
Binary Outputs | 12 – Latch ON/OFF only* | 13 |
Counters | 20 | 22 |
Frozen Counters | 21 | 23 |
Analog Inputs | 30 | 32 |
Analog Input Deadband | 34 | - |
Analog Outputs | 40 | 42 |
Analog Outputs | 41 | 43 |
* Complementary latch point model only supported in Crimson 3.1 or later.
Data Attributes
Current Value or Control – Represents the present value.
Flags – Bit mask indicating status. Bit 0 indicates online status and will automatically be sent to the master device. The remaining bit mask definition is as follows:
Binary items
Bit 1 – Restart
Bit 2 – Communications Lost
Bit 3 – Remote Forced
Bit 4 – Local Forced
Bit 5 – Chatter
Counters
Bit 1 – Restart
Bit 2 – Communications Lost
Bit 3 – Remote Forced
Bit 4 – Local Forced
Bit 5 – Rollover
Analogs
Bit 1 – Restart
Bit 2 – Communications Lost
Bit 3 – Remote Forced
Bit 4 – Local Forced
Bit 5 – Check Reference
Timestamp – The date and time associated with the last value change. Please use Crimson 3.0+ Time and Date format option using a Data Type of addrLongAsLong. Timestamps are read-only.
Class – Item used to assign the desired DNP3 class 0, 1, 2 or 3 for data items associated with events.
Accessing 64-bit Values
1. Navigate to the Data Tags section.
2. Create a new Numeric tag.
3. Referring to Figure 12, change the Extent to Array.
Figure 12.
4. Set the Extent to 2.
5. Navigate to the Communications section.
6. Click on the device under the DNP3 driver, PLC1 in this example.
7. Add a gateway block as described in the Exposing Data section above.
8. Set the Start Address to a 64-bit Value, AIL as shown in Figure 13.
Figure 13.
9. Referring to Figure 14, set the Block Size to an EVEN number, 6 in this example. Observe that the addresses appear to be duplicated in the block, this is due to the fact that each address block is 32-bits.
Figure 14.
10. Right-click on the array created in Step 2, Tag1 in this example.
11. Referring to Figure 15, choose Toggle Array.
Figure 15.
12. Drag the array elements to the block, element 0 to the first address, element 1 to the second, as shown in Figure 16.
Figure 16.
13. Refer to the Crimson 3.x Reference manual, click Help-Reference, for the functions relating to 64-bit conversion. These functions contain R64 in their name.
Events
Unsolicited Events will be sent upon a change in value of a data item provided:
1) The master device has enabled unsolicited messages.
2) Either the master or the user has assigned a non-zero class to that data item.
Solicited Events will be sent upon a Report By Exception (RBE) or a Change Event request from the master device for DNP3 data items set to a non-zero class according to the mode and buffer limit configured in the Device Settings. The event buffer is cleared or reset upon each response to an event request. If the number of events have reached the Event Buffer Limit prior to an event request events are lost according to the Retain device setting and the master device will be notified in the response to the next event request.
Analog Input Events may be “filtered” or reduced by using an Analog Input Deadband value. The Analog Input Deadband must be of the same index and type as the Analog Input producing the event. When the Analog Input Deadband is set to a non-zero value the associated Analog Input will only report an event when the change in value is greater than the deadband value.
Block Direction
Flags: (Red Lion model) to Device
Class: (Red Lion model) to Device
TimeStamps: Device to (Red Lion model)
CurrentValue: (Red Lion model) to Device
Control: Device to (Red Lion model)
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement