You are on page 1of 56

Honeywell Process Solutions

Unified Real Time


Concepts Guide
UR90-200A R320 11/08

Release 320

Notices and Trademarks


Copyright 2008 by Honeywell International Inc. Release 320 November, 2008

While this information is presented in good faith and believed to be accurate, Honeywell disclaims the implied warranties of merchantability and fitness for a particular purpose and makes no express warranties except as may be stated in its written agreement with and for its customers. In no event is Honeywell liable to anyone for any indirect, special or consequential damages. The information and specifications in this document are subject to change without notice. Honeywell is registered trademark of Honeywell International Inc. Other brand or product names are trademarks of their respective owners.

Honeywell Industry Solutions 2500 West Union Hills Drive Phoenix, AZ 85027 1-800 343-0228

ii

Unified Real Time Concepts Guide

R320 11/08

About This Publication


In This Publication
Purpose This publication gives an overview of Unified Real Time (URT) infrastructure and explains the concepts related to URT. Who should use this publication If you are a control engineer involved in configuring control or other on-process applications hosted by URT, or if you are authoring new functionality for use within a URT environment and looking for the background information, this publication is for you. Prerequisites You should have some familiarity with process control or other on-process applications.

References
The following list identifies other publications in this book-set that may be sources of reference for material discussed in this publication.
If you are looking for instructions on implementation are a general user of URT looking for the procedural or how-to information are looking for information on use of URT Software Development Kit Refer Profit Suite Implementation Technical Reference Guide URT Users Guide Document ID RM20-520 UR20-200A

URT SDK Users Guide

UD20-200A

R320 11/08

Unified Real Time Concepts Guide

iii

About This Publication Contacts

Contacts
World Wide Web The following Honeywell web sites may be of interest to URT customers.
Honeywell Organization Corporate Process Solutions WWW Address (URL) http://www.honeywell.com http://www.honeywell.com/ps

Telephone Contact us by telephone at the numbers listed below.


Organization United States and Canada Honeywell International Inc. Process Solutions Phone Number 1-800-343-0228 1-800-525-7439 1-800-822-7673 (852) 23 31 9133 [32-2] 728-2711 (954) 845-2600 Sales Service Technical Support

Asia Pacific Europe Latin America

Honeywell Asia Pacific Inc. Hong Kong Honeywell PACE Brussels, Belgium Honeywell International Inc. Sunrise, Florida U.S.A.

iv

Unified Real Time Concepts Guide

R320 11/08

About This Publication Writing Conventions

Writing Conventions
Formatting Conventions Following formatting conventions are used in this publication.
Convention Words in bold type Arrow Explanation Field names including buttons in the display, or important phrases. Windows pull down menus and their options are separated by. For example, click File New to open the New Platform dialog. Courier font UPPERCASE UPPERCASE within angle brackets Information that you type, parts of the code quoted for explanations or as examples. Acronyms Command keys For example, press <ENTER>. Zero as a value. When there is a chance for confusion with the letter O, zero is denoted as . In all other cases, zero as a numerical placeholder is denoted as 0. For example, 1.0, 10, 101, CV1, parameter P.

Abbreviations and Terminology Following alphabetical list gives the technical definitions of terms specific to URT
Term Alarms and Events Check Point File Command Meaning OPC terminology. Equivalent URT term is message. See message. File that contains a snapshot of the full configuration data of a platform with extension .urt. Function blocks and other tree members respond to commands. For example, to get a function block to execute, a command must be sent to it. URT representation of numerical or string data. A data item could be Unified Real Time Concepts Guide v

Data Item R320 11/08

About This Publication Writing Conventions

Term

Meaning a scalar or array item. Many properties, such as the quality of the data, are associated with each data item.

Element Embedded PHD Function Block

Also referred to as a Tree Member. See Tree Member. Lightweight version of Uniformance PHD that doesnt require Oracle, used for real-time history. Function blocks provide automation and control functionality. Function blocks typically interact with data items to manipulate data. The data items can be connected to external systems via the OPC client. The time between function block executions. Configuring a historian to historize URT data items. Retrieving history data from a historian. After processing a message, the message manager decides whether it should be issued. The message manager may not issue the message if it has already been issued. The outermost node(s) in a URT tree. The maximum or minimum allowed value. A tool used to view URT events in the Windows Event Log. A textual message that informs the user of a condition. In the URT context, there are three types of message: Raise, Simple and Track. All messages are sent to the URT log file. The URT OPC Server also is informed of URT messages. File that contains message text and other message properties for messages that will potentially be raised. File that contains messages that the message manager has issued. Ole for Process Control industry standard. The URT OPC Client can be configured to connect to any OPC server to get or put data. The URT OPC server runs as a separate executable. Any OPC Unified Real Time Concepts Guide R320 11/08

Interval History Collection History Retrieval Issue (a message) Leaf node Limit Log Viewer Message

Message source file Message log file OPC OPC Client OPC server vi

About This Publication Writing Conventions

Term

Meaning client can connect to URTs OPC server and request URT data.

OPC A&E server OPC HDA server Platform

The URT OPC server also implements an Alarms and Events (A&E) server that informs its clients of URT Alarms and Events. Most historians implement an OPC HDA (history data access) server which serves up history data. A process that contains the function blocks and data items that carry out application functionality and executes the configured applications in real-time To a process control engineer, process usually refers to a manufacturing process or plant. To a programmer, a process is an executable program. To avoid confusion, the term Windows process is used to refer to an executable program.

Process

Pull (data) Push (data) Quality Raise (a message) Range Save a platform Scheduling block Tree Tree Member Windows Process

To read data from an external (or sometimes internal) source. To write data to an external (or sometimes internal) source. A property typically associated with data. Indicates the status of the data for example suspect. Function blocks raise messages via the message manager. The message manager decides whether it should be issued. A contiguous set of numerical values from a low value to high value. Platform configuration is written to an .URT file. A URT tree member that can be configured to schedule function blocks to run at specified intervals. Also known as platform. The URT platform configuration is a Tree structure. An item configured on the URT platform. Tree members can be data items, function blocks, scheduling blocks, etc. A Microsoft computer process.

R320 11/08

Unified Real Time Concepts Guide

vii

About This Publication Writing Conventions

Symbol Definitions Following symbols are used in this publication to denote certain conditions.
Symbol Definition ATTENTION: Identifies information that requires special consideration.

TIP: Identifies advice or hints for the user, often in terms of performing a task. REFERENCE -EXTERNAL: Identifies an additional source of information outside of the book-set. REFERENCE - INTERNAL: Identifies an additional source of information within the book-set.

CAUTION

Indicates a situation which, if not avoided, may result in equipment or work (data) on the system being damaged or lost, or may result in the inability to properly operate the process.

viii

Unified Real Time Concepts Guide

R320 11/08

Contents
1.
1.1

OVERVIEW OF URT ....................................................................13


About URT...................................................................................................... 13
Introduction to URT ..............................................................................................................13 Features ...............................................................................................................................14

1.2

Building Blocks ............................................................................................. 15

Platforms ..............................................................................................................................15 Function blocks ....................................................................................................................15 Scheduling module...............................................................................................................16 Data items ............................................................................................................................16 Data wrappers......................................................................................................................17

1.3

Subsystems ................................................................................................... 17

URT Explorer .......................................................................................................................17 URT Messaging System.......................................................................................................17 Process interface components .............................................................................................18 History Collection and Retrieval ...........................................................................................18 Checkpoint Function Block...................................................................................................18 URT Service.........................................................................................................................19

2.
2.1

PLATFORMS ...............................................................................21
Introduction to Platforms ............................................................................. 21
What is a URT platform ........................................................................................................21 How many applications per platform ....................................................................................21 How many platforms per computer ......................................................................................21

2.2 2.3

Structure ........................................................................................................ 22 Operation ....................................................................................................... 23

3.
3.1 3.2 3.3

DATA ITEMS................................................................................25
Introduction to Data Items............................................................................ 25 Types of Data Items ...................................................................................... 26 Attributes of Data Items................................................................................ 26

4.
R320 11/08

FUNCTION BLOCKS ...................................................................29


Unified Real Time Concepts Guide ix

Contents

4.1 4.2 4.3

Introduction to Function Blocks ..................................................................29 Organizing Function Blocks .........................................................................29 Organizing Data .............................................................................................30

Introduction to organizing data ............................................................................................ 30 Function-centric organizatin ................................................................................................ 30 Data-centric organization .................................................................................................... 32

5.
5.1 5.2

COMMANDS................................................................................ 35
What is a command .......................................................................................35 How does a command work .........................................................................35

6.
6.1 6.2

EXECUTION ................................................................................ 37
Execution Scheduling ...................................................................................37 Execution Cycle .............................................................................................37

Overview of execution cycle ................................................................................................ 37 PreExecute.......................................................................................................................... 38 Execute ............................................................................................................................... 38 PostExecute ........................................................................................................................ 38

6.3

Execution Thread...........................................................................................39

7.
7.1 7.2

MESSAGING ............................................................................... 41
URT Messaging System ................................................................................41 Components of Messaging System.............................................................43

Message source file ............................................................................................................ 43 Message component ........................................................................................................... 43 Message manager component ............................................................................................ 44 Receiving Notification of an Acknowledgment..................................................................... 47 Support for raising messages.............................................................................................. 47 Interface with URT OPC Alarms and Events Server ........................................................... 47

8.
8.1 8.2 8.3 8.4
x

PROCESS INTERFACE .............................................................. 49


Introduction to Process Interface in URT....................................................49 About OPC......................................................................................................50 URT OPC Server ............................................................................................51 URT OPC Client for Data Access .................................................................51
Unified Real Time Concepts Guide R320 11/08

Contents

9.
9.1 9.2 9.3

HISTORY COLLECTION AND RETRIEVAL................................53


Introduction to History Collection and Retrieval in URT ........................ 53 URT History Collection ................................................................................. 54 URT History Retrieval ................................................................................... 54

10.

SECURITY....................................................................................55

R320 11/08

Unified Real Time Concepts Guide

xi

This page is left intentionally blank.

xii

Unified Real Time Concepts Guide

R320 11/08

1. Overview of URT
1.1 About URT
What is URT? Unified Real Time (URT) is an infrastructure for implementing real-time, advanced process control applications. Where can you use URT? In Honeywells layered approach to process control, URT based applications fit in the uppermost layer. Level-one and level-two process control that is critical for reliable, safe, and effective operation generally resides in a process system rather than in a URT environment. URT, then, provides the infrastructure to implement level-three process control applications. These applicationsoften large and complexcater to increasing profitability of the operation, additional automation, or other value-added services such as online optimization, early event detection, and so on. URT includes the service of OPC client and server for communicating to the process system and devices. If a client requires services such as access to process data or realtime execution, the client application can use URT as a slave to achieve this. Thus, you can use URT as a complete infrastructure or as a set of tools, depending on your applications needs. What are the prerequisites? By itself URT does not provide connection to process devices. Therefore, it requires the services of one or more process systems through which it can input and output process data. To use URT effectively, level-one and level-two control layers should already be in place. URT requires Windows 2000 or later as the operating system. Introduction to URT

R320 11/08

Unified Real Time Concepts Guide

13

1. Overview of URT 1.1. About URT

Features The strength of URT lies in its generality, flexibility, modularity, and scalability. Generality:

URTs design is not restricted to any specific application. It supports all the commonly used data types and structures. It includes the services of an OPC client and an OPC server to communicate with any third-party control system. It uses Unicode character encoding throughout, making it easy to represent multilingual text, particularly in the operator interfaces.

URT is thus best suitable for unifying different on-process applications developed at different times and for different situations. Flexibility:

Using URT infrastructure, you can develop a variety of applications that have different execution scheduling, thread use, and organization. Depending on the applications needs, you can use it either as a complete infrastructure or as a set of tools.

Modularity:

Owing to the organization in different function blocks, you can reuse the function blocks providing common functionalities and minimize redundant development and maintenance. You can build complex applications in modular steps.

Scalability:

The applications developed using URT infrastructure can cover a wide range of application sizes, complexity, and mixes.

14

Unified Real Time Concepts Guide

R320 11/08

1. Overview of URT 1.2. Building Blocks

1.2

Building Blocks
A URT platform provides the framework on which applications are configured and executed. A platform

Platforms

Holds the function blocks and data items that carry out application functionality, and Executes the configured applications in real-time.

Any number of applications can reside on a single platform and any number of platforms can be executed on a single computer. REFERENCE - INTERNAL
For more details, see "Platforms".

Function blocks Function blocks are in-process components that you can configure to provide desired automation and control functionality. Function blocks can range from small functions such as a digital filter or a PID loop to very large functions such as a multivariable controller. URT provides function blocks that are generally needed for platform operations such as scheduling and execution of other function blocks. It also provides an OPC Client function block for interfacing with the process that is outside of URT. You can develop the function blocks in programming languages that are compatible with COM or .NET, such as C++, C# and VB.NET.

R320 11/08

Unified Real Time Concepts Guide

15

1. Overview of URT 1.2. Building Blocks

The URT Software Development Kit provides the base class, boilerplate code, and a wizard for authoring new function blocks. REFERENCE - INTERNAL
For more background information on function blocks, see "Function Blocks".

Scheduling module A scheduling module controls the execution of all components under it. It includes a scheduling block and the components under the scheduling block. REFERENCE - INTERNAL
For more information on scheduling and execution, see "Execution".

Data items Data items are in-process components that make data visible outside the function blocks that use the data. A data item is created to hold a piece of data for any of the following reasons.

The data is to be pulled from or pushed to another data item during execution. The data will be accessed by clients such as configurators, operating displays, or the OPC server. The data must be persistent across restarts.

Data items can be created either by a function block that uses the data or by a configurator, and can be created statically or dynamically. A data item can be a scalar value, a container (array, list, stack, queue, and so on) or a structure. Containers and structures can be nested to any level. Multi-dimensional arrays to any level can be formed by creating arrays of arrays (to any level) of elements. URT provides all the usual data types. In addition to the value or values that it exposes, a data item has attributes such as a name, description, engineering units, an optional connection to another data item, optional input and output buffer, quality, and reasonable-value range. REFERENCE - INTERNAL
For more information on the properties of data items and the reasoning behind configuring the properties see Data Items.

16

Unified Real Time Concepts Guide

R320 11/08

1. Overview of URT 1.3. Subsystems

Data wrappers If you are using C++ to implement function blocks, you will be using data wrappers. Data wrappers are C++ classes that wrap data item components to make the data items easy to use. In VB and C# data items are used directly as these languages hide the complexities of component usage.

1.3

Subsystems
URT Explorer gives a visual depiction of a URT platform, its components and structure. You can use it

URT Explorer

To create, configure, monitor, and operate URT platforms To view messages To add, delete, reorganize and configure data items and function blocks As a tool for developing and testing new functionality and applications To visualize the structure and operation of a URT platform

URT Explorer can be used to configure any application instance. However, application authors may consider providing a custom user interface for configuration of an application instance on the URT infrastructure. Such a custom interface can provide defaults and guidance to your users, making the configuration easier and user friendly. Though URT Explorer can be used with any application, it is not intended to be used by operators. For operators, you should provide interfaces tailored to your application. Operator interfaces can be implemented within the HMIWeb framework supported by URT (not supported in Release 220), or using an OPC client to communicate with URT. URT Messaging System The URT messaging system is used to issue messages and alarms to the user. You can view, sort and filter current messages and alarms in URT Explorer. In addition, all messages and alarms are logged into the Windows Event Log. This log can also be viewed via URT Explorer. URT messages and alarms integrate seamlessly with Honeywells Experion Alarms and Events system via the URT OPC Alarms and Events server.
R320 11/08 Unified Real Time Concepts Guide 17

1. Overview of URT 1.3. Subsystems

The message text and other message parameters, such as message priority, are stored in XML formatted message source files. Because of this, URT messages can be localized. REFERENCE - INTERNAL
For background information on the URT messaging mechanism, see "Messaging".

Process interface components As URT is mainly designed for developing process control related applications, it supports the OPC standards. URT includes:

The OPC client capability to communicate with process systems. It provides a function block OPC Client for Connections to exchange data with an OPC Server. An OPC server (both Data Access and Alarms and Events) that external clients can use to access URT platforms data. The OPC server provides an industry-standard interface for clients that have no knowledge of URT components.

To communicate with a process system that does not support an OPC (DA) server, you may provide custom client capability. REFERENCE INTERNAL
For more background information on OPC communication in URT, see Process".

History Collection and Retrieval Many applications like lab update have short term history needs; in order to historize a value and to also retrieve history values. URT addresses this with the following components:

The capability to automatically configure embedded PHD to collect history from URT data items. It provides a function block Collect History to do this. The OPC client capability to retrieve history. It provides a function block OPC Client for History to retrieve data from an OPC (HDA) Server.

Checkpoint Function Block

An automatic checkpoint function block CheckPoint is provided with URT. It is capable of automatically checkpointing a URT platform, or a branch of a platform. The checkpoint frequency is based on the scheduler interval it is running under.

18

Unified Real Time Concepts Guide

R320 11/08

1. Overview of URT 1.3. Subsystems

URT Service Every time you start your computer, URT Platform Launcher launches all the URT platforms available in the platform directory that are configured to start automatically. You can configure a platform to either start automatically or manually. URT Service also monitors the status of platforms.

R320 11/08

Unified Real Time Concepts Guide

19

This page is left intentionally blank.

20

Unified Real Time Concepts Guide

R320 11/08

2. Platforms
2.1 Introduction to Platforms
A URT platform is a collection of data items, function blocks and schedulers that you configure to monitor, automate, and control all or part of a plant. Each URT platform is a COM component that runs in its own Windows process. Data items and function blocks that are configured on the URT platform are in-process components to insure efficient processing. How many applications per platform In the context of URT, an application is a closely related set of functionalities, typically organized and packaged so that instances of the application can be easily configured on a platform. An application can be as small as a single-loop controller or as large as a multivariable controller or on-line optimization. URT does not impose restrictions on the number of applications that you may configure on a single platform. The host computers processing and memory resources will limit the number of applications that reside on the platforms on a given computer. How many platforms per computer You can execute any number of platforms on a single computer. Data connections are configured much the same way whether they are within a platform or between platforms, either local or remote, so you have considerable flexibility in deciding how to distribute applications. You may decide to use more than one platform on the same computer, for

What is a URT platform

Increasing robustness: Platforms run as separate Windows processes limiting the scope of any problem that might occur. Providing independence between plant areas that are administered and operated by different departments

However, exchange of data between components on different URT platforms is significantly less efficient than exchange of data between components on the same URT platform, particularly if the platforms are on different computers. Therefore, you should

R320 11/08

Unified Real Time Concepts Guide

21

2. Platforms 2.2. Structure

keep functions that are closely related and that exchange considerable data with each other on the same URT platform.

2.2

Structure
A platform consists of a tree of component nodes, as shown in the left pane of URT Explorer.

Each platform consists of


A top component (

icon ) serving only as an attachment point to the platform itself icon) icon).

One or more scheduling modules (

One or more function blocks under each scheduling module (

Various types of data items (magenta icons), typically under the function block that uses them.

22

Unified Real Time Concepts Guide

R320 11/08

2. Platforms 2.3. Operation

Use URT Explorer to see the visual representation of the platform structure. Different icons are assigned to different types of components. Components that contain other child components are called container components. URT Explorer shows the container components in the left pane in the form of a tree structure. The child components of the component selected in the left pane are listed in the right pane. The right pane includes the non-container components (leaf nodes) as well as the container components that are children of the selected component. URT places no restrictions on how components are organized in a platform, but only certain organizations make functional sense based on what a component does.

2.3

Operation
Create You typically use URT Explorer to create a new platform and configure applications on it. Applications may also programmatically create platforms for their use. Save A platform can be saved at any time to a checkpoint file. The entire state of the platform, including configuration information and data values, is captured in the checkpoint file. The platform can be reloaded later from the checkpoint file, for example if the host computer is restarted. The name assigned to the checkpoint file is the name of the platform. You must save a newly created platform before it becomes operational. The components of a platform become operational within the platform as soon as they are added. However, the platform, as a whole, is not available for data connections with other platforms and for use by other URT subsystems like OPC Server, URT Manager, and URT Scheduler until it has been saved the first time after it is created. In addition, the platform has no persistent file from which to reload it until it has been saved. Run When a platform starts running, the platform component starts in a Windows process. The platform then loads itself from the specified checkpoint file and starts running at its last saved state. The following methods are available to start running a platform:

You can manually start a platform by opening its checkpoint file in URT Explorer, or by requesting URT Manager to start it.
Unified Real Time Concepts Guide 23

R320 11/08

2. Platforms 2.3. Operation

URT Service starts all platforms that are configured for automatic restart when the platforms host computer starts up.

Once a platform is started, it remains running indefinitely. Kill In the context of URT, killing a platform is to completely stop it and shut down its Windows process. The only way to stop a running platform is to kill it. Of course, when you shut down the host computer itself, then you also stop the running platform. A killed platform exists as its last saved checkpoint file. Client connections URT Explorer, URT Service, and other clients may connect to a running platform from time to time to read and write data, change configuration, etc. When a client disconnects (such as when URT Explorer exits or closes the platforms file), the platform continues to run in its Windows process and is not affected by the disconnection.

24

Unified Real Time Concepts Guide

R320 11/08

3. Data Items
3.1 Introduction to Data Items
Data items are similar to variables in a programming language. The purpose of data items is to expose data in a URT platform tree for following purposes.

To allow the data to be viewed and entered by external clients, such as URT Explorer, OPC Server, operator interface, or another client system. To make the data persistent: Data item values are check pointed whenever a platform is saved so that they can be restored when the platform is reloaded. To facilitate exchange of data between function blocks or other components: A data item can be configured to pull or push its value from or to another data item. The data movement is done in concert with function block execution so that the data is as fresh as possible. To provide dynamic indirection: Dynamic indirection allows a function block to access data (anything from a single value to a large structure) via a reference that can be changed on the fly. To associate attributes with a value, such as quality, type, access permissions, reasonable value range, name, description, and so on.

Data items can be added to and deleted from running systems as needed. Function blocks can create and/or connect to data items and use a data item much the same as if it were a normal program variable.

R320 11/08

Unified Real Time Concepts Guide

25

3. Data Items 3.2. Types of Data Items

3.2

Types of Data Items


URT supports various types of data items. These include

Scalars Strings Arrays (or vectors), list, queue, and stack.

Multi-dimensional arrays to any level can be formed by creating arrays of arrays (to any level) of elements.

Structures

Structures and containers can be nested to any level.

URT Explorer uses different icons to represent different data types for better visual distinction.

3.3

Attributes of Data Items


In addition to Name and Description used to identify a data item, URT data items have the following attributes. Connection You can configure a data item to read or write its value(s) from or to any other data item using the connection property, that is, by specifying path name of the other data and type of connection (push or pull). Range Range of a data item enforces entry of reasonable values, making it impossible for the data items value to lie outside this range. Ranges apply only to numerical types of data items, including time and enumeration types.

26

Unified Real Time Concepts Guide

R320 11/08

3. Data Items 3.3. Attributes of Data Items

Buffer Most data item types can optionally maintain three copies of their data: an input buffer, the working data, and an output buffer. While the calculations are being done on the working value

Other components can keep writing values to the data item using the input buffer. Clients can obtain a consistent snap-shot of data items value, without the possibility of the values changing while the data is being acquired, using the output buffer.

Quality Each data items value has a quality attribute associated with it. The quality value uses the convention adopted by the OPC standard for OPC quality flags. Each quality attribute is a two-byte word with bit fields as defined in the OPC standard.

R320 11/08

Unified Real Time Concepts Guide

27

This page is left intentionally blank.

28

Unified Real Time Concepts Guide

R320 11/08

4. Function Blocks
4.1 Introduction to Function Blocks
Function blocks do the actual work of carrying out the functionality provided by applications. One or more function blocks together make an application. URT provides function blocks that are generally needed for platform operations such as scheduling and execution of other function blocks. Function blocks are executed under a scheduling module. A scheduling module controls the execution of all components under it. REFERENCE - INTERNAL
For information on execution, see Execution".

4.2

Organizing Function Blocks


An application instance may consist of:

A single function block under a scheduling module, or Several collaborating function blocks under a scheduling module, or Function blocks under several scheduling modules

Modular organization: Even within the same scheduling module, if you split your application in several logical function blocks, you can reuse a function block in more than one context and get the benefits of modularity. For example, suppose a single-loop controller includes filtering of the input. You can either

Implement the filter algorithm and the control algorithm in one function block, or Implement the filter algorithm and the control algorithm in separate function blocks, and connect them.

With the second option, you can reuse the filter algorithm with other control algorithms or other kinds of function blocks that need filtered inputs.

R320 11/08

Unified Real Time Concepts Guide

29

4. Function Blocks 4.3. Organizing Data

To copy the output from the filter to the input of the function block that uses the filtered value, you need to simply configure a connection.

4.3

Organizing Data
In general, a function block should create the data items that it uses when it is added to a platform tree to make it generic. However, function blocks can use data items anywhere in the platform tree, so there are many possibilities for organizing data and function block instances. Two possibilities are briefly discussed in the following sections, Function-centric organizatin and Datacentric organization.

Introduction to organizing data

Function-centric organizatin About function-centric organization In this model, each instance of an application consists of a scheduling module with the function block (s) under it, and the data used by a function block is placed under the function block.

30

Unified Real Time Concepts Guide

R320 11/08

4. Function Blocks 4.3. Organizing Data

Advantages Some advantages of this organization are that the scheduling of each instance is independent, and it is simple to add function blocks that provide optional functionality to only the instances that require it. This organization will be familiar to control engineers who have used typical process control systems.
R320 11/08 Unified Real Time Concepts Guide 31

4. Function Blocks 4.3. Organizing Data

Scheduling blocks can be hung under the top platform node, function blocks can be hung under scheduling blocks, and data items can be hung under any of these because scheduling blocks and function blocks are all derived from a list of component type, so they can behave as a list. Data-centric organization About data-centric organization In this model, an application uses only one instance of a scheduling module with one instance of the applications function blocks(s) under it. The data may be under this scheduling module, another scheduling module just for the data, or under the top node and not under any scheduling module. The data generally consists of a list of structs. Each struct houses all the information for one instance of the functionality. The function block iterates through the list, and processes each struct that it finds. Adding an instance consists of adding an additional struct to the list.

32

Unified Real Time Concepts Guide

R320 11/08

4. Function Blocks 4.3. Organizing Data

Example of data-centric organization Consider an application that does calculations for refinery tanks. Each tank has a struct in the tank list that contains measured inputs for the tank, strapping table data, entered lab analyses, and so on, plus data items to hold calculated results such as volume of stored material, material balance closure around the tank, indications of inconsistent valve lineups, etc. The function block processes the inputs in each tank struct and puts its outputs in the struct.

R320 11/08

Unified Real Time Concepts Guide

33

4. Function Blocks 4.3. Organizing Data

Advantages of data-centric organization An advantage of this organization is the ease of adding or deleting an instance, such as a tank in the above example. Configuring data list The data list in the data-centric organization may need to be under a scheduling module because data items may need to do some processing, such as pulling data from a connected process input data item or moving data in and out of buffers. If the data items should be updated at the same interval as the function block calculations, the data list can be configured under the same scheduling module as the function block. If the data items should be updated at a different interval, perhaps more frequently so an operator can see process input changes sooner, the data list can be configured under a different scheduling module.

34

Unified Real Time Concepts Guide

R320 11/08

5. Commands
5.1 What is a command
URT uses the concept of a command to allow a component to tell the branch below it to do something. While doing so, the component that issues the command only knows its immediate children and nothing about what other components are in its branch or how they are organized. For example, a Save command is issued at the top node to cause the platform to save its state to a checkpoint files. It is not necessary to understand commands to be able to use URT effectively. Operation of commands is described here to provide a little insight into how URT works.

5.2

How does a command work


A command works as follows. 1. 2. 3. 4. A component that wants its branch to do something issues the appropriate command to each of its child components. Each child component carries out whatever actions it needs to do in response to the command, and then in turn issues the command to each of its children. In this way, the command propagates throughout the branch until it reaches all the leaf nodes. Control returns to the component that originally issued the command. At this point, all the components in the branch headed by the issuing component have had a chance to take appropriate action for that command.

R320 11/08

Unified Real Time Concepts Guide

35

This page is left intentionally blank.

36

Unified Real Time Concepts Guide

R320 11/08

6. Execution
6.1 Execution Scheduling
In URT, a scheduling module controls the execution of all components under it. Execution can be scheduled in different ways.
Interval scheduling Demand scheduling A module is executed periodically at a specified interval. A module is executed when triggered by a function block in another module, by an operator, by an external client, and so on. The module is executed periodically but also can be demanded at any time.

Combination of Interval and demand scheduling

6.2

Execution Cycle
When a scheduling module is executed, either at a scheduled interval or because of a demand, the scheduling block sends a series of commands that constitute an execution cycle to its branch. An execution cycle consists of three commands carried out in sequence: PreExecute, Execute, and PostExecute. For most function blocks, the execution cycle is completed in the branch headed by the function block before going on the next function block. This ensures that data connections transfer the most recently calculated data. Some function blocks choose a different execution cycle option so that their PreExecute and PostExecute commands can run before and after the other function blocks in the module. For more details on execution cycle scheduling, see URT Programmers Guide. The actions generally performed in response to the execution cycle commands are as follows.

Overview of execution cycle

R320 11/08

Unified Real Time Concepts Guide

37

6. Execution 6.2. Execution Cycle

PreExecute A data item does the following in PreExecute:

If it has an input buffer, the data item moves the value from its input buffer to its working value If it has a pull connection, the data item copies to its working value from the output buffer (or working value if no output buffer) of the connected component.

This ensures that input data is fresh for function block use in Execute. Function blocks generally do not implement PreExecute. An exception is the OPC Client function block. It obtains its inputs in PreExecute so that they are fresh for other function blocks use in Execute. To ensure that data from OPC Client is fresh for other function blocks, either 1. 2. Execute A function block generally performs its main functionality in Execute. Data items do not implement Execute. PostExecute A data item does the following in PostExecute:

The OPC Client function block instance is configured in the same scheduling module as the function blocks that use the process input data, or The OPC Client function block is in a scheduling module that is synchronized with the scheduling module of the function blocks that use the process input data.

If it has an output buffer, the data item copies its working value to its output buffer. It also copies the working value to the input buffer so that a client only needs to access the input buffer for both data entry and data display. However, it does not copy the working value to the input buffer if a value has been stored to the input buffer since the input buffer was last copied to the working value, so that inputs are never lost. If it has a push connection, the data item copies value of its output buffer (or working value if no output buffer) to the input buffer (or working value if no input buffer) of the connected component.

Function blocks generally do not implement PostExecute.

38

Unified Real Time Concepts Guide

R320 11/08

6. Execution 6.3. Execution Thread

An exception is the OPC Client function block. It sends its outputs during PostExecute so that they can take effect as soon as possible. To ensure that outputs take effect as soon as possible, either 1. 2. The OPC Client function block instance is configured in the same scheduling module as the function blocks that use the process input data, or The OPC Client function block is in a scheduling module that is synchronized with the scheduling module of the function blocks that use the process input data.

6.3

Execution Thread
Each scheduling module maintains its own thread for execution of the modules components. You can set the execution priority for each scheduling module. You should assign lower priorities to applications that have long execution periods and that execute for a long time, and higher priorities to applications that have short execution periods and that execute for a short time. In this way, large, processing-intensive applications can coexist with small, fast-running applications on the same platform.

R320 11/08

Unified Real Time Concepts Guide

39

This page is left intentionally blank.

40

Unified Real Time Concepts Guide

R320 11/08

7. Messaging
7.1 URT Messaging System
A message generally indicates that an unusual event has just occurred an error, abnormality, interesting situation, unintended performance, and so on. The URT messaging system is used to

Generate messages and keep track of current messages. Filter out redundant messages. Log messages. Send messages to the URT OPC Alarm and Events (A&E) Server.

The message diagram shows a typical message scenario. A message issuer typically a function block gives the command to issue a specific message based on a message handle. The Message component finds the message based on the message handle in the XML formatted message source file, and the message is loaded into the message component. To raise the message, the message component - which contains the message is sent to the message manager. If the message type is Simple, then the message is raised unconditionally. If the message type is Condition, then the message is only raised if it has not yet been raised. All raised messages are logged in the Windows Event Log and the OPC A&E server is informed of the new messages as well.

R320 11/08

Unified Real Time Concepts Guide

41

7. Messaging 7.1. URT Messaging System


(10) Notified that ACK has occurred

Message Issuer

(3) Sends Message component to Message Manager

Message Manager Component

(1) Raises a Message based on a specific message handle (4)Raise message if message type is Simple or Tracking Raise message if message type is Condition and message has not yet been raised.

Message Component

(2) Message from the xml Message Source file is loaded into the message component (6) Informs A&E Server of Message

Message Source File

(5) Writes Message to xml log file

Message log File

URT OPC Alarms and Events Server

(9) Notifies that ACK has occurred

(7) Informs A&E Clients of Message

(8) Operator Acknowledges message

OPC Alarms and Events Client (Message Display)

42

Unified Real Time Concepts Guide

R320 11/08

7. Messaging 7.2. Components of Messaging System

7.2

Components of Messaging System


Message source files are convenient containers for storing the messages a user may want to raise. The main advantages of message source files are that no code needs to be recompiled if message text has to change and it promotes localization. Message source files contain not only the message text, but also many other message properties related to the message. Properties of a Message in the Message Source File: The following list shows the message properties.

Message source file

Handle Type Text Category Group Priority ConditionName AckRequired

Message component The message component is responsible for retrieving a single message from the message source file. Typically, this is done by specifying the message handle of the message to retrieve. The message and all the messages properties if found are loaded into the message component. Prior to raising the message, any message property can be modified in code For example the message priority can be changed from HIGH (as specified in the message source file) to LOW, or alternately the message text can be changed, Etc. Once all the message properties are set appropriately, the message is raised by sending the message component (which contains the message) to the message manager.

R320 11/08

Unified Real Time Concepts Guide

43

7. Messaging 7.2. Components of Messaging System

Message manager component About message manager component Messages are raised via the message manager. The message manager is created by a URT platform when the platform initializes. The message manager is the brain of the messaging system as it keeps track of which messages need to be raised and which messages need to be cleared for the whole platform. The message manager logs these messages to the Windows Event Log and informs the URT OPC A&E server when there are raised or cleared messages. Message manager also takes care of callbacks associated with messages that require acknowledgement. How the Message Manager Decides to Raise and Clear Messages The message types Condition and Simple have special meanings in the context of URT messaging. A function block can raise a message anytime that a message triggering condition exists. However, if this condition persists for a number of consecutive executions, the operator should not be bothered with a series of identical messages. Therefore, if the message type is Condition, the message manager automatically screens out redundant messages and raises only those messages that are not redundant. However, if the message type is Simple, the message is raised every time the message triggering condition exists. The following examples illustrate how the message manager decides to raise and clear messages, and how to raise messages unconditionally. Messages of type Condition correspond to the A&E OPC condition event type. Simple message types correspond to the A&E simple event type.

44

Unified Real Time Concepts Guide

R320 11/08

7. Messaging 7.2. Components of Messaging System

Example Message of Type Condition This example assumes a function block executing at a fixed interval; the function block is raising a message of type Condition. Furthermore, a message is raised at interval 1, stays raised at interval 2, and gets cleared at interval 3. The most important thing to note is that the message does not get re-raised at interval 2.
Interval 1 1 Description Function block FB1 raises a message of type = Condition. The handle of the message is MYCONDITIONMSG. Message manager checks the current message queue to determine if FB1 has already raised MYCONDITIONMSG. The manager doesnt find the message and raises the message. The MYCONDITIONMSG message is put into the current message queue with a status of ACTIVE At the end of interval 1, FB1 sends a ClearAllUnRaisedMessages to the message manager. The manager loops through the current message queue by FB1 and searches for messages with a status of NEEDS CLEARING. It doesnt find any, thus no messages are cleared. Then the manager sets the status of all FB1 messages to NEEDS CLEARING. FB1 re-raises the MYCONDITIONMSG message. Message manager checks the current message queue to determine if FB1 has already raised MYCONDITIONMSG. The manager finds the message. The MYCONDITIONMSG message is left in the current message queue but its status is changed from NEEDS CLEARING to ACTIVE. At the end of interval 2, FB1 sends a ClearAllUnRaisedMessages to the message manager. The manager loops through the current message queue by FB1 and searches for messages with a status of NEEDS CLEARING. It doesnt find any, so no messages are cleared. Then the manager sets the status of all FB1 messages to NEEDS CLEARING. FB1 does not raise the MYCONDITIONMSG message. At the end of interval 3, FB1 sends a ClearAllUnRaisedMessages to the message manager. The manager loops through all current messages and determines that the MYCONDITIONMSG message NEEDS CLEARING and thus Unified Real Time Concepts Guide 45

1 1

2 2

2 2

3 3 3 R320 11/08

7. Messaging 7.2. Components of Messaging System

Interval

Description MYCONDITIONMSG is cleared.

Example Message of Type Simple This example assumes a function block executing at a fixed interval; the function block is raising a message of type Simple. Furthermore, a message is raised unconditionally at interval 1, gets re-raised at interval 2, and is not raised in interval 3. The most important thing to note is that the message may inundate the message system because a new message will be raised every interval the call occurs.
Interval 1 1 1 1 Description Function block FB2 raises a message of type = Simple. The handle of the message is MYSIMPLEMSG. Message manager raises the MYSIMPLEMSG message unconditionally. It does not store the message in the current message queue. At the end of interval 1, FB2 sends a ClearAllUnRaisedMessages to the message manager. The manager loops through the current message queue by FB2 and searches for messages with a status of NEEDS CLEARING. It doesnt find any message, so no messages are cleared. Function block FB2 raises a message of type = Simple. The handle of the message is MYSIMPLEMSG. Message manager raises the message MYSIMPLEMSG unconditionally. It does not store the message in the current message queue. At the end of interval2, FB2 sends a ClearAllUnRaisedMessages to the message manager. The manager loops through the current message queue by FB2 and searches for messages with a status of NEEDS CLEARING. It doesnt find any message, so no messages are cleared. Function block FB2 does not raise a message. At the end of interval3, FB2 sends a ClearAllUnRaisedMessages to the message manager. The manager loops through the current message queue by FB2 and searches for messages with a status of NEEDS CLEARING. It doesnt find any message, so no messages are cleared. Unified Real Time Concepts Guide R320 11/08

2 2 2 2

3 3 3

46

7. Messaging 7.2. Components of Messaging System

Differences between Condition and Simple The examples clearly illustrate that Simple message can easily inundate the messaging system with duplicate messages. So typically a function block writer will want to use Condition instead of Simple. Having said this, there are circumstances where using Simple is totally justified, for example, in initialization code that is only executed once, etc. Receiving Notification of an Acknowledgment In the typical case, the function block that raises a Condition type of message is not notified of an acknowledgment that occurs at a message display. For Condition type messages function block a function block can subscribe to the message manager to be notified of acknowledge event. The AckRequired field of the condition message will be set to YES to indicate that the condition requires Acknowledgement. This instructs the message manager and the OPC server to track the condition accordingly. Support for raising messages The methods that function block writers use have been wrapped to make the raising or clearing of a message simple. The methods do all the dirty work like retrieving the message from the correct message source file and communicating the message to the message manager. Interface with URT OPC Alarms and Events Server About interface with URT OPC A&E server The URT OPC A&E server subscribes to URT messages. As a result, all URT messages are available via URTs OPC A&E server. OPC clients can then hook up to URTs OPC A&E server to retrieve URT messages. A typical example of this takes place when URT is running on a Honeywell Experion PKS system. The messaging system of Experion PKS subscribes to URTs OPC A&E server, and as a result, all URT messages can be viewed via Experion PKSs messaging displays. OPC A&E Event Properties Sometimes you may want finer control over the value of an A&E property, for example, you may want to set the severity to a specific value, rather than rely on the severity that URT assigns a message. Because of this, URT allows you to set A&E event properties directly.
R320 11/08 Unified Real Time Concepts Guide 47

7. Messaging 7.2. Components of Messaging System

Like all other message parameters, A&E properties can be set three ways, via the message source file, programmatically via the properties on the IUrtMessage interface or programmatically via the PutOpcEventStruct method on IUrtMessage. If an A&E property is not explicitly set, then a default value is provided by the URT messaging system. For example, you are able to specify the A&E event severity, but if the severity is not specified, then the severity is derived based on the URTs message category and priority. The list of supported A&E properties is: Source, Condition, Message, Type, Category, Severity, Active Time, Area, Acknowledge required, Cookie, Actor Identifier, Quality, and State. In addition, vendor specific Attributes are supported as well. A&E Vendor Specific Attributes (VSAs) Vendor Specific Attributes (VSAs) are user-defined properties that can be associated with A&E events. This is a very powerful feature since extra user information can be configured to be passed along with every event. For example, if a user wants to pass along the name of the computer where the message originated, then the user may configure a VSA called ComputerName and then set this value for each message.

48

Unified Real Time Concepts Guide

R320 11/08

8. Process Interface
8.1 Introduction to Process Interface in URT
As URT is designed for building process control applications, it provides for the OPC standards. URT applications can connect to Honeywell DCS like Experion PKS as well as any non-Honeywell DCS or process system that supports OPC interfaces.

R320 11/08

Unified Real Time Concepts Guide

49

8. Process Interface 8.2. About OPC

8.2

About OPC
OPC (OLE for Process Control) consists of a set of standards that define COM interfaces to be observed by OPC clients and servers. The COM interfaces are based on Microsoft's COM/OLE technology. These standards were established by the OPC Foundation to foster greater interoperability between automation and control applications, field systems and devices, and business and office applications. REFERENCE - EXTERNAL
For detailed information about OPC, visit the OPC Foundation's Web site, http://www.opcfoundation.org./

OPC provides data from a data source (server) and communicates the data to any client application in a standard way, thereby eliminating the requirement for an application to have specific knowledge about a particular data source, such as its internal structure and communications protocols. The OPC Data Access Standard does not have a concept of hardware there are just items (units of data in the data source).

50

Unified Real Time Concepts Guide

R320 11/08

8. Process Interface 8.3. URT OPC Server

8.3

URT OPC Server


URT OPC Server is installed with URT. This application supports the OPC Data Access Versions 1.0a and 2.2 as well as OPC Alarms and Events Version 1.1 and services all the platforms running from a particular computer. URT uses the OPC server interfaces to expose URT platform data to OPC clients. The OPC clients may require this data for historization, communication with operator interfaces, or carrying out the control action initiated by URT based applications. If an OPC client requests data from a platform that is not currently running, the URT OPC server sends an appropriate error message. URT supports the area concept as specified by OPC.

8.4

URT OPC Client for Data Access


URT based applications require to collect data from OPC servers of other process control components. Data items on a URT platform can be configured to exchange data to the OPC server. URT provides the OPC Client for Data Access function block which implements the OPC type connections configured on the data items in the scope of its scheduling module. It discovers all existing OPC type connections when it is added and it is notified of all changes made to OPC type connections from that point on. Other function blocks on the URT platform can then use the OPC data by connecting, linking, or directly referring to the data items configured for OPC type connection.

R320 11/08

Unified Real Time Concepts Guide

51

This page is left intentionally blank.

52

Unified Real Time Concepts Guide

R320 11/08

9. History Collection and Retrieval


9.1 Introduction to History Collection and Retrieval in URT
Many applications require history data for use in a calculation or in a trend display. URT provides support for this via its history collection and history retrieval components. These components make it easy to both historize a URT data item, and to retrieve history data from a historian. Applications like lab update require this type of functionality whereby an inferred value must be historized when the lab sample is taken. Then history for the inferred value must be retrieved and the inferred value corrected (i.e. biased) when the lab calculation is available.

R320 11/08

Unified Real Time Concepts Guide

53

9. History Collection and Retrieval 9.2. URT History Collection

9.2

URT History Collection


URT uses embedded PHD to do the history collection. Embedded PHD is a lightweight version of Uniformance PHD that doesnt require Oracle. Data items on a URT platform can be configured for history collection. URT provides the Collect History function block which automatically configures embedded PHD to collect history for the configured data item(s).

9.3

URT History Retrieval


URT based applications retrieve history data from OPC HDA (history) servers. URT standardized on OPC HDA retrieval because it is supported by most historians, including PHD, Experion as well as historians supplied by other vendors. Data items on a URT platform can be configured to retrieve history data from an OPC HDA server. URT provides the OPC Client for History function block which implements history retrieval for the data items in the scope of its scheduling module. It discovers all existing history retrieval connections when it is added and it is notified of all changes made to history connections from that point on. Other function blocks on the URT platform can then use the history data by referring to the data items configured for history retrieval. Trend displays can also access the history data in a similar way. Automatic history can be configured to retrieve either raw or processed history data on a scheduled basis. A function block like lab update can then process the history data. Alternatively the history retrieval mechanism can be used to set up a connection with an HDA server, after which HDA methods can be called directly.

54

Unified Real Time Concepts Guide

R320 11/08

10. Security
URT supports security enforcement based on the Experion Process Knowledge System (EPKS) security model. Each user is assigned a security level and allowed or denied access to a list of Experion areas. The security levels listed in order of decreasing responsibility are: MNGR ENGR, SUPR, OPER, and VIEWONLY. When enabled, security checks are performed for configuration changes and data item value updates. The security level required for configuration changes is set in the registry and defaults to ENGR. The security level required for data item value updates is controlled by the security options of each data item. REFERENCE - INTERNAL
For more information about security, see the Profit Suite Implementation Technical Reference Guide.

R320 11/08

Unified Real Time Concepts Guide

55

Honeywell International Process Solutions 2500 West Union Hills Phoenix, AZ 85027

You might also like