470 likes | 632 Views
Using the TOP Server DNP Driver Presenter: Boyce Baine, Sr. Applications Engineer. HMI/SCADA to RTU Connectivity for Water & Utilities via DNP 3.0. Agenda. Introduction DNP Overview TOP Server DNP Drivers Overview What is TOP Server
E N D
Using the TOP Server DNP DriverPresenter: Boyce Baine, Sr. Applications Engineer HMI/SCADA to RTU Connectivity for Water & Utilities via DNP 3.0
Agenda • Introduction • DNP Overview • TOP Server DNP Drivers Overview • What is TOP Server • Overview of DNP and how it differs from normal “polling” PLC drivers & protocols • Overview of Driver settings & configuration • Testing your configuration • Live Demo • Q & A & other Resources
What is DNP and Who Uses It? • DNP3 (Distributed Network Protocol) is a set of communications protocols used between components in process automation systems • It is primarily used for communications between a master station and RTUs or IEDs. • Originally designed for power distribution and transmission, DNP has found a home in water/wastewater, oil/gas and transportation.
TOP Server Gets You Connected! • http://www.toolboxopc.com/html/drivers_list.asp
TOP Server DNP Master Driver Suite Overview • Plugs in like any other TOP Server Driver • Licensed as an individual suite based on number of RTUs (10, 50, unlimited) • Will be included in the Power Distribution Suite (Coming in 2010) • Serial RS-232/422/485 or Ethernet connections • Supports DNP 3.0 Level 3 compliant slave devices • Ethernet Encapsulation supported which allows use of Cellular Radios & other encapsulation devices • Supports standard TOP Server protocol diagnostics • Serial driver supports Dial-Up Modems
Key Differences from other TOP Server Drivers • Key differences • DNP is a Synchronous Protocol • Unsolicited Messages & report by exception really helps efficiency with remote devices. • In proper DNP3 usage • Decoupled scan rates & separate scan loops for client/server and DNP master/slave • No relation between client items configured and what gets scanned by the driver layer • Demand Polling option • Allows for operation like a regular polling driver – however, you give up the benefits of the DNP protocol in terms of bandwidth utilization and report by exception. • Ethernet Encapsulation done at Channel level, not device level • Restart requirements • Dependency on proper slave device configuration is greater • Important to Understand • Timeout Settings • DNP Polling Settings • Your slave device configuration • Naming syntax of items and correlation with DNP slave documentation
DifferencesDNP is a Synchronous Protocol • Only one thing at a time can happen • Each command requires an acknowledgement, confirmed failure, or timeout before the master can move on to the next command • So things may never be as fast as other protocols! • Most serial protocols are this way- but DNP more so • The DNP stack queues up messages to be sent, so a command can spend time waiting in a queue inside the DNP stack- this is in addition to any internal TOP Server queues • Asking for too much too fast can be painful • However, due to the report by exception nature of DNP when properly used, it is very efficient for bandwidth utilization – only changes are sent • Proper use is: • Avoiding demand polling • Reasonable Integrity and Event Poll intervals for the amount of data your device sends and your connection speed
Important Learning Topic: Decoupling of Scan Rates – How Normal PLC drivers work • How things work with most drivers • Topic/Group scan rate drives the device polling rate Topic or Group Update Rate : 100 ms Driver to PLC Scan Rate: 100 ms HMI or Client App. DriverScan of PLC
Important Learning Topic: Decoupling of Scan Rates – How it works in DNP if used properly • Scan Rates are Independent – Completely! • If you use Demand Polling in DNP, then you end up making it work like a regular driver (see prior slide) and give up the report by exception efficiency of DNP! No linkage! Topic or Group Update Rate: 100 ms Driver to DNP Slave Scan Rates determined by Driver configuration Driver LayerData Buffer Client Interface Layer Driver does integrity and event polls of the DNP Slave or receives unsolicited messages and updates data buffer Topic Group Update rate determines how fast data buffer is checked for changes
Differences To insure full restart of driver stack, restart the server • Title says it all • Nature of the beast with the separate polling cycles between driver and OPC side which is very different from the closer coupling that exists with other drivers • There can be outgoing messages queued that have not been sent, which means if you only reinitialize the client, the DNP stack will not be reinitialized. • A MUST to keep in mind item if you are troubleshooting an issue!
TOP Server – User Interface Review, Configuring the DNP Driver • So let’s see how to configure the driver – we’ll highlight other key differences as we get to them in configuration
In systems with more than one network card and subnet, you can pick which card & subnet to bind to using this combo box Write Optimization settings and why you might change them are covered in detail in the product help file – best to leave at default in most cases Configuration – Channel SetupEthernet Driver
Configuration – Channel SetupEthernet Example Master Node Address must be configured at the slave as well and these must match. Must be unique for each channel. IP Address, Slave Port and Connection type are also configurable at the slave and must match these settings. If DNP Connection is set to UDP, you also must configure the UDP Listener port at the slave and master.
Pick your com port – any standard Windows com port will work. COM1 through COM100 supported Set remaining serial port settings to match your device If your PC has a modem installed (internal or external) this checkbox will be available For use with serial/ethernet converters, terminal server devices, and also with some cellular radios Configuration – Channel SetupSerial Example
This checkbox can only be enabled if you have a Windows TAPI compliant Modem installed in the computer. If enabled you can check it to use your modem You can choose which modem you want to use here See product help file for full details on how to configure phonebook entries, special dial,hangup tags, etc Configuration – Channel SetupSerial Example w/Modems
In systems with more than one network card and subnet, you can pick which card & subnet to bind to using this combo box If the Ethernet Connection on your DNP Slave device is provided by a serial/ethernet encapsulation device/terminal server and the actual end device is a DNP serial device you’ll check this box IP Address, Port and Protocol type must match the settings in the encapsulation device. • The amount of time allowed for a TCP socket connection to initially be established to the device. Non-relevant/ignored when using UDP connections. Configuration – Channel SetupSerial Ethernet Encapsulated Example
Configuration - ChannelImportant Considerations • DNP Master ID is at the channel level and must be unique for each Channel • If you want unsolicited messaging to work, you have to get this right so the Slaves know where the master is! • Encapsulation or Ethernet parameters are set at the channel level • If you have > 1 serial slave device but are using Ethernet/Serial convertors, each with it’s own Encapsulation device or if the slave is Ethernet capable, each device will be under it’s OWN channel • Probably a good thing for performance since each channel is a unique thread
Understanding Timeout Settings • DNP Channel Timeout (Channel Properties) • Channel Level • Controls timeout for the time on the wire between Master & Slave only – no queue time • DNP Connection Timeout – used with TCP only – non-relevant with UDP • Time to get the TCP connection up and going • DNP Command Timeout (Device Properties) • Device Level • Time On Wire + Time In Queue • Should generally be > DNP Channel Timeout!
Understanding Timeout Settings • Talking to multiple devices will take time if you have multiple slaves off of one channel • In Ethernet or Encapsulated Cellular radio scenarios, a non-issue since it’s 1 device per channel • Rule for timeouts if multiple devices under one channel: • DNP Command Timeout = (# Devices under Channel +1 ) * DNP Channel Timeout • Example: • DNP Channel timeout = 10 seconds ( default ) • 1 Device, 1 Channel • DNP Command timeout = (1+1) * 10 = 20 seconds
You’ll see this under the channel you just configured – click it to start the Device Configuration Wizard This is the DNP Slave ID of your device – it is required for Ethernet or Serial Device. This MUST match your slave device! Give your device a name that is useful to you. Configuration – Device Settings
DNP Polling Types • Integrity • Gets All the data from the device – usually done at startup and infrequently • Event • Supplies changes since last Event or Integrity Poll, including buffered events if configured on slave • Make sure your slave is configured to send timestamps! Many are by default, but if you aren’t getting the timestamps you expect….check the slave device settings • Unsolicited • Slave sends changes to Master based on policy configured in slave • What is sent and when, plus retry policy & timing is set on the slave • If you depend on unsolicited messages, beware of your firewall! Unsolicited TCP/IP and UDP packets will be rejected unless you’ve planned for them • Demand(configured at the tag/item level) • Traditional master polling of slave – gets data whether changed or not. • Bypasses DNP efficiencies. • Not recommended unless you have to! • Polling rate driven by Topic or Group Update Rate
DNP Polling Typical Use Cases • With DNP you can connect and initialize the session and: • Do an Integrity Poll, • Then sit and listen for unsolicited messages • and never do an Event Poll • Or…Most Commonly…. after the initial Integrity Poll • You can do an Event Poll at some interval to get just items changed since last report from the slave & change history if enabled at slave and master • You can do an Integrity Poll at a regular interval to ask for an update of ALL items • And receive unsolicited messages, if configured in slave • Sometimes devices have data that can only be read by doing explicit reads (“Demand Polling”)
Controls how often driver will ask DNP Slave for a report of all changes since last Event Poll or last Unsolicited Message. Three event classes in DNP can be configured with different event poll rates. See your DNP slave documentation for what points are in each class – it may be configurable. • 0 = do no Event Polls, ever, rely on period integrity polls, unsolicited messages or explicit reads only for updates. • Max value = 86,400 seconds (24 hours) DNP Command Timeout should be greater than the channel timeout The DNP Command timeout covers time on the wire (Channel timeout) and time in the queue Formula: DNP Command Timeout should be >= (# of DNP Devices Under a Channel + 1) * DNP Channel Timeout Setting (set on your channel properties) • Controls how often driver will ask DNP slave for values of ALL items in the slave, regardless of whether you have OPC items setup for them, regardless of whether values have changes • 0 = do no Integrity polls, ever – not recommended • Max Value = 2,592,000 seconds (30 days) • We recommend no more than once per hour, especially in radio or wireless networks. Most applications even less frequent, every 8 hours or 24 hours is sufficient. The max is 30 days. Configuration – Device SettingsPolling Settings
Configuration – Device SettingsAdvanced Settings Two Options: LAN Serial Two Options: Direct Operate Select then Operate Two Options: UTC Local Time Determines action after write from Master to Slave If the slave can report an I/O point as offline, this allows the server to set the quality to bad for the .Value and .Explicit subtypes
Configuration – Device SettingsUnsolicited Messaging Setup and Considerations If the slave accepts unsolicited setting commands from the master, this tells the slave to disable unsolicited messaging. If the slave accepts unsolicited setting commands from the master, this tells the slave to enable unsolicited messaging. No Action accepts the settings from the slave. If the slave does not accept unsolicited messaging commands from the master, the other two settings are irrelevant. • Unsolicited messages update master with changes in the device • Slave device controls settings on item deadbands and Unsolicited messages (number and frequency), NOT THE MASTER! • Deadband settings in a slave can prevent you from receiving EVERY change – a good or bad thing based on your needs • Our Master CAN control which classes of Unsolicited Messages get sent, IF the SLAVE will accept our command messages… they aren’t required to! • But the Master can’t control unsolicited message settings at the slave any more granurally than this
Configuration – Device SettingsDNP Event Buffering: Overview • What happens when communications are lost? • Most non DNP devices/protocols miss out on that data. • DNP slaves can buffer data and then send the events when communications are established. • Whether or not your slave buffers, how much it buffers, how it handles a buffer overrun, are all your slave hardware’s settings outside the scope of the TOP Server and it’s support. • When communications comes back • A properly configured DNP system will have the slave replay the old events with the timestamps of when the event happened! • TOP Server can • Buffer up to a specified # of events • Play them back at a user configurable rate that your client/Historian can handle for logging • The events play back in the same order we receive them from the slave – provided the slave delivers them in FIFO timestamp order, then our delivery to HMI/SCADA will be the same.
Configuration – Device SettingsDNP Event Buffering: Supported Objects • Event Buffering applies to DNP objects • 1 – Binary Input • 3 – Double Bit Input • 10 – Binary Output • 20 – Binary Counter • 21 – Frozen Counter • 30 – Analog Input • See driver help file for more details
Configuration – Device SettingsDNP Event Buffering: Important Considerations • Event Buffering introduces latency into the tags for those affected objects. • Even after the initial burst of events is played out of the buffer, newly incoming updates will only be reported at the Playback Rate. • Buffering should only be used when preservation of the event stream is more important than timely delivery of point updates. • Event Buffering is enabled at the device level • If a tag's event buffer should fill up, new reports will displace the oldest reports in the queue.
Configuration – Device SettingsDNP Event Buffering: Configuration • There are three settings to configure when you use event buffering. First, we must enable event buffering. To insure retrieval of all the buffered events, the client must have an update rate at least twice as fast as the Playback Rate (less than 1000 milliseconds in this example). In this example the buffer will retain 100 updates per tag and make the next update available to the client once every 2000 milliseconds. Configure the max events per tag, 1-1000. Configure the playback rate.
Configuration – Device Settings Click “Finish” and you’re Done!
ConfigurationSetting up DNP Tags/Items • Must have DNP slave profile document • Slave profile is not some file you load into the driver! • But it is a key document that a DNP3 compliant slave device must provide! • User must read over it and be responsible for interfacing with their h/w vendor on questions about their document • Understand the basics of the DNP standard item naming syntax
ConfigurationAddressing DNP Items • Address follows OBJ.VAR.IDX.SUB syntax: • OBJ=Data object group (i.e. analog inputs, analog outputs, etc) • VAR=Variation (equates to data type) • IDX=Data object within a group (OBJ) – i.e. IDX 4 would be the 5th point in a group • SUB=Specific attribute of a point • Most commonly used is “Value” • Use “Explicit” to cause the tag to be “Demand Polled” – makes that tag work just like traditional polling PLC driver – use with care!
ConfigurationSetting up DNP Tags/Items: Example • Example – Multitrode Multismart • Chapter 3 gives you list of Object #s (OBJ) • Chapter 4 gives you the IDX but they call it “Default DNP ID” • Depending on the quality of your DNP slave documentation, this might take some trial & error or you may have to ask the hardware supplier for clarification
ConfigurationDNP Addressing Examples • Analog Input • 30.0.51.Value • 30 = Analog inputs object • 0 = Variation = default data type • 3 = index, sometimes called Default DNP ID • Value = report the value of the input • Binary Input • 1.0.2.Timestamp • 1 = Binary inputs object • 0 = Variation = default data type • 42 = index, sometimes called Default DNP ID • Timestamp = report the time of the event currently reported by the .Value sub-attribute
Configuration: DNP AddressingImportant Subtleties to Know • In proper DNP implementation, the # of tags or OPC items you configure in the OPC server has no effect on what gets scanned or updated from the DNP slave – that’s how DNP works! • The driver abstracts a lot of DNP Slave profile details for you – so try not to get bogged down in the details. • Focus on finding the OBJ.VAR.IDX.SUB lists for the tags you want in the DNP Slave profile • If you don’t see an object # from your slave profile listed in the driver help file, does not mean it’s not supported – some object #s are implied when you use the base object. • Change Event objects are used “under the hood” automatically • Same with writing objects • See “Address Descriptions->Object Definitions” in help file – a list of objects whose data is reflected in other objects is provided there! • Example: • Object 30 – Analog Inputs – using object 30 will also cause object 32 to be used “under the hood” for analog input change events. • When in doubt, try the base object # for the Object Group (i.e analog ins, analog outs, etc) for the OBJ part of the address and try the things you want to do
Live Demonstration Ethernet MultitrodeMultiSmart RTU TOP Server DNP Suite OPC Server • HMI/SCADA/DCS Systems • RSView • Wonderware • Intellution iFix • Citect • Indusoft • ClearSCADA Any OPC Client ABB DCS Honeywell DCS Foxboro DCS DeltaV DCS Visual Studio.NET (custom apps)
Integration OptionsRedundancy HMI, SCADA, or DCS System • Redundancy Master sits at the HMI Client system • Switches primary to backup and back on loss of comms • User configurable timing on what constitutes “down” • Tags exposed to HMI let the HMI know system status OPC Redundancy Master Software $1295 TOP Server Multitrode DNP Suite TOP Server Multitrode DNP Suite
Integration Options OPC Data Hub http://www.softwaretoolbox.com/opcdatahub
Integration Options OPC Data Logger • Cost-effective yet powerful solution for collecting process data and logging • Easy-to-setup • Works with local or remote OPC Servers • OPC Interoperability tested • Connect to 1 to N OPC servers • No tag count limits • Licensed per computer based on type of target logging • Licenses from $495-$995
Integration OptionsOPC Client Development Tools • Rapid, reliable connections from Visual Basic and .NET to OPC
Integration Options Graphics and HMI Development • Development Products for smaller systems
Tips & Tricks • Loads of free help at: http://www.toolboxopc.com/html/support.asp • Quick Start Guide • Training Videos • Papers and Utilities – Trouble Shooting Guide • More information on the Product Details tab • http://www.toolboxopc.com/html/product_details.html • Contact Software Toolbox support@softwaretoolbox.com while you are in the planning stage, so we can help
Contact Information & Other Learning Opportunities • Questions later? • Boyce Baine • bbaine@softwaretoolbox.com • 888-665-3678 or 704-849-2773 • support@softwaretoolbox.com • www.toolboxopc.com • www.softwaretoolbox.com • Other learning opportunities • Visit www.softwaretoolbox.com/webinars