4. Application Layer Protocols Device Management Protocols

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

Prof. Dr. H. Kirrmann ABB Research Centre, Baden, Switzerland Industrial Automation Automation Industrielle Industrielle Automation 4.3 OPC Alarms.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 24 Network Management: SNMP.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Internetworking.
TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.
Networking Theory (Part 1). Introduction Overview of the basic concepts of networking Also discusses essential topics of networking theory.
Chapter 15 Chapter 15: Network Monitoring and Tuning.
CSEE W4140 Networking Laboratory Lecture 11: SNMP Jong Yul Kim
OSI Model.
Hands-On Microsoft Windows Server 2003 Networking Chapter 7 Windows Internet Naming Service.
Review on Networking Technologies Linda Wu (CMPT )
Device Management Protocols Protocoles de gestion des appareils Gerätezugangsprotokolle Electronic Device Description Prof. Dr. H. Kirrmann ABB Research.
4.3 OPC (Open Process Control formerly OLE for Process Control)
SNMP & MIME Rizwan Rehman, CCS, DU. Basic tasks that fall under this category are: What is Network Management? Fault Management Dealing with problems.
SNMP Simple Network Management Protocol
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
 The Open Systems Interconnection model (OSI model) is a product of the Open Systems Interconnection effort at the International Organization for Standardization.
(part 3).  Switches, also known as switching hubs, have become an increasingly important part of our networking today, because when working with hubs,
ENS 1 SNMP M Clements. ENS 2 Simple Network Management Protocol Manages elements in networks – E.g. routers, switches, IP phones, printers etc. Uses manager.
McGraw-Hill The McGraw-Hill Companies, Inc., 2000 SNMP Simple Network Management Protocol.
Lecture slides prepared for “Business Data Communications”, 7/e, by William Stallings and Tom Case, Chapter 8 “TCP/IP”.
1.  A protocol is a set of rules that governs the communications between computers on a network.  Functions of protocols:  Addressing  Data Packet.
Connecting LANs, Backbone Networks, and Virtual LANs
Network Management Concepts and Practice Author: J. Richard Burke Presentation by Shu-Ping Lin.
DEMONSTRATION FOR SIGMA DATA ACQUISITION MODULES Tempatron Ltd Data Measurements Division Darwin Close Reading RG2 0TB UK T : +44 (0) F :
HiVision SNMP Software.
4.3.4 OPC Historical Data Access
Industrial Automation Automation Industrielle Industrielle Automation 4Application Layer Protocols 4.1 Device Management Protocols protocolos de gestión.
Industrial Automation
1. 2 How do I verify that my plant network is OK? Manually: Watch link lights and traffic indicators… Electronically: Purchase a SNMP management software.
Network Protocols UNIT IV – NETWORK MANAGEMENT FUNDAMENTALS.
SNMP ( Simple Network Management Protocol ) based Network Management.
4 Application Layer Protocols
Vision/Benefits/Introduction Randy Armstrong (OPC Foundation)
Data Communications and Networks
LECTURE 9 CT1303 LAN. LAN DEVICES Network: Nodes: Service units: PC Interface processing Modules: it doesn’t generate data, but just it process it and.
NetworkProtocols. Objectives Identify characteristics of TCP/IP, IPX/SPX, NetBIOS, and AppleTalk Understand position of network protocols in OSI Model.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Remote Access Chapter 4. Learning Objectives Understand implications of IEEE 802.1x and how it is used Understand VPN technology and its uses for securing.
Remote Access Chapter 4. Learning Objectives Understand implications of IEEE 802.1x and how it is used Understand VPN technology and its uses for securing.
Protocols and the TCP/IP Suite
ACM 511 Chapter 2. Communication Communicating the Messages The best approach is to divide the data into smaller, more manageable pieces to send over.
BAI513 - PROTOCOLS SNMP BAIST – Network Management.
William Stallings Data and Computer Communications 7 th Edition Data Communications and Networks Overview Protocols and Architecture.
MMS - Manufacturing Message Specifications
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
Chapter Three Network Protocols By JD McGuire ARP Address Resolution Protocol Address Resolution Protocol The core protocol in the TCP/IP suite that.
Cisco S2 C4 Router Components. Configure a Router You can configure a router from –from the console terminal (a computer connected to the router –through.
4 - 1 Copyright © 2006, The McGraw-Hill Companies, Inc. All rights reserved. Computer Software Chapter 4.
SNMP 1. SNMP is an Internet protocol developed by the IETF. It is designed to facilitate the exchange of management information between network elements.
OS Services And Networking Support Juan Wang Qi Pan Department of Computer Science Southeastern University August 1999.
TCP/IP (Transmission Control Protocol / Internet Protocol)
Network Management Security
1 OSI and TCP/IP Models. 2 TCP/IP Encapsulation (Packet) (Frame)
NETWORKING FUNDAMENTALS. Network+ Guide to Networks, 4e2.
Rehab AlFallaj.  Network:  Nodes: Service units: PC Interface processing Modules: it doesn’t generate data, but just it process it and do specific task.
G.v. Bochmann, revised Jan Comm Systems Arch 1 Different system architectures Object-oriented architecture (only objects, no particular structure)
Enterprise Network Systems TCP Mark Clements. 3 March 2008ENS 2 Last Week – Client/ Server Cost effective way of providing more computing power High specs.
 PROFIBUS (Process Field Bus) is a standard for fieldbus communication  Based on a token bus/floating master system.  Three Types 1.FMS ( Field bus.
Chapter 27 Network Management Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
4 Application Layer Protocols EPFL, Spring Industrial Automation | Application layer protocols offering remote services for large networks.
PART1 Data collection methodology and NM paradigms 1.
SNMP.
ABB Research Centre, Baden, Switzerland
SNMP M Clements ENS.
How SCADA Systems Work?.
SNMP M Clements ENS.
Chapter 3: Windows7 Part 4.
SNMP M Clements ENS.
SNMP (Simple Network Management Protocol) based Network Management
Presentation transcript:

4. Application Layer Protocols 4. 1. Device Management Protocols 4 Application Layer Protocols 4.1 Device Management Protocols protocolos de gestión de dispositivos Protocoles de gestion des appareils Gerätezugangsprotokolle SNMP and friends http://tinyurl.com/IAevaluation1

Contents Device Management Protocols. Application layer protocols offering remote services for large networks of devices: Monitoring (health of devices and network, get current state) Management (deployment, configuration, change settings) 4.1.1 current loop 4..20 mA 4.1.2 HART 4.1.3 SNMP: Simple Network Management Protocol 4.1.4 MMS: Manufacturing Messaging Specification

The classical solution for analogue values 4.1.1 Current Loop The classical solution for analogue values Example differential pressure transducer 4..20 mA current loop Reminder: fluid

Practically all 4..20mA devices come equipped with HART today Data over 4..20 mA loops Practically all 4..20mA devices come equipped with HART today About 15 Mio devices are installed worldwide. Reminder: Reminder: more info: http://www.hartcomm.org/ http://www.thehartbook.com/default.htm

It is round because most hydraulic instruments have a round case. The Round card http://www.fint.no/ha-i4012.pdf The round card is a standardized printed circuit board that can be mounted in an instrument, containing the modem, a processor, RAM, EPROM and all the logic and software necessary to execute the HART protocol. It is round because most hydraulic instruments have a round case.

HART commands summary Universal Commands Common Practice Commands Master Indication Slave Request Confirmation Response time-out command response Universal Commands Common Practice Commands Device-Specific Commands (example) • Read manufacturer and device type • Read variable and units • Read current output and percent of range • Read up to four predefined dynamic variables • Read/write tag, descriptor, date • Read/write 32-character message • Read device range values, units, and damping time constant • Read or write final assembly number • Write polling address • Read selection of up to four dynamic variables • Write damping time constant • Write device range values • Calibrate (set zero, set span) • Set fixed output current • Perform self-test • Perform master reset • Trim variable zero • Write variable unit • Trim DAC zero and gain • Write transfer function (square root/linear) • Write sensor serial number • Read or write dynamic variable assignments • Read or write low-flow cut-off • Start, stop, or clear totalizer • Read or write density calibration factor • Choose variable (mass, flow, or density) • Read or write materials or construction information • Trim sensor calibration • enable PID, write PID setpoint • Valve characterization • Valve setpoint • Travel limits • User units • Local display information • Trim DAC zero and gain • Write transfer function (square root/linear) ?

Device access field device SCADA hand-held device network adapter volumetric flow rate type FlowPro manufacturer ABB volumetric flow rate field device SCADA cross sectional area: 3 cm2 pipe inside diameter 2 cm velocity 13.32 m2/s network adapter diff. pressure 9.8 Pa density 0.8 kg/l hand-held device network network modem adapter adapter 4-20 mA loop for HART 13.32 9.8 0.8

Simple Network Management Protocol 4.1.3 SNMP Simple Network Management Protocol

Simple Network Management Protocol IETF (Internet standard) protocol for device and network management (widely supported, especially by routers, switches, servers, workstations, printers…). Configuration Management Keeping track of device settings Fault management Dealing with problems and emergencies (router stops forwarding, server loses power, etc) Performance Management How smoothly is network running? Can it handle the current workload?

SNMP - MIB objects networked device Agent MIB Device contains MIB (managed information base) and an agent to access MIB TCP/UDP/IP (171 objects) NT network (90 objects) DHCP (14 objects) WINS (70 objects) Appletalk Nowell IPX DecNet ….. CISCO (proprietary) Mostly parameters, statistics and error counters used for communication

SNMP – ASN.1 Object example tcpMaxConn OBJECT-TYP SYNTAX Integer32 (-1 | 0..2147483647) MAX-ACCESS read-only STATUS current DESCRIPTION "The limit on the total number of TCP connections the entity can support. In entities where the maximum number of connections is dynamic, this object should contain the value -1." ::= { tcp 4 } tcpActiveOpens OBJECT-TYPE SYNTAX Counter32 "The number of times that TCP connections have made a direct transition to the SYN-SENT state from the CLOSED state. Discontinuities in the value of this counter are indicated via discontinuities in the value of sysUpTime." ::= { tcp 5 } 4 5? http://net-snmp.sourceforge.net/docs/mibs/TCP-MIB.txt

Example SNPM Network

SNMP - Access to Managed Objects User object interface MIB managed information base Manager Agent call (indication) (request) reply (confirm) (response) UDP UDP IP IP ISO 8802-2 Type 1 ISO 8802-2 Type 1 ISO 8802-3 (Ethernet) ISO 8802-3 (Ethernet) management messages network

SNMP - Operations on objects Operations (PDU type): Get (read) Set (write) GetNext (transversal reading) GetBulk (optimized GetNext, v2 and v3) Response (variable bindings and acknowledgement) Trap (asynchronous agent notification, priorities) Since SNMPv1/SNMPv2 do not provide authentication, “Set” commands are normally disabled. Traps are rarely used.

Example Network and Queries

SNMP - How are objects identified ? ISO defined a world-wide addressing scheme on a hierarchical basis: MIB objects are identified by a concatenation of numerical identifiers quite wasteful, but bearable in LANs

SNMP example of identification .1.3.111.3.37.238.9999.1.1.2 == .iso.org.ieee.standards-association-c-series-standards.std-c37.part238. ieeeC37238TSMib.ieeeC37238Objects.ieeeC37238DefaultDS.ieeeC37238DefaultDSClkIdentity

SNMP - Assumptions about the underlying communication network - the network is connectionless (datagrams): only UDP is used (no TCP). - manager and agent can send messages to each other spontaneously - all entities must be able to receive and send packets of at least 484 octets - the network supports broadcast Further reading: www.wtcs.org/snmp4tpc/files/reference/francois/snmp.ppt

Manufacturing Messaging Specification (MMS) Program Invocation Named Variable Variable List File Types Semaphore Event Enrolment Transaction Domain Operator Station Journal Condition Action Manufacturing Messaging Specification (MMS)

MMS - Application field schedule robot configuration Numerous conveyors, robots, CNC machines, paint shops, logistics. Download from production management, connection to administration.

Interaction between Operator Workplace and field equipment SCADA (client) (any technology) network (any) controller (server) (any technology) represents automation objects, i.e. a collection of PLC1 variables manufacturing devices represent pieces of equipment MMS: we want to access all controllers, regardless of the manufacturer, in the same way.

The basic MMS idea: read a variable client (any technology) request read variable name response value status network (any) server I / O devices basic MMS idea: read and write equipment variables using standard messages.

MMS - Manufacturing Message Specification Developed 1980 for the MAP project (General Motor’s flexible manufacturing initiative) Reputation: heavy, complicated and costly (due to poor implementation) But: Boeing adopted MMS as TOPs (MMS on Ethernet) Adopted by the automobile industry and power distribution Standardized as: [1] ISO/IEC 9506-1: Industrial Automation systems - Manufacturing Message Specification - Part 1: Service Definition (IS 1990)   [2] ISO/IEC 9506-2: Industrial Automation systems - Manufacturing Message Specification - Part 2: Protocol Specification (IS 1990) messaging system for transferring real time process data and supervisory control information between networked devices and/or computer applications. 

MMS - Concept MMS (Manufacturing Message Specifications) defines: • A set of standard objects which must exist in every conformant device, on which operations can be executed (example: local variables, read and write) or which can start a transmission spontaneously • A set of standard messages exchanged between a manager and an agent station for the purpose of controlling these objects • A set of encoding rules for these messages • A set of rules for exchanging messages between devices (basic protocol) MMS does not specify application-specific operations (e.g. change motor speed). This is covered by application-specific, “companion standards” (e.g. flexible manufacturing, drives, remote meter reading)

MMS - Manufacturing Message Specification Application MMS does not specify the application interface device device MMS specifies a set MMS specifies a set of messages which of objects which allow an MMS client an MMS server is to control an MMS MMS client expected to contain MMS server server request response (command) (reply) communication stack communication stack network MMS specifies how messages are encoded for transmission linking device router

MMS - Communication Stack Association Control Service Element, ACSE, ISO 8649/8650, N2526,N2327 Application Abstract syntax notation,ISO 8822/8823, 8824/8825 Presentation ISO 8326/8327 Session ISO 8073 Class 4 Transport ISO 8473 connectionless Network ISO 8802-2 Type 1 Link ISO 8802-3 (Ethernet) ISO 8802-4 MAC (token bus) Physical quite heavy… Boeing decided to drop ISO for TCP/IP ("TOP“).

MMS in the fieldbus stack context time-critical applications (PLC tasks) time-benign applications (HMI, download) real-time data base time-benign messages time-critical process variables MMS 7 Application (Association) implicit implicit (ASN.1) 6 Presentation real-time traffic (not MMS) Remote Procedure Call 5 Session connection-oriented 4 Transport (connection-oriented) connectionless 3 Network (connectionless) connectionless 2" Logical Link Control medium access 2' Link (Medium Access) common media 1 Physical MMS is not for real-time communication, but it can access the real-time variables

MMS - Basic Communication Principles MMS assumes that the communication stack offers two services: Indication MMS Responder (server) Request Confirmation Response network processing event MMS Requester (client) 1) Remote Procedure Call (Call paired with reply, synchronous, unicast) 2) Event Reporting (spontaneous messages sent by server) Addressing not specified, messages contain communication reference to identify connection. Usually, clients/servers are addressed by IP address and MMS server uses port number 102.

MMS provides services to: MMS - Event services MMS provides services to: - Event Condition (define the boolean condition that triggers an event and its priority) - Event Enrolment (define the MMS client(s) to notify when an event is triggered) - Event Action (define the MMS confirmed service to be executed when the event occurs) MMS client MMS client DefineEventCondition EventNotification AlterEventCondition AckEventNotification enables/disables event conditions (MMS server) Event Enrolment Event Condition Event Action Who? When? What? event notification and confirmation Events are the most complicated part of MMS

AckEventNotification MMS - Event triggering MMS client MMS client TriggerEvent EventNotification AckEventNotification MMS Server NETWORK-TRIGGERED Event Enrolment Event Condition Event Action boolean variable MONITORED cyclic monitoring plant events are triggered by a change in a boolean variable in the server (monitored event) or by an MMS client (trigger event) as an invitation procedure

VMD: Virtual Manufacturing Device Definition of objects, services, and behavior Only specifies the network-visible aspects (device / application communication) Internal implementation details (programming language, operating system, CPU type, input/output (I/O) systems) not specified by MMS interoperability Application Programming Interface (MMSI = MMS interface) Virtual Device communication stack physical link network transport session presentation robot flow meter cell Program Invocation Named Variable Variable List File Types Semaphore Event Enrolment Transaction Domain Operator Station Journal Condition A virtual device represents a (complex) piece of equipment Application-specific object models A physical device (PLC) may implement one or more virtual devices Action

EPRI = USA electrical power research institute MMS - Importance MMS has been during its 15 years of existence a reference model for industry rather than an actual implementation. Its high complexity makes it very general, but the requested bandwidth and computing power were out of reach until few years ago. It is - sometimes as a proprietary version - part of every PLC today. It gave rise to several other "simpler" models (DLMS, BacNet, FMS....) It is the base of IEC 61850 „Communication networks and systems in substations“, which bases on TCP/IP/Ethernet For more information, see: http://lamspeople.epfl.ch/kirrmann/mms/ http://www.nettedautomation.com/qanda/mms/#OPC/MMS EPRI = USA electrical power research institute

Assessment What is the purpose of the HART protocol ? Which communication is used between a hand-help and a field device ? Which categories of HART commands do exist ? What distinguishes Hart from SNMP ? What distinguishes SNMP from MMS ? What are the (dis)advantages of MMS ?

4 Application Layer Protocols (formerly: "OLE1 for Process Control", now: "Open Process Control") • Learn the advantages of using OPC • Understand the OPC Client/ Server architecture • Review the milestones in the history of OPC • Understand how to create a connection between an OPC Client and OPC Server • Recognize what factors can affect OPC communication • Review the most widely implemented OPC specification: OPC DA 4 Application Layer Protocols 4.2 Open Process Control (OPC)

OPC: Open Process Control Manufacturer-independent application programming interface (API) for automation To implement clients which can access plant data coming from remote devices (PLCs, field bus devices, real-time databases) easily Set of commands to access OPC servers OPC clients read and write process variables, read alarms and events and acknowledge alarms, and retrieve historical data from data bases according to several criteria Implemented on automation platforms (e.g. ABB Ax800), which may act themselves as an OPC server to publish their data, events and historical data. OPC server Supplied by manufacturer of automation devices supplies Communicates with its devices through a proprietary protocol Manages several devices of the same type, several servers can run in parallel and each server can be accessed by several clients in the same network

Usage and specifications Clients and Servers: configuration OPC Overview 4.2.1 OPC Overview Usage and specifications Clients and Servers: configuration 4.2.2 OPC Data Access Objects, Types and properties Communication model 4.2.3 OPC Alarms and Events Specification Events Alarm Conditions 4.2.4 OPC Historical Data Specification Overview

API covered by the OPC standard 4.2.1 What is OPC ? Industry standard set up by the OPC Foundation (http://www.opcfoundation.org/) specifying the software interface (objects, methods) to a server that collects data produced by field devices and programmable logic controllers. API covered by the OPC standard application (OPC client) servers OPC server X OPC server (simulator) OPC server Y Ethernet : Field bus Manufacturer-independent application programming interface (API - implement clients accessing plant data coming from remote devices (PLCs, field bus devices, real-time databases) easily - set of commands collected in a software library (DLL) to access OPC servers OPC clients read and write process variables, read A&E, and retrieve historical data Implemented on automation platforms (e.g. ABB Ax800 OPC server Supplied by manufacturer of automation devices supplies Communicates with its devices through a proprietary protocol Manages several devices of the same type Several servers can run in parallel and each server can be accessed by several clients in the same network PLCs Brand X PLCs Brand Y Sensors/Actors

Before OPC visualization history data base ABB PLCs Télémécanique PLCs MasterBus MMS driver Profinet driver XWAY driver ABB PLCs Télémécanique PLCs Siemens PLCs

(Information Manager) With OPC Operator Historian (Information Manager) application software is written independently from the type of controller the drivers still exist, but the clients do not see them anymore ABB OPC server Schneider OPC server Siemens OPC server MMS XWAY ProfiNet ABB AC800M Télémécanique TSX Siemens S7

Greatest improvement in automation since IEC 61131. Importance of OPC Greatest improvement in automation since IEC 61131. More than 150 vendors offer OPC servers to connect their PLCs, field bus devices, displays and visualization systems. Used for data exchange between applications and for accessing databases Three major components: 1) OPC - DA = Data Access (widespread, mature) 2) OPC - AE = Alarms and Events 3) OPC - HDA = Historical Data Access … and some profiles* (batch,…) * A “profile” is a subset or a specialization of a standard to form a stricter standard, adapted to an application. E.g. 100 Mbit/s, full-duplex, fibre-optical Ethernet is a profile of IEEE 802.3.

Specification 1: OPC DA for Data Access Process variables describe the plant's state, they are generated by the sensors or calculated in the programmable logic controllers (PLCs). Process variables can be sent upon a change, on demand or when a given time elapsed. The OPC DA (Data Access) specification addresses collecting Process Variables. The main clients of OPC DA are visualization and (soft-) control.

Specification 2: OPC AE for Alarms and Events Events are changes in the process that need to be logged, such as "production start" Alarms are abnormal states in the process that require attention, such as "low oil pressure" OPC AE (Alarms and Events) specifies alarms and events, their subscription, under which conditions they are filtered and sent with their associated messages. The main clients of OPC AE are the Alarms and Event loggers. determine the exact time of change (time stamping) categorize by priorities log for further use acknowledge alarms (events are not acknowledged) link to clear text explanation

Specification 3: HDA for Historical Data Access Historical Data are process states and events such as: process variables, operator actions, recorded alarms,... that are stored as logs in a long-term storage for later analysis. OPC HDA (Historical Data Access) specifies how historical data are retrieved from the logs in the long-term storage, filtered and aggregated (e.g. compute averages, peaks). The main client of OPC HDA are Trend Displays and Historians.

Beyond Microsoft: OPC UA In a move to get more independence from Microsoft and use web technology: new specification called " Unified Architecture" that uses web services for all kinds of transactions: query, read, write, subscribe,... The classical OPC DA, AE and HDA are implemented with XML / SOAP / WSDL this allows encryption and authentication of process data. OPC UA does not only standardize the interfaces, but also the transmitted data.

Usage and specifications Client and Servers 4.2.1 OPC Overview Usage and specifications Clients and Servers: configuration and communication 4.2.2 OPC Data Access Objects, Types and properties Communication model 4.2.3 OPC Alarms and Events Specification Events Alarm Conditions Automation Interface 4.2.4 OPC Historical Data Specification Overview

Server(s) and Client(s) in the same node client application (OPC client) client application (OPC client) OPC server OPC server OPC server devices devices devices devices Clients and servers run as parallel processes The OPC specification defines the interface between client and server in the form of objects and methods.

OPC for internal communication: ABB’s SCADA (800xA) as example ABB's Operator Workplace (800xA) is at the same time OPC server and OPC client. Software components (agents) within AIP expose their properties as OPC objects. Internal (within the PC) and external communication (between PCs) takes place over OPC. 800xA aspects aspects Enterprise Historian Asset Optimizer functions OPC server Windows PC process data base OPC connections OPC client ABB OPC server Schneider OPC server Siemens OPC server

Direct and Fieldbus access direct connection fieldbus connection client application (OPC client) client application (OPC client) (local) OPC server (local) OPC server FB Manager fieldbus can also be a point-to-point link proprietary protocol I/O devices fieldbus fieldbus The OPC server is running all the time, even if no client is present FB agent FB agent PLC PLC

Accessing a server in another node client application (OPC client) stub DCOM TCP/IP DCOM TCP/IP TCP/IP DCOM DCOM OPC server OPC server Limitation: does not work over firewalls. Solution: Tunneller OPC UA FB Manager fieldbus

What is the objective of OPC ? On which technology does OPC rely ? Assessment Overview What is the objective of OPC ? On which technology does OPC rely ? What is an OPC Server ? What do the main OPC specifications describe ? How can an OPC Server access data on another machine? And how does it work for OPC clients?

Usage and specifications Clients and Servers: configuration OPC Data Access 4.2.1 OPC Overview Usage and specifications Clients and Servers: configuration 4.2.2 OPC Data Access Objects, Types and properties Communication model 4.2.3 OPC Alarms and Events Specification Events Alarm Conditions Automation Interface 4.2.4 OPC Historical Data Specification Overview

OPC DA: Item properties The process data are represented by three dynamic properties of an item: value: numerical or text time-stamp: time at which this data was transmitted from the PLC to the server UTC, not local time. quality: validity of the reading (not readable, dubious data, o.k.) optional static properties description: a text string describing the use and of the variable (optional) engineering unit: the unit in which the variable is expressed (optional) ID V Q T D U

OPC DA: Objects as viewed by the OPC server An OPC server is structured as a directory with root, branches and leaves (items) Process Line 1 Tag Name Controller 1 Controller 2 TAG Level_1 An item is identified by its "fully qualified ItemID", e.g. "Process_Line_1.Controller_2.Level_2" Controller_3.Prog_1 TAG Level_2 Controller_3.Prog_2 TAG Ramp4 Cell 1 Machine 2 Branches may contain other branches and items The structure may also be flat instead of hierarchical This structure is defined during engineering of the attached devices and sensor/actors. (Intelligent servers can configure themselves by reading the attached devices)

OPC DA: Objects as viewed by the OPC client A client builds its own hierarchy, using the server’s hierarchical view. Items in the server are defined by the programmer of the PLC A full-fledged PLC may export some 10’000 items, a client needs only a subset. A client builds groups, populating them with items it is interested in. Items of a group are expected to have similar real-time requirements Groups are not hierarchical, but flat.

OPC DA: Mapping items to groups Each client structures its items by groups, independently from the server. Initially, the client browses the server structure to check if the items it is interested in exist. A client registers its groups and items at the server. The server keeps the structure of all its clients. clients Client1 Client2 GroupX GroupZ Item1 Item2 Item3 Item1 Item2 Server root server Area 1 Oven_1 TAG Temperature TAG Heat_On Tank_1 TAG Level Area 2 TAG Empty_Valve Fill_Valve Area 51 TAG

OPC DA: Communication Model 4.2.1 OPC Common Overview: usage and specifications Clients and Servers: configuration 4.2.2 OPC Data Access Objects, Types and properties Communication model 4.2.3 OPC Alarms and Events Specification Events Alarm Conditions Automation Interface 4.2.4 OPC Historical Data Specification Overview

4.2.2 OPC DA: Example of access to a variable controller program OPC application Reactor_1.Program2 ReadItem ("OPC:Reactor1: Program2.MotorSpeed") MW%1003 MotorSpeed Value: 112 MW%1004 Temperature … …. load symbol table symbols OPC server code Get () 192.162.0.2, MW%1003) Return (MW%1003, 112) Network Program 2 Reactor_1 Marker: MW%1003

OPC DA: Read Communication Models (per group) synchronous asynchronous client server client server Call Call myGroup.SynchRead() myGroup.AsyncRead() Reply Reply myGroup_AsyncReadComplete() client server Subscribe myGroup.IsSubscribed on change ("subscription-based") The OPC interface accesses only groups, not individual items. Notify myGroup_DataChange() Notify myGroup_DataChange()

OPC DA: Write Communication Models (per group) client server client server Call Call myGroup.SynchWrite() myGroup.AsyncWrite() Reply Reply myGroup_AsyncWriteComplete() The OPC interface accesses only groups, not individual items.

OPC DA: communication paradigm OPC DA works according to the “shared memory” paradigm. This means that a newer value overwrites the older one, no queues or history are kept. The server does not guarantee that different clients see the same snapshot of the plant. The server does not guarantee that all changes to variables are registered, changes may be missed if the polling period is too long. OPC DA Client OPC DA Client OPC DA Server

What are the DA the read and write operations ? OPC DA: Assessment How does the OPC server know a) where to fetch an item? b) which items belong to which group? What are the DA the read and write operations ? Is communication done by items, by groups or by collection of groups ? Why? Can a change of an OPC variable be notified as an event, or shall the client poll ? What are the implications of the shared memory paradigm for the application developer? a) Loads symbol table from PLC b) it keeps a record of each client and its groups Read: sync, async, on change Write: sync, async Client asks for groups (can define what belongs to them by itself), server depends on proprietary protocol Can be done event-based, depends on application Developer must no rely on assumption of consistent snapshot of plant

Usage and specifications Clients and Servers: configuration OPC Alarms and Events 4.2.1 OPC Overview Usage and specifications Clients and Servers: configuration 4.2.2 OPC Data Access Objects, Types and properties Communication model 4.2.3 OPC Alarms and Events Specification Events Alarm Conditions 4.2.4 OPC Historical Data Specification Overview

Alarms and Events: Purpose The controllers (PLC) generate events in response to changes in the plant variables. together with their precise time of occurrence, type, severity and associated message for the human operator. An OPC AE server registers these events and makes them available to several clients Alarms are described as state machines and may require acknowledgement. The OPC Alarms & Events Interface gives access to the AE server, allowing to: - browse the OPC AE Server for predefined events. - enable or disable alarms and events - subscribe to alarms and events of interest - receive the event and alarm notifications with the associated attributes - acknowledge alarms

AE: Definitions An event is a general change of state that is relevant to the OPC server. An event signal a change: 1) in the field device ("production started") 2) in the OPC server ("alarm acknowledged") 3) in the application ("operator action") An alarm indicates a state of the process that requires attention and is relevant to the OPC server. An alarm is represented by an alarm condition, which is a state machine determining if the alarm has been enabled, triggered or acknowledged. An alarm rises several events. An event or an alarm does not transmit process values, but boolean information indicating a change of state, its originator, the time of its occurrence and a message intended for a human operator. Alarms and events may not get lost (contrarily to OPC DA, which does not guarantee completeness) Alarms and event are precisely time-stamped by their source, (contrarily to process variables, which are time-stamped by the receiving OPC server).

AE: communication paradigm OPC AE works according to the “message passing” paradigm, contrarily to OPC DA, that works according to the "shared memory" paradigm. This means that an event is kept in a queue until all clients have read it (or timed out). The AE server guarantees that different clients will see all events in the same sequence. OPC AE Client OPC AE Client OPC AE Server 12:34 23.114 12:34 32.334

AE: Displaying Alarms and Events Alarms and events are usually displayed differently on an operator screen. - Events are displayed in an event list that can become quite long (typically 1000 entries), entries are not cleared when the source of the event returns to normal - Alarms are displayed in a short list (typically 50 alarms) appearance changes when the alarm is acknowledged, an alarm line is cleared when the alarm signal is cleared (but remains in the log). Ack checkbox

Usage and specifications Clients and Servers: configuration AE: Events 4.2.1 OPC Overview Usage and specifications Clients and Servers: configuration 4.2.2 OPC Data Access Objects, Types and properties Communication model 4.2.3 OPC Alarms and Events Specification Events Alarm Conditions 4.2.4 OPC Historical Data Specification Overview

AE: Events kinds OPC AE defines three kinds of events: simple: process control system related events (change of a boolean variable) condition-related: notifies a change of an alarm condition (CLEARED, ACKNOWLEDGED), (see later) tracking-related: origin outside of the process (e.g. operator intervention)

AE: Event- identification An event is identified by - its source (the object that generates the event. e.g. Tank1) and - the event name (which can be the same as in another object, e.g. HiLevelCond) HiLevelCond HiLevelCond event event Function Block LoLevelCond LoLevelCond event event event name Tank1 Tank2 event signal (boolean expression) is an external signal to be used ?(boolean) signal name for external signal (20 characters) name of the source (30 characters) message (60 characters)

AE: Events - Notification Tank1LevelHigh_SimpleEvent (source, timestamp, message, severity, category) AE Client specified communication COM/DCOM OPC AE Server queue unspecified communication network, fieldbus or internal bus event notification message Controller timestamp Event FB Tank1 Plant Level Switch

AE: Events - Time Stamp There are three places where events can be time-stamped: - at the device that originally produced the data (external event - low-level event) allowing Sequence-Of-Events with a high accuracy, down to microseconds - at the controller, (internal event) using the controller's clock to time-stamp messages giving accuracy not greater than the period of the tasks, about 1 ms. - at the OPC Server, when an event message arrives (tracking events) not more accurate than DA, about 10 ms) The OPC server can be configured to register the time stamp at the instant of the event transition (positive or negative) and the instant of the acknowledgement.

Overview: usage and specifications Clients and Servers: configuration AE: Alarm conditions 4.2.1 OPC Common Overview: usage and specifications Clients and Servers: configuration 4.2.2 OPC Data Access Objects, Types and properties Communication model 4.2.3 OPC Alarms and Events Specification Events Alarm Conditions 4.2.4 OPC Historical Data Specification Overview

AE: Alarms - Condition Definition An (alarm) condition is described in a named state machine The condition state is defined by three variables: Enabled: the condition is allowed to send event notifications Active: the alarm signal is true Acknowledged: the alarm has been acknowledged Alarm signal (e.g. FIC101.PV > 100 AND FIC101.PV < 150) Condition Acknowledgement signal (a positive transition of a boolean variable) Condition state Enable (positive transition) Disable (positive transition)

AE: Alarms - Condition states and acknowledgement event notification alarm signal acknowledgement Inactive Acked Active Unacked Active Acked Inactive Acked Active Unacked Inactive Unacked Inactive Unacked Inactive Acked condition state alarm_signal  condition state transitions (here: always enabled) Enabled Inactive Acked alarm_signal  EnabledActive Unacked EnabledActive Acked Ack  Ack  alarm_signal  Enabled Inactive Unacked alarm_signal  An event is generated each time the alarm signal changes state, or is acknowledged

AE: Alarms - Acknowledgement An alarm condition becomes active when the PLC produces an alarm signal describing an abnormal state defined by the application (e.g. the level of the tank is too high). The operator is expected to acknowledge this condition (client ack) Alternatively, a local operator may use a button or HMI that the PLC reads (field ack) event notification Tank1Level_ConditionEvent AE Client client ack (acknowledger ID) COM / DCOM OPC AE Server Network, field bus, or internal bus message Condition time- stamp LevelHigh controller AckButton (field ack) Alarm Signal

AE: Summary alarms and events AE Client AE Client COM / DCOM OPC AE Server OPC AE Server event notification (source, timestamp, message) alarm notification (source, timestamp, message, condition, subcondition, severity, type) message Condition timestamp Event FB message controller controller event alarm ack

What is the difference between Alarms and Events? OPC A&E: Assessment What is the difference between Alarms and Events? Where are Alarms and Events time stamped? How does the “message passing” paradigm influence the OPC client application developer? E: state change, A state that can trigger event notifications Depends, accuracy varies Ensures the same sequence of events is seen by all clients

Usage and specifications Clients and Servers: configuration OPC Common Overview 4.2.1 OPC Overview Usage and specifications Clients and Servers: configuration 4.2.2 OPC Data Access Objects, Types and properties Communication model 4.2.3 OPC Alarms and Events Specification Events Alarm Conditions 4.2.4 OPC Historical Data Specification Overview

GE Fanuc/Intellution iHistorian (iFix...) Historian Example GE Fanuc/Intellution iHistorian (iFix...) Questions to the historian: What was the value of FIC101 last week ? What was the flow average during October ? Which were the daily averages in October ? What was the total flow in each month ? How much fuel did we use for the batch ? Give the answers in form of tables, pie diagrams, spreadsheet, reports Features: Unlimited Point Collection Sub-Second Data Collection Rates Enhanced Data Compression True Thin Client Administration Fault Tolerant Architecture Data collection, archiving and retrieval Report generation Computations (e.g. VBScript) Secure access (FDA 21 CFR 11) 20'000 actions/ s, Up to 100'000 data points

HDA: Historical Data Access e.g. Trend Analysis e.g. Event Logger HDA Clients independent processes OPC HDA Server hidden calculations history database raw and ordered data collector OPC DA Server proprietary data acquisition Field device Field device

HDA: Purpose An OPC HDA server gives access to a historical data base (logs) in which data from the process have been collected and time-stamped, possibly through an OPC DA interface. The OPC HDA interface clients, such as trend analysis, product tracking or data mining, that require ordered access these data logs. The OPC HDA interface allows to: - browse the historical data base - retrieve data through proper filtering, e.g. by date range, by identity, by property - build aggregates over the retrieved data, such as average, minimum, maximum. - enter new entries, correct entries or remove entries - enter / delete annotations in the history data base

Data in the historical database are identified by their HDA: Raw log 12.3.02 13:40 Gpcpt2ofpbonne 4824 By definition, values are registered when they change. (even if data are acquired by periodic polling) 12.3.02 13:40 Cpt2bac 50 12.3.02 13:40 Gpcpt2bac 70 12.3.02 13:40 Gpcptbe2 45 12.3.02 13:41 Gpcpt1bac 151 12.3.02 13:41 Gpcpt1ofpbonne 4826 Data in the historical database are identified by their itemID (here, represented by their name), value, (of the respective type) quality (good, stale, bad), and timestamp (UTC). 12.3.02 13:41 Gpcptae2 45 12.3.02 13:41 Cpt1bac 49 12.3.02 13:41 Gpdefr2 64 12.3.02 13:41 Gpvoydef 2 12.3.02 13:41 Gpr3tempscycleprd 318 12.3.02 13:42 Gpstn1e1 16 12.3.02 13:42 Gpalarme1 12.3.02 13:42 Gpalarme2 12.3.02 13:43 Gpetatmodemarche 2 12.3.02 13:43 Gptpscycle 1346 12.3.02 13:43 Gpetatmodemarche 1 12.3.02 13:43 Gpdefgene1 16 12.3.02 13:43 Gpetatmodemarche 12.3.02 13:43 Gptpscycle 317 12.3.02 13:43 Gpdefr2 12.3.02 13:43 Gpvoydef 12.3.02 13:43 Gpdefgene1 12.3.02 13:44 Gpetatmodemarche 1 12.3.02 13:44 Gpr2tempscycleprd 1992 12.3.02 13:44 Gptpscycle 435 12.3.02 13:44 Gpalarme3 1 12.3.02 13:44 Gpalarme4 1 12.3.02 13:44 Gpalarme3 12.3.02 13:44 Gpcpt2ofpbonne 4823

HDA: How to reduce raw data (even before HDA comes into play) Data sent to the OPC DA server on change, collector records data in a circular buffer log Since storage capacity is limited, data are reduced by: if a variable is received more often than the log's minimal storage interval (e.g. 1s), the log keeps the latest of all values of the interval if (and only if) a received variable changed by more than the "exception deviation" (e.g. 5%, analog values only), it is entered into the log. if a variable changed by less than the exception deviation, it may be forced into the log after the log's maximum storage interval (e.g. 4 s) elapsed. min time max time max time max time max exception deviation min time = process value (event) = log entry If the time scale of the log is smaller than that of the trend display in this case, values have to be interpolated to be displayed correctly

HDA Application: Trend Display Parameters: time scale (with possible offset, zoom, pan) amplitude scale (low range, high range, scale units) style: smoothed, stepped, filled (several ways to display the same data) extrapolate: how to display values not received (e.g. because they did not yet change) log: how were data sampled

HDA: Hierarchical logs long-term log 1 hour_forever  5.2 MB / Year 1 2 3 27 28 29 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 september octobre october 1 mn_7 days log  6 MB yesterday d-2 d-3 d-4 d-5 d-6 d-7 today 1s_24 hours log: 50 traces @ 12 B  52 MB 23 24 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 A hierarchical log is built on the data contained in the parent log. To reduce the log size, several aggregations can be applied: - record only maximum, minimum, average over a period, etc... Actual data

Toy Examples: Logging Temperature Logging Temperature Data using OPC Task Overview •  Log Temperature Data to Matrikon OPC Server using •  Create and use Aliases in the OPC Server •  Read Temperature Data from MatrikonOPC Server •  Scaling/ConverCng funcConality inside the OPC Server •  Read Temperature Data from MatrikonOPC Server in a client App http://home.hit.no/~hansha/documents/subjects/IA6209/project/IA6209%20Project%20Work%20-%20Weather%20System.pdf

Real-Life Examples and Exercise Integration of redundant GE Mark V turbine controllers at a power plant The controllers tie into the plant’s main DCS, an ABB Advant control system. Process Portal B and MicroSCADA client applications are used to visualize process data from the turbine controllers. Exercise: Draw schema of system and describe which OPC specifications are used and how. Wind Generation AES Wind Generation manages 7 different wind farms across the United States, five of which comprise more than 500 turbines, with a total generating capacity of over 700 MW. There are six different turbine models, from four different manufacturers. Exercise: Explain which OPC concepts are useful in this context and how they can be applied to support a SCADA system http://www.matrikonopc.com/portal/downloads.aspx?dID=132 and https://www.matrikonopc.com/portal/downloads/case_studies/AESWindGeneration_OPC.pdf

To probe further…. OPC Foundation: Specifications http://www.opcfoundation.org SoftwareToolbox Examples in Visual Basic http://www.softwaretoolbox.com/Tech_Support/TechExpertiseCenter/OPC/opc.html The Code Project OPC and .NET http://www.codeproject.com/useritems/opcdotnet.asp Matrikon Free client and server: http://www.matrikon.com WinTech Toolkit for an OPC server http://www.win-tech.com/html/opcstk.htm NewAge Automation Toolkit for an OPC server http://www.newageautomation.com