Вы находитесь на странице: 1из 210

GENESIS32 Standard Training Manual Version 9.

01

GENESIS32 Standard Training Manual

DAY1

Contents

1. GENESIS32 Architecture ................................................................................... 1-1 2. AlarmWorX32 Server ...................................................................................... 2.0-0 Quick Lab 2.1: AlarmWorX32 Server.......................................................... 2.1-1 2.1.1 Quick Lab Overview......................................................................... 2.1-2 2.1.1.1 Task Checklist....................................................................... 2.1-3 2.1.1.2 Support Files ......................................................................... 2.1-4 2.1.2 Creating the Alarm Server Database................................................. 2.1-5 2.1.2.1 Creating the Alarm Configuration ........................................ 2.1-6 2.1.2.2 Creating the Alarm Areas ..................................................... 2.1-7 2.1.2.3 Creating the Alarm Tags....................................................... 2.1-8 2.1.2.4 Activating the Alarm Configuration ..................................... 2.1-9 3. Alarm Viewer ActiveX ..................................................................................... 3.0-0 Quick Lab 2.2: AlarmWorX32 Viewer ActiveX .......................................... 2.2-1 2.2.1 Quick Lab Overview......................................................................... 2.2-2 2.2.1.1 Task Checklist....................................................................... 2.2-3 2.2.1.2 Support Files ......................................................................... 2.2-4 2.2.2 Configuring the Alarm Viewer ActiveX........................................... 2.2-5 2.2.2.1 Creating the Alarm Subscription .......................................... 2.2-6 2.2.2.2 Adding Custom Attributes .................................................... 2.2-7 2.2.2.3 Column Configuration .......................................................... 2.2-8 2.2.2.4 Sorting and Tooltips.............................................................. 2.2-9 2.2.2.5 Alarm Viewer in Runtime................................................... 2.2-10 2.2.2.6 Alarm Acknowledgement ................................................... 2.2-11 2.2.2.7 Client-Side Alarm Filtering ................................................ 2.2-12 4. AlarmWorX32 Logger...................................................................................... 4.0-0 Quick Lab 2.3: AlarmWorX32 Logger......................................................... 2.3-1 2.3.1 Quick Lab Overview......................................................................... 2.3-2 2.3.1.1 Task Checklist....................................................................... 2.3-3

GENESIS32 Standard Training Manual

2.3.1.2 Support Files ......................................................................... 2.3-4 2.3.2 Creating an Alarm Logger Configuration......................................... 2.3-5 2.3.2.1 Creating Two Logger Configurations................................... 2.3-6 2.3.2.2 Setting up Database Logging ................................................ 2.3-7 2.3.2.3 Associating Nodes and Configurations................................. 2.3-8 5. Alarm Report ActiveX...................................................................................... 5.0-0 Quick Lab 2.4: AlarmWorX32 Report ActiveX .......................................... 2.4-1 2.4.1 Quick Lab Overview......................................................................... 2.4-2 2.4.1.1 Task Checklist....................................................................... 2.4-3 2.4.1.2 Support Files ......................................................................... 2.4-4 2.4.2 Creating a Historical Alarm Reporter ............................................... 2.4-5 2.4.2.1 Alarm Reporter in Runtime .................................................. 2.4-6 6. TrendWorX32 SQL Logger ............................................................................. 6.0-0 Quick Lab 2.5: TrendWorX32 SQL Logger ................................................ 2.5-1 2.5.1 Quick Lab Overview......................................................................... 2.5-2 2.5.1.1 Task Checklist....................................................................... 2.5-3 2.5.1.2 Support Files ......................................................................... 2.5-4 2.5.2 Creating a History Logging System.................................................. 2.5-5 2.5.2.1 Creating the Logger Configuration....................................... 2.5-6 2.5.2.2 Creating the Database Group ................................................ 2.5-7 2.5.2.3 Creating the Logger Group ................................................... 2.5-8 2.5.2.4 Creating the Logger Tags..................................................... .2.5-9 7. Trend Viewer ActiveX...................................................................................... 7.0-0 Quick Lab 2.6: Trend Viewer ActiveX ......................................................... 2.6-1 3.2.1 Quick Lab Overview......................................................................... 2.6-2 2.6.1.1 Task Checklist....................................................................... 2.6-3 2.6.1.2 Support Files ......................................................................... 2.6-4 3.2.2 Creating a Historical Trend Viewer.................................................. 2.6-5 2.6.2.1 Configuring the Trend Viewer.............................................. 2.6-6 2.6.2.2 Configuring Trend Viewer Pens ........................................... 2.6-7 2.6.2.3 Configuring the Trend Viewer Details Window................... 2.6-8 2.6.2.4 Trend Viewer in Runtime ..................................................... 2.6-9

GENESIS32 Standard Training Manual

DAY2 8. Introduction to GraphWorX32 ....................................................................... 8.0-0 Quick Lab 4.1: Creating a Simple Display ................................................... 4.1-1 4.1.1 Quick Lab Overview......................................................................... 4.1-2 4.1.1.1 Task Checklist....................................................................... 4.1-3 4.1.1.2 Support Files ......................................................................... 4.1-4 4.1.2 Creating a Simple Display ................................................................ 4.1-5 9. GraphWorX32: Configuration and Connection Types................................. 9.0-0 Quick Lab 4.2: Tank Monitor Operator Screen .......................................... 4.2-1 4.2.1 Quick Lab Overview......................................................................... 4.2-2 4.2.1.1 Task Checklist....................................................................... 4.2-3 4.2.1.2 Support Files ......................................................................... 4.2-4 4.2.2 Creating the Tank Monitor Operator Display................................... 4.2-5 4.2.2.1 Setting the Display Properties............................................... 4.2-6 4.2.2.2 Inserting Symbols ................................................................. 4.2-7 4.2.2.3 Adding the Size Dynamic ..................................................... 4.2-8 4.2.2.4 Adding Color Actions to the Pumps ..................................... 4.2-9 4.2.2.5 Creating an Expression To Simulate Data .......................... 4.2-10 10. GraphWorX32: More Common Connections ............................................ 10.0-0 Quick Lab 4.3: Dynamics and Pick Actions ................................................. 4.3-1 4.3.1 Quick Lab Overview......................................................................... 4.3-2 4.3.1.1 Task Checklist....................................................................... 4.3-3 4.3.1.2 Support Files ......................................................................... 4.3-4 4.3.2 Creating the Tank System Overview Operator Screen ..................... 4.3-5 4.3.2.1 Adding the Size Dynamic ..................................................... 4.3-6 4.3.2.2 Adding Dynamics to the Pump ............................................. 4.3-7 4.3.2.3 Adding Dynamics to the Valve............................................. 4.3-8 4.3.2.4 Creating a Pop-up Window................................................... 4.3-9 4.3.2.5 Associating the Pop-up Window With the Valve ............... 4.3-10

GENESIS32 Standard Training Manual

11. GraphWorX32: Layers ................................................................................ 11.0-0 Quick Lab 4.4: Using Layers ......................................................................... 4.4-1 4.4.1 Quick Lab Overview......................................................................... 4.4-2 4.4.1.1 Task Checklist....................................................................... 4.4-3 4.4.1.2 Support Files ......................................................................... 4.4-4 4.4.2 Using Layers ..................................................................................... 4.4-5 12. GraphWorX32: Templates .......................................................................... 12.0-0 Quick Lab 4.5: Using Templates ................................................................... 4.5-1 4.5.1 Quick Lab Overview......................................................................... 4.5-2 4.5.1.1 Task Checklist....................................................................... 4.5-3 4.5.1.2 Support Files ......................................................................... 4.5-4 4.5.2 Creating a GraphWorX32 Template................................................. 4.5-5 4.5.2.1 Applying a Template to a Display ........................................ 4.5-6 4.5.2.2 Applying Template Changes................................................. 4.5-7 13. Additional Applications: GenBroker .......................................................... 13.0-0 Quick Lab 4.6: GenBroker and GenClient................................................... 4.6-1 4.6.1 Quick Lab Overview......................................................................... 4.6-2 4.6.1.1 Task Checklist....................................................................... 4.6-3 4.6.1.2 Support Files ......................................................................... 4.6-4 4.6.2 GenBroker and GenClient................................................................. 4.6-5 4.6.2.1 Activating GenBroker/GenClient Communication on a Client Node 4.6.2.2 Activating GenBroker/GenClient Communication on the Server Node 14. Additional Applications: TrendWorX32 Reporter.................................... 15.0-0 Quick Lab 4.7: TrendWorX32 Reporter ...................................................... 4.7-1 4.7.1 Quick Lab Overview......................................................................... 4.7-2 4.7.1.1 Task Checklist....................................................................... 4.7-3 4.7.1.2 Support Files ......................................................................... 4.7-4 4.7.2 Creating a History Reporting System ............................................... 4.7-5

Appendix A.1: GENESIS32 Tools: License Monitor ....................................... A.1-1 Quick Lab A.1: License Monitor.................................................................. A.1-1

GENESIS32 Standard Training Manual

GENESIS32 Architecture
1.1. Objectives
OPC (OLE for Process Control) The use of OPC in GENESIS32 GENESIS32 Architecture

By the end of this chapter, you will be familiar with the following:

1.2.

Introduction to GENESIS32

GENESIS32 is the ICONICS suite of OPC (OLE for Process Control) client and server applications. It has been created from the ground up implementing OPC as the core of all its communication. GENESIS32 makes it possible to easily visualize your process, implement a trending system and monitor configured alarms. GENESIS32 was designed to make use of the architecture provided by the Microsoft operating systems, and can thus be used to configure your projects on Windows NT and Windows 2000, XP, and Server 2003. You can deploy your project not only on the aforementioned operating systems but also on Windows CE, Pocket PC and on the Internet.

GENESIS32 Standard Training Manual

This chapter gives a brief overview on how the different GENESIS32 components relate and communicate together, and where the common standards provided either by the OPC Foundation or by the Microsoft operating systems come into play.

1.3.

OPC - OLE for Process Control

All GENESIS32 products utilize some or more of the OPC interfaces; this may be the OPC Client interface. To receive data from a server, the OPC Server interfaces to send data to any number of client, or both client and server, interfaces. Simply said, OPC is an open method of communicating and exchanging data between software applications using COM (Component Object Model) interfaces. One of the most advantageous properties of using the OPC client/server architecture is the ability to connect any OPC client to any OPC server. The standardized interfaces make it irrelevant which company wrote the OPC client or OPC server, because they both adhere to the same specification. Figure 1.1 shows the OPC architecture.

Figure 1.1: OPC-Based Client Server Architecture 1.1.1 Component Object Model As mentioned before, OPC is based on COM; originally Microsoft defined COM as the base model for their implementation of OLE (Object Linking and Embedding) inside their operating systems such as Windows 95 and Windows NT. However COM proved to be applicable in many other applications as well. Using COM, it becomes possible to split an application into logical blocks or components. Each of the components can evolve on its own as long as its interfaces remain the same, allowing the other components to continue to utilize its functionality. 1.1.2 The OPC Foundation The OPC Foundation is the organization maintaining the various OPC specifications. Currently more than 200 companies are members of the OPC Foundation. The main task the

GENESIS32 Standard Training Manual

OPC Foundation set for itself is to develop open standards based on COM for communication among software applications that are used in the process industry. 1.1.3 OPC Specifications The OPC Foundation consists of various committees. Each committee works on a particular OPC specification. Currently the following committees are developing specifications: OPC Data Access (OPC-DA) OPC Alarm and Events (OPC-AE) OPC Historical Data Access (OPC-HDA) OPC XML-DA OPC Data eXchange OPC Security OPC Batch The first three specifications, namely OPC-DA, OPC-AE, and OPC-HDA, are all used inside GENESIS32. All three are client/server-based specifications. The advantage of using OPC between clients (e.g. visualization) and servers (e.g. device drivers) is that it is an open protocol freely available to anyone. This means that any client can connect to any server as long as they both use the OPC specifications. This makes it possible to have the hardware manufacturer write the OPC server that communicates with the actual hardware. On the other side it allows HMI/SCADA companies to focus on writing the visualization software without having to worry about writing device drivers for the various hardware systems. Instead they can easily connect to any OPC server written by the hardware manufacturer.

1.4.

GENESIS32 Overview

As mentioned before, GENESIS32 is based on the various OPC specifications for Data Access, Historical Data Access and Alarm and Events. The architecture of GENESIS32 allows you to directly use the (tag) database already created inside your OPC server without having to recreate a tag database inside the client applications. GENESIS32 has three main applications, each designed for a particular task: GraphWorX32 TrendWorX32 AlarmWorX32

1.1.4 GraphWorX32 GraphWorX32 is a graphical display interface, providing advanced graphical animation capabilities to easily create operation displays. GraphWorX32 uses OPC Data Access to obtain live data from OPC servers, which drive the dynamics and animations in the screen. GraphWorX32 makes maximum use of common technologies provided by Microsoft. GraphWorX32 can function both as an ActiveX container (i.e., ActiveX controls can be inserted into it) and as an ActiveX control (i.e., it can be inserted into other applications). On

GENESIS32 Standard Training Manual

top of that GraphWorX32 also makes use of the ActiveX Document technologies, so it can natively run in other applications (e.g., Internet Explorer) while maintaining the full functionality, as when GraphWorX32 is running stand-alone. But GraphWorX32 can also function the other way around, allowing other applications to be inserted into a GraphWorX32 display. On top of these common technologies GraphWorX32 also implements not just one common scripting language but three, giving the user a rich choice of commonly known scripting languages. The languages supported are VBA (Visual Basic for Applications), VBScript and JScript. 1.1.5 TrendWorX32 TrendWorX32 is a complete system of trending and data-logging components; it uses OPC Data Access to obtain live data from OPC servers, and uses OPC Historical Data Access to provide data to client applications. The main components of TrendWorX32 are the Data Logger, the Trend Viewer, and the reporting tools. The TrendWorX32 SQL Data Logger is an OPC Data Access client that stores the changing data provided by the OPC server into various database systems (Access, SQL Server/MSDE, and Oracle) using common technologies such as OLE-DB/ADO. The stored data can then be provided to different clients such as the Trend Viewer and the Reporting Tools, using OPC Historical Data Access as communication layer. The Trend Viewer is both an OPC Data Access and OPC Historical Data Access client, which will connect to either kind of server separately or concurrently. The Trend Viewer can visualize the data in many different types of charts, and provides for both live data and historical data. The TrendWorX32 Reporting tools connect to the database in which the SQL Data Logger has stored the data and request the required data and format in a number of output formats, such as Excel, HTML, plain text, or forward it to ODBC accessible database. 1.1.6 AlarmWorX32 AlarmWorX32 is a collection of OPC Alarm and Events based components. The main components are the Alarm Server, the Alarm Logger, the Alarm Viewer, and the Alarm Reporter. The Alarm Server is an OPC Data Access client that generates alarms based on the changing data provided by the OPC Data Access Server. These alarms will then be forwarded to the various OPC Alarm clients attached using OPC Alarm and Events. The Alarm Viewer is an ActiveX that can be inserted into (for example) GraphWorX32 and can display the current state of all the configured alarms. In addition it provides filtering capabilities that make it possible, for example, to limit the alarms shown depending on the current display. The Alarm Logger is an OPC Alarm and Events client that takes information provided by a number of OPC Data Access clients and logs that information into a number of databases.

GENESIS32 Standard Training Manual

The Alarm Reporter is an ActiveX that can be inserted into (for example) GraphWorX32 and can display the alarms and events that have been logged by the Alarm Logger. 1.1.7 Other Components In addition to these three main applications there are many other applications created by ICONICS that can be used as an integral part of GENESIS32. DataWorX32 provides a wide variety of OPC-based functions, such as OPC Data Access redundancy, Global Registers, Data Aggregation and Data Bridging for OPC server-to-OPC server connections. ScriptWorX32 is a global scripting environment that can provide SCADA/HMI application-level scripting. ScriptWorX32 provides a variety of triggers that can execute scripts, such as Periodic, OPC Data driven and OPC Alarm driven. 1.1.8 Schematic Overview A schematic overview of the main GENESIS32 components is shown in Figure 1.2.

Figure 1.2: GENESIS32 Architecture

GENESIS32 Standard Training Manual

1.5.

GENESIS32 Help Documentation

ICONICS software provides online help with descriptions and explanations of each application. Help is available from the Help menus and within most dialog boxes. You can access help from the following: Select Help Topics from the Help menu of the current application. This opens the help file for that application. To search for a topic in the help file, click the Find button and go through the Find Setup Wizard. Type or select the term you want to find, and then click on the topics that are displayed for that term. NOTE: Most help (.hlp) files for GENESIS32 are installed in the Program Files\ICONICS\GENESIS32\Bin directory. Each help file has an accompanying table of contents (.cnt) file. If the Find Setup Wizard fails to initialize when you try to execute a search operation in a help file (as described above), close the help file and then delete any .fts, .ftg, and/or .gid files from the Bin directory. Then reopen the help file and try to run the search again. Click on the Help button (or press the F1 key) in any dialog box to display context-sensitive help for that dialog box or application. Move the mouse pointer over an icon and pause for a moment to display pop-up ToolTips for quick help for that object. Adobe Acrobat PDF files of all GENESIS32 product documentation are also included on the GENESIS32 product CD in the Documentation section. To access general information and the latest software enhancements, open the Genesis32.txt file in the directory where you installed the program files (default location is Program Files\ICONICS\ GENESIS32). Run the Gen32 Demo, which offers an online tutorial, as well as many examples from which to learn. Additional example files are also installed in the Program Files\ICONICS\GENESIS32\Examples directory, providing another source for help on using GENESIS32 and its components.

GENESIS32 Standard Training Manual

AlarmWorX32 Server
2.1 Objectives
What the AlarmWorX32 application is The Alarm Server Configurator and configuration database Alarm areas: use and configuration Alarm tags: types and configuration

At the end of this section, you will be familiar with the following concepts:

2.2

Introduction to AlarmWorX32

AlarmWorX32 is a distributed enterprise-wide alarm and events management system. Available in the standard GENESIS32 suite of applications, or as a stand-alone Open Series component, AlarmWorX32 offers the tools you need to deliver real-time alarm information throughout your system. AlarmWorX32 is a family of modular alarming products, including the Alarm Container, the Alarm Server, the Alarm Logger, the Alarm Viewer ActiveX, the Alarm Report ActiveX, and the Multimedia Server. The Alarm Container is an ActiveX container capable of embedding various ActiveX components.

2.3.

Alarm Server and Server Configurator

Alarm Configuration is easy with the Alarm/Event Configurator, shown in Figure 2.1.1. You can define your own alarms on any OPC data and/or expression (complex combinations of OPC data), choosing from analog Limit Alarms, Deviation, Rrate-of-Change, and Digital Alarms. In keeping with the open standards employed throughout the GENESIS32 architecture, your alarm configurations are saved to a Microsoft Access or Microsoft SQL Server database. NOTE: The Quick Lab following this section outlines the steps necessary to create Alarm Server configuration databases. For more information about creating configuration databases also refer to the "Creating Configuration Databases" section in the AlarmWorX32 Server Help documentation. Once the alarms are configured, the OPC Alarm Server takes care of monitoring the live data, posting new alarms throughout your network. This component runs in the background (even as a Windows NT Service if desired), and is tuned to give your system the performance required of an alarming system.

GENESIS32 Standard Training Manual

Figure 2.1.1: Alarm Server Configurator The AlarmWorX32 Server receives field data from any OPC-compliant Data Access (DA) server, and performs alarm detection and reporting based on the OPC data sent to any OPC Alarm and Event (A&E) clients that subscribe. The AlarmWorX32 Viewer and the AlarmWorX32 Logger are two examples of clients that can receive these notifications from the server, and will be discussed later in this chapter.

2.4

Alarm Server Configuration

The Alarm Server can have multiple configurations; however only one configuration can be designated as the default configuration at any point in time. Typically multiple configurations are only used when a single configuration database is shared by multiple Alarm Servers. Each individual Alarm Server will then use exactly one of the defined configurations. To control the behavior of the Alarm Configuration when the Alarm Server is put into runtime mode, four Runtime Settings are provided: Scan Period: Effectively the maximum speed at which an OPC DA server will send the Alarm Server the most current data values it has received from its source, typically a PLC, a controller, or other device, but it may also be another software program. It has to be noted that only updated values will be sent for those tags that have changes, as OPC is fully change-driven, so it may be that at that given interval no updates will be sent at all to the Alarm Server. Use OPC DA Timestamp: When enabled, this will ensure the Alarm Server will use the timestamps provided by the OPC Data Access server, as opposed to having the Alarm Server generate its own timestamps. Startup squelch: This is the period during startup of the Alarm Server for which alarms that have BAD quality are not sent out to alarm clients. This useful when the OPC Data Access has not yet supplied GOOD quality data values to the Alarm Server. GAS Theme: This is the Global Alias Theme that has to be used by this configuration. This may be applicable when a single configuration can be used on multiple systems or in different setups, in which case the GAS Theme can control exactly which tags are being used to generate the alarms.

GENESIS32 Standard Training Manual

NOTE: The Quick Lab following this section outlines the steps necessary to create and configure Alarm Configurations. For more information about creating Alarm Configurations also refer to the "Creating a New Alarm Configuration" section in the AlarmWorX32 Server Help documentation.

2.5

Alarm Areas

An area is used to group OPC alarm tags. This information can be used by clients for filtering purposes. A tag can exist under multiple areas, and an area can have multiple levels. An area is defined by its name and the name of its parent branches. For example, a branch called Area 1 under Plant Area A is different from Area 1 under Plant Area B. You can assign an alarm to more than one area or grouping. For example, a tank limit alarm may be part of both the "Tank 1" area as well as the "Water" area. NOTE: The Quick Lab following this section outlines the steps necessary to create and configure alarm areas. For more information about creating alarm areas also refer to the "Creating a New Area" section in the AlarmWorX32 Server Help documentation.

2.6

Alarm Tags

An alarm tag represents a single object for OPC alarm information. An alarm tag can contain information for multiple types of OPC alarms, including deviation, limit, rate of change, and digital alarms. The General page of an alarm tag definition provides the following fields: Enabled: An alarm can be enabled or disabled by setting the value of this field to 1 and 0 respectively. However, it is also possible to use an OPC Data Access Tag instead to control the Enabled state of the alarm. Default Display: An alarm can have a default (display) file associated with it. When a file is specified a custom menu will become enabled in the Alarm Viewer ActiveX, which will launch the specified file in its default viewer. This can be especially useful to associate additional information with an alarm in the form of an external file, such as PDF or HTML. Description: In this field a more elaborate description can be associated with the alarm. Delay: Enter a number of seconds into this field to force the OPC Data Access source of the alarm to be active for at least the specified number of seconds before actually generating the alarm. Base Text: The base text of the alarm, together with the actual alarm state message; this will create the final message that will be sent to the alarm clients.

GENESIS32 Standard Training Manual

Help Instruction: Enter any help instructions into this field; the contents of this field are available to the alarm clients via the custom attribute HELP. The ICONICS alarm server provides four different types of alarms. An alarm tag can have more than one alarm type on which it alarms. For example it is possible to have both a limit alarm and a rate of change alarm in one alarm tag. The following alarm types are available and configurable on the Alarms page of an alarm tag definition: Limit alarms: Alarms based on an OPC input exceeding one of the four different limits (Low-Low, Low, High, and High-High). Deviation alarms: Alarms based on the difference between two OPC inputs exceeding one of the four different limits (Low-Low, Low, High, and High-High). Rate of Change alarms: Alarms when an OPC input changes by more than the configured limit within a given period. Digital alarms: Alarms when an OPC input matches exactly the configured alarm state. Both limit and deviation alarms can be configured to use a deadband in which repeating borderline alarms can be avoided. For all alarms it is possible to use OPC tags or expressions to control the severity of the alarm and whether or not an alarm requires acknowledgement. In this training course the Related Values pages are not used. However, these pages makes it possible to specify up to twenty additional OPC Tags, whose values will be sent together with the normal alarm information to the OPC AE Client. This OPC AE client can then use these Related Values as Custom Attributes; an example of their use would be batch or lot tracking. By using an OPC Tag with the Batch number as a related value, you could track which alarm and how many occurred during the production of a particular batch. NOTE: The Quick Lab following this section outlines the steps necessary to create and configure alarm tags. For more information about configuring alarm tags also refer to the "Creating a New Tag" section in the AlarmWorX32 Server Help documentation.

GENESIS32 Standard Training Manual

Quick Lab: AlarmWorX32 Server


2.1.1 Quick Lab Overview

2.1

This section will explain how to use the Alarm Server Configurator to create a set of alarms. The alarms you will create will be based on DataWorX32 OPC DA tags. Estimated time to complete this lab: 45 minutes. 2.1.1.1 2.1.1.2 Task Checklist

In this quick lab, you will complete the following tasks: Create an alarm configuration. Create alarm areas. Create alarm tags. Activate the alarm configuration. Support Files

To complete this quick lab, you will need the following support file: TankLevelSimulation.mdb

2.1.2

Creating the Alarm Server Database


1. Open the Alarm Server Configurator from Start Programs ICONICS GENESIS32 AlarmWorX32 Alarm Server Configurator. 2. The Alarm Server Configurator will open with a default demo configuration database already being referenced. If you would like to familiarize yourself with a complete configuration, feel free to do so with this default configuration. 3. To create a new Configuration Database, choose File New or click the button as depicted in Figure L2.1.1.

GENESIS32 Standard Training Manual

Figure L2.1.1: Creating a New Alarm Server Configuration Database 4. The Configurator Database Wizard will be launched, as depicted in Figure L2.1.2. Click Next to continue.

Figure L2.1.2: Configuration Database Wizard 5. Choose to Create new configuration in MS Access database, and click Next.

Figure L2.1.3: Choosing the Configuration Database Type

GENESIS32 Standard Training Manual

6. Name the file AlarmServer.mdb, and save it in the C:\Program Files\ICONICS\GENESIS32\Examples\Training\ directory. Make Database Active has been enabled by default. Click Finish to create the database. NOTE: If this directory has not already been created for you by your instructor, you will need to create the Training folder inside the Examples directory.

Figure L2.1.4: Selecting a Name and Location 7. The new configuration database will automatically be opened, with a blank configuration, as depicted in Figure L2.1.5.

Figure L2.1.5: Alarm Server Configurator 2.1.2.1 Creating the Alarm Configuration

The first item to create is the Alarm Configuration. The Alarm Configuration holds all alarms of an application. 1. Right-click on Alarm Configurations in the tree-view and select New Configuration to insert a new configuration, and open the details pane for the configuration on the right-hand side. 2. Set the Name to TrainingCourse.

GENESIS32 Standard Training Manual

3. As this is the only configuration in this setup, set this configuration to be used by the Alarm Server on start-up by enabling the Default Configuration check box. 4. Set the Scan Period to 500 Milliseconds. 5. With all options set, as depicted in Figure L2.1.6, click on Apply to commit the changes to the configuration database.

Figure L2.1.6: New Alarm Configuration 2.1.2.2 Creating the Alarm Areas

In this Training Course Application two alarm areas will be created: one for the alarms generated by the tank level registers, and the other for the alarms generated by the OPC Simulator tags. 1. Right-click Areas in the tree control and select New Area to create a new area. 2. Set the Name to Simulated, and click on Apply to commit the changes to the database. 3. Click on Add New Area to create another area. 4. Set the Name to Tanks, and click on Apply to commit the changes to the database. The configuration will now contain the Alarm Configuration and the Areas, as depicted in 5. Figure L2.1.7.

GENESIS32 Standard Training Manual

Figure L2.1.7: Creating Alarm Areas 2.1.2.3 Creating the Alarm Tags

In this Training Course Application various alarms will be created. Some of the alarms are generated by the tank level registers inside DataWorX32, and the other alarms are generated by the OPC Simulator tags. 1. To add a new Alarm Tag, right-click on the TrainingCourse configuration and select New Tag. 2. Set the Name to Tank Level 1. 3. Click on the arrow icon behind OPC Input 1: and select Unified Data Browser. 4. Browse to ICONICS.DataWorX32.8\TrainingCourse.Tanks.Tank1.Level via My Computer ICONICS.DataWorX32.8 Registers TrainingCourse Tanks Tank1 Level, as depicted in Figure L2.1.8, and click on OK after selecting the level.

Figure L2.1.8: Selecting the Tank Level

GENESIS32 Standard Training Manual

5. On the General page Enabled is defaulted to 1 to enable this alarm tag. This will enable the Alarm Server to evaluate for alarm states.Set the Base Text to The level in Tank 1 is, as depicted in Figure L2.1.9.

Figure L2.1.9: Alarm Properties: General 6. Select Apply to save your changes. Configuring the Alarm Limits The alarms in this Training Course Application are limit alarms and can be configured as follows: 1. Select the Alarms Limit page to configure the alarm details as depicted in Error! Reference source not found..

GENESIS32 Standard Training Manual

Figure L2.1.10: Alarm Properties: Limit 2. Set the Lo Value to 10, the Lo Message Text to near empty, the Lo Severity is defalted to 500, and Lo Req Ack is defaulted to 1 to require acknowledgements. 3. Set the Normal Message Text to normal. 4. Set the Hi Value to 90, the Hi Message Text to near overflowing, leave Hi Severity set to 500, and Hi Req Ack set to 1. 5. Click on Apply to commit the changes to the database. 6. Select the Areas page to associate this alarm with one or more areas. 7. Click on the Add button to open the Select or Enter Area Name dialog depicted in Figure L2.1.11.

GENESIS32 Standard Training Manual

Figure L2.1.11: Select or Enter Area Name 8. Double-click on the Tanks folder, and then click on OK. The area will be added to the alarm, as depicted in Figure L2.1.12.

Figure L2.1.12: Alarm Properties: Areas 9. Now create five more alarm tags, with the same message texts as used in the Tank Level 1 alarm. The rest of the alarm properties should be set as listed in Error! Reference source not found.. Please note that all OPC Input 1: fields have to be preceded by ICONICS.DataWorX32.8\TrainingCourse.Tanks.

GENESIS32 Standard Training Manual

Table L0.1.1 - Properties for the Additional Alarms Alarm Tag Name Tank Level 2 Tank Level 3 Tank Level 4 Tank Level 5 Tank Level 6 OPC Input 1: Tank2.Level Tank3.Level Tank4.Level Tank5.Level Tank6.Level Base Text Low The level in Tank 2 is The level in Tank 3 is The level in Tank 4 is The level in Tank 5 is The level in Tank 6 is 10 10 10 20 20 High 90 90 90 180 180

10. Also make sure that all alarms are added to the Tanks area. NOTE: The previously inserted alarms will become useful when the GraphWorX32 displays of this course are finished as well; therefore a number of alarms based on simulated data will be added as well. As the OPC Simulator can provide continuously changing values, it can be quite useful to generate a number of alarms. 11. To add a new Alarm Tag, right-click on the TrainingCourse configuration and select New Tag. 12. Set the Name to Ramp. 13. Click on the arrow icon behind OPC Input 1: and select Unified Data Browser. 14. Browse to ICONICS.Simulator.1\SimulatePLC.INPUTS.Int Ramp via My Computer ICONICS.Simulator SimulatePLC INPUTS Int Ramp, as depicted in Figure L2.1.13. Click on OK after selecting the signal.

GENESIS32 Standard Training Manual

Figure L2.1.13: Selecting the OPC Simulator Tag 15. On the General page, Enabled is defaulted to 1 to enable the alarm. 16. Set the Base Text to Simulation Ramp is, as depicted in Figure L2.1.14.

Figure L2.1.14: Alarm Properties: General 17. Select the Alarms Limit page to configure the alarm details, as depicted in Figure L2.1.15.

GENESIS32 Standard Training Manual

Figure L2.1.15: Alarm Properties: Limit 18. Set the LoLo Value to 10, the LoLo Message Text to extremely low. Leave LoLo Severity set to 500, and LoLo Req Ack set to 1 to require acknowledgements. 19. Set the Lo Value to 20, the Lo Message Text to very low. Leave Lo Severity set to 500, and Lo Req Ack to 1. 20. Set the Normal Message Text to normal. 21. Set the Hi Value to 80, the Hi Message Text to very high. Leave Hi Severity set to 500, and Hi Req Ack set to 1. 22. Set the HiHi Value to 90, the HiHi Message Text to extremely high. Leave HiHi Severity set to 500, and HiHi Req Ack set to 1. 23. Click on Apply to commit the changes to the database. 24. Select the Areas tab to associate this alarm with one or more areas. 25. Click on the Add button to open the Select or Enter Area Name dialog depicted in Figure L2.1.16.

GENESIS32 Standard Training Manual

Figure L2.1.16: Select or Enter Area Name 26. Double-click on the Simulated folder, and then click on OK. The area will be added to the alarm, as depicted in Figure L2.1.17.

Figure L2.1.17: Alarm Properties: Areas 27. Now create two more alarm tags, with the same message texts as used in the Ramp alarm. The rest of the alarm properties should be set as listed in Error! Reference source not found.. Please note that all OPC Input1: values have to be preceded by ICONICS.Simulator.1\SimulatePLC.INPUTS..

GENESIS32 Standard Training Manual

Table L0.1.2 - Properties for the Simulated Alarms Alarm Tag Name Sine Random OPC Input1 Int Sine Int Random Base Text LoLo Lo -0.6 20 Hi HiHi

Simulation -0.8 Sine Simulation 10 Random

0.6 0.8 80 90

28. Also make sure that the alarms are all added to the Simulated area. 29. Once all tags are created, the final Alarm Server Configuration should look like Figure L2.1.18.

Figure L2.1.18: Final Configuration

GENESIS32 Standard Training Manual

2.1.2.4

Activating the Alarm Configuration

Since the configuration and runtime parts of the Alarm Server are separate, it is possible to modify a different configuration from the one that is currently being used by the runtime part of the Alarm Server. However it is not required to activate the configuration database that was created in the previous sections because the default Wizard settings made this database the Active Database. If needed, please follow these steps to make your database Active. 1. Activate the current database by selecting File Make Active. 2. When prompted with the AlarmWorX32 Server Configurator dialog, depicted in Figure L2.1.19, click on Yes to activate the current database.

Figure L2.1.19: Activating the Current Configuration Database 3. Select Action Start Alarm Server to start the alarm server. 4. Select File Exit to close the Configurator. The alarm server will continue to run in the background.

GENESIS32 Standard Training Manual

Alarm Viewer ActiveX


3.1. Objectives

At the end of this chapter, you will be familiar with the following concepts: The Alarm Viewer ActiveX and where to configure its properties Column configuration for the viewer Configuring alarm subscriptions. Configuring record sorting for the viewer Using and configuring ToolTips with the viewer Alarm Server-side filtering Alarm Viewer client-side filtering

3.2.

Alarm Viewer ActiveX

The Alarm Viewer, shown Error! Reference source not found., is a current-events alarm ActiveX. Because this component is an ActiveX, it can be placed in any ActiveX container application, such as GraphWorX32, Microsoft Visual Basic, or a Web page. The Alarm Viewer displays current alarm information and handles the user interface to the alarm system (such as alarm acknowledgement). The layout of information displayed, including sort order, color, font, and displayed data, is user-configurable.

Figure 2.2.1: Alarm Viewer ActiveX You can drop this ActiveX control in the provided AlarmWorX32 Container, within any GraphWorX32 HMI display, an HTML Internet/intranet-based Web page, or any other

GENESIS32 Standard Training Manual

ActiveX container, and it automatically configures itself to deliver live alarms in a scrollable window. You can easily customize the view via its properties page to control the colors, fonts, columns, rows, alarm filtering, subscriptions, hot-links, etc.

3.3.

Alarm Viewer Properties

The Alarm Viewer ActiveX Properties dialog box is the user configuration interface for the ActiveX. When embedded in an ActiveX container, double-clicking anywhere in the ActiveX client opens the Properties dialog box.

Figure 2.2.2: Alarm Viewer ActiveX Properties NOTE: Right-clicking on the Viewer ActiveX and selecting Properties also opens the Alarm Viewer ActiveX Properties dialog box. The ActiveX Properties window contains the following configuration pages: General Default Row Column Subscription Display Grids ToolTips Settings Of these configuration pages, this class will work closely with the Column, Subscription, Display, and ToolTips pages.

GENESIS32 Standard Training Manual

3.4.

Column Configuration

The Column tab, shown in Figure 2.2.3, allows you to select which columns you want to appear in the viewer. Columns show information from the various attributes associated with an alarm. All OPC servers will have to provide a set of standard attributes, such as Source (or Tag), Message, and Event Time. In addition to these mandatory attributes an OPC Alarm and Event Server can also provide other attributes that are specific to the server. For example, the ICONICS Alarm Server provides the attributes Current Value, Area and Help, among others. These attributes are Custom Attributes, and can be assigned (in the alarm subscription) to the generic attributes named Attribute 1-20 in the Available list.

Figure 2.2.3: Column Properties You can also change the appearance of a column by either double-clicking on an item in the Selected list or selecting the item and clicking the Config button. The Set Column configuration dialog for the item would open, from which you can set the font, color, width, and cell properties by selecting and changing the various options available. In addition to the Runtime appearance of the columns, you can rename the Heading of each column so it does not have to specifically read the name of the attribute. This is especially useful when using Custom Attributes. NOTE: The Quick Lab following this section outlines the steps necessary to configure columns. For more information about column configurations also refer to the "Column" section in the AlarmWorX32 Viewer Help documentation.

GENESIS32 Standard Training Manual

3.5.

Alarm Subscription

The AlarmWorX32 Viewer can display data from any OPC Alarm and Event server. Alarm subscription filters are made through the Subscription tab of the Properties dialog box. It allows you to add, rename, delete, or edit a subscription to a particular alarm.

Figure 2.2.4: Subscription Properties Filters can be configured on the subscription to a server in the following categories: Types (event types, severity) Categories (deviation, digital, limit, rate of change, etc.) Areas Source Attributes (custom attributes per event category) NOTE: It is possible for a server to have more than one subscription. In fact, it is a very effective way to achieve filtering. Once a subscription is set up, the viewer requests a refresh of all current alarms upon animation. The OPC Alarm and Event server on an alarm-by-alarm basis sends alarms. This decreases the number of alarms sent to each viewer and allows for server-side filtering. NOTE: The Quick Lab following this section outlines the steps necessary to create and configure Alarm Subscriptions. For more information about creating Alarm Subscriptions also refer to the "Subscriptions" section in the AlarmWorX32 Viewer Help documentation.

GENESIS32 Standard Training Manual

3.6

Record Sorting

The Display tab of the Properties dialog box configures options for sorting or client-side filtering (discussed later). The Sort dialog, shown in Figure 2.2.5, is accessed by clicking the Sort button in the Display tab, and allows you to configure which criteria to sort the alarms by. Records can be sorted based on any column selected to be in the viewer. It also allows for multilevel sorting up to five levels with ascending/descending specific to each level. The Alarm Viewer will always sort. The default sort for a new viewer is Time/Date. In the event that the Time/Date column is removed from the viewer, you will be informed that the sort key will need to be changed.

Figure 2.2.5: Sorting Properties NOTE: The Quick Lab following this section outlines the steps necessary to configure Record Sorting. For more information about Record Sorting also refer to the "Display" section in the AlarmWorX32 Viewer Help documentation.

3.7

ToolTips Configuration

The ToolTips tab of the Properties dialog, shown in Figure 2.2.6, allows you to determine which ToolTip options will be available for switching during runtime by selecting the corresponding check boxes. These ToolTips will be visible when you hover over something of importance in Runtime.

GENESIS32 Standard Training Manual

Figure 2.2.6: Tool Tips Properties You can choose a default setting for ToolTips here, and assign the column of information the Help and Comment information comes from (in the event that this information is set to be shown in the ToolTip). You can also choose how many characters of the information are shown in the tip. NOTE: The Quick Lab following this section outlines the steps necessary to configure ToolTips. For more information about ToolTips also refer to the "ToolTips" section in the AlarmWorX32 Viewer Help documentation.

3.8.

Filtering Configurations

When the Alarm Viewer is configured for Server-Side Filtering, it is actually limiting at the Alarm Server what alarm information will be sent by the Alarm Server to the Alarm Viewer. Using this filtering mechanism can be especially useful if an Alarm Server can potentially send many thousands of alarms to an Alarm Viewer when only a small number of these alarms are actually relevant to this particular instance of the Alarm Viewer. Server-side filtering is configured by choosing to limit your alarm subscription to specific types of alarms, or alarms from specific places. Therefore, server-side filtering is configured with the Subscription properties. NOTE: For more information about server-side filtering also refer to the "Subscription" section in the AlarmWorX32 Viewer Help documentation. When the Alarm Viewer is configured for Client-Side Filtering, it receives all alarms from the Alarm Server as normal; however, it applies a filter so the user will only see a selection of alarms rather than the full list. This can be particularly useful when temporarily applying filters that have to be changed quickly by the user of the system. A client-side filter is a filter that does not change the subscription to the alarm server. This means that all alarms will still be sent to the Alarm Viewer and maintained in the background, but they are simply not displayed in the Alarm Viewer. These filters can be created using the Filter button on the Display tab of the Properties window shown in Figure 2.2.7.

GENESIS32 Standard Training Manual

Figure 2.2.7: Client-Side Filter Properties Client-side filters are created and edited using the Expression Editor and its Filter Wizard. NOTE: The Quick Lab following this section outlines the steps necessary to configure client-side filtering. For more information about client-side filtering also refer to the "ClientSide Filtering" section in the AlarmWorX32 Viewer Help documentation.

GENESIS32 Standard Training Manual

AlarmWorX32 Logger
4.1 Objectives
The Alarm Logger and its Configurator Configuring database connections Databases supported by the Alarm Logger Alarm attribute columns Node configuration

At the end of this chapter, you will be familiar with the following concepts:

4.2

Alarm Logger and Logger Configurator

The AlarmWorX32 Logger logs alarms to Microsoft Access, Microsoft SQL Server, or Oracle databases. It can also print out the information to one or even a redundant set of printers. You can create alarm reports and calculations with Microsoft's built in Visual Basic for Applications (VBA) scripting language. Alarm calculations can be performed on individual tags or groups of tags as well. The logger can run as an executable or a service, and is able to process alarm information from several alarm servers locally or over a network. The database is user-configurable (i.e., it allows auto flushing at a specified period, autostart, circular and append logging modes, etc.). Of primary importance to the database issue is performance. The logger is able to handle bursts of alarms due to the design and implementation of the loggers database handling. The AlarmWorX32 Logger Configurator, shown in Figure 2.3.1, writes configuration information to a configuration database. The AlarmWorX32 Logger reads this configuration information during runtime to determine what alarms and events to log and where to log them. A single database can contain multiple named configurations to be run by one or more nodes on a network. A single node can also run multiple configurations simultaneously. In keeping with the open standards employed throughout the GENESIS32 architecture, your alarm configurations are saved to a Microsoft Access or Microsoft SQL Server database.

GENESIS32 Standard Training Manual

NOTE: The Quick Lab following this section outlines the steps necessary to create Alarm Logger configuration databases. For more information about creating configuration databases also refer to the "Creating Configuration Databases" section in the AlarmWorX32 Logger Help documentation.

Figure 2.3.1: Alarm Logger Configurator

4.3

Alarm Logger Configuration

The configuration database contains one or more Logger Configurations. Each configuration specifies a subset of alarms and events to be logged to a single database table and/or printer. Additionally, the configuration defines which data fields (columns) available are to be stored and/or printed. The Database Logging tab of the configuration properties, shown in Figure 2.3.1, allows for the configuration of where the alarms are logged, and how the tables are managed. The alarms are logged via an ODBC Data Source, which can be created, configured, and selected here.

Figure 2.3.2: Database Logging Configurations NOTE: The Quick Lab following this section outlines the steps necessary to create and configure database connections. For more information about creating database connections also refer to the "Creating a New ODBC Data Source" section in the AlarmWorX32 Logger Help documentation. The Alarm Logger provides various archiving options for database management in the Tables Management section of the Database Logging configurations tab. The Active Table

GENESIS32 Standard Training Manual

can be limited to a maximum number of records or a maximum time period. If no additional archiving parameters are specified, there will only be one table at any point in time observing the rules for the active table. In addition it is also possible to maintain a number of Archive Tables. These archive tables are maintained, either up to a maximum number of tables, up to a maximum number of records, or up to a maximum period. If any of these conditions expire, the oldest table will be removed. Printer Logging, Translation, and Alarm Snapshots are also configurable as part of the configuration settings, but are out of the scope of this class. For more information on these settings, refer to the Logger Configuration Properties section in the AlarmWorX32 Logger Help documentation. NOTE: The AlarmWorX32 Logger is designed to print alarms in realtime directly to your printer or backup printer. AlarmWorX32 Report ActiveX can be automated to display alarm reports on a periodic basis or you can use ReportWorX to print or save reports to files.

4.4

Database Support and Options

The AlarmWorX32 Logger can log data to different databases, including Microsoft Access, Microsoft SQL Server, MSDE and Oracle. Different databases require a different ODBC setup, so some of the dialogs may be different depending on which logging database you use. Although Microsoft Access has its applications, it must be considered that a database server like Microsoft SQL Server, MSDE, or Oracle may provide better performance and functionality for larger data-logging systems. This becomes especially relevant when considering maintenance, as Microsoft Access databases do not have an automatic compacting function. This means that every so often a Microsoft Access database will have to be compacted manually. During the compacting process the AlarmWorX32 Logger has to be stopped, because it is not possible to log any data to the database while it is being compacted.

4.5

Alarm Logger Columns

Each configuration contains one or more Columns. The columns defined for a configuration appear as child elements of the configuration in the tree control, and as list items in the list view (top right pane) of the Logger Configurator. Each column is associated with an alarm attribute either subscribed to by default or as a custom attribute. The following fields are specified for each column: Name: Enter the name of the column. This will be the column name used in the logging database and the column heading when printing. Maximum Width: Enter the number of character spaces for this column when printing.

GENESIS32 Standard Training Manual

Line Number: When printing, each event may occupy more than one printed line. Specify the line on which you want the column to print. A value of zero will prevent the column from printing. Start Position: Enter the number of character spaces from the left to begin printing. The first character space is zero. Enable Line Wrapping: When printing, field data that are wider than the configured column width will either be truncated or wrapped to the next line depending on this setting. Column Type: Select the OPC Alarm and Events data item you wish to log in this column from the drop-down list. NOTE: Many columns are pre-configured in the default Alarm Logger configuration available. Because this default configuration is often sufficient, configuration of new columns is not always necessary. For more information about creating column configurations also refer to the "Creating a New Column" section in the AlarmWorX32 Logger Help documentation.

4.6

Node Configurations

Each Node represents a computer on the network that is configured to run one or more of the named logger configurations in the active configuration database. When the logger executable is run, it looks for its network computer name in the list of nodes to determine which logger configuration(s) to run. If a logger cannot find its computer name in the list of nodes, it will run the default named configuration. If no default named configuration exists, no configuration will be run. If you want the local machine to run one or more non-default alarm logger configurations, you can use "anonymous" as the node name instead of specifying the actual node name. NOTE: The Quick Lab following this section outlines the steps necessary to create and configure nodes and links to configurations. For more information about creating nodes and links to configurations also refer to the "Adding a New Node" and Assigning Configurations to Nodes sections in the AlarmWorX32 Logger Help documentation.

GENESIS32 Standard Training Manual

Quick Lab: AlarmWorX32 Logger


2.3.1 Quick Lab Overview

2.3

In addition to visualizing the current alarm states, the alarms will be logged to a MSDE or SQL Server database. The ICONICS AlarmWorX32 Logger is an OPC Alarm and Events client that can subscribe to one or more available OPC Alarm servers. Estimated time to complete this lab: 30 minutes. 2.3.1.1 2.3.1.2 Task Checklist

In this quick lab, you will complete the following tasks: Create logger configurations. Set up database logging, including connecting to databases. Associate configurations with nodes. Support Files

To complete this quick lab, you will need the following support files: TankLevelSimulation.mdb AlarmServer.mdb

1.6.

Creating an Alarm Logger Configuration


1 2 If the GraphWorX32 display with the Alarm Viewer is still open, minimize or close it after saving your changes. Open the Alarm Logger Configurator from Start Programs ICONICS GENESIS32 AlarmWorX32 Alarm Logger Configurator.

GENESIS32 Standard Training Manual

The first time you open this Configurator, the default demo configuration will be in place. If necessary, you can open this configuration database from the C:\Documents and Settings\All Users\ICONICS\Examples32\ directory. The file is named AWXLogConfig.mdb, as depicted in Figure L2.3.1.TheC:\ProgramFiles\ICONICS\GENESIS32\Examples\Trainin g\ directory should be used to save your configuration.

Figure L2.3.1: Opening Alarm Logger Configuration Database 4 The Alarm Logger Configurator with the AWXLog32.mdb configuration database in place will look like Figure L2.3.2.

Figure L2.3.2: The Default Alarm Logger Configuration NOTE: The Alarm Logger is capable of running multiple configurations at the same time. This makes it possible to separate alarms from different sources or of different importance into different databases or tables. Another common separation is to log the alarms into one table and the (operator) events into another table.

GENESIS32 Standard Training Manual

2.3.1.1

Creating Two Logger Configurations

As it is quite common to separate the events from the alarms and log them into two different databases or tables, we will do the same in this example. 1. In the tree control on the left hand side select the default configuration and use Edit Copy to put this configuration on the clipboard. 2. Select Configurations at the top of the tree, and then select Edit Paste to duplicate the configuration. 3. Select the configuration with the name Copy_of_default, and select Edit Rename to rename it to Alarms. 4. Select the configuration with the name default, and select Edit Rename to rename it to Events. 5. Now we have two configurations, and we must also make sure that the subscriptions for both configurations are correct. 6. Select the Alarms configuration, and click on the Edit Subscription button to open the Subscription Properties dialog, depicted in Figure L2.3.3.

Figure L2.3.3: Alarm Logger Subscription 7. In the Subscription tab you will find two pre-configured subscriptions, as depicted in Figure L2.3.3. In this display only the Alarm Server will be used, so select ICONICS Event Server. Click on Delete, and then click on Yes in the confirmation dialog in Figure L2.3.4.

GENESIS32 Standard Training Manual

Figure L2.3.4: Deleting a Subscription 8. Click on OK to return to the Alarms configuration page. 9. Click on Apply to commit the changes. 10. Repeat the same steps for the Events configuration, only in this case remove the ICONICS Alarm Server instead. 2.3.1.2 Setting up Database Logging

In this Training Course Application the alarms and events will be logged to a MSDE or SQL Server database, depending on what is installed on the system. NOTE: Before following these steps, you must first create the database that you plan to log to. Whether logging to a MSDE or SQL Server database, refer to Appendix B for help with configuring that database. Follow Lab B.1 Section 2 in order to create the database if you have MSDE installed on your machine. Follow Lab B.2 Section 2 in order to create a database if you have Full SQL Server installed on your machine. To create the database connection from the Alarm Logger: 1. In the Alarm Logger Configurator, select the Alarms configuration and click on the Database Logging page. If the Database Logging page is not visible, ensure that the View Dialog View menu is checked. 2. On the Database Logging page click on the Database Connection tab, as depicted in Figure L2.3.5.

GENESIS32 Standard Training Manual

Figure L2.3.5: Alarm Logger Database Connection 3. In the Database Connection page click on the ... button to open the Primary Data Source dialog. Click on the Machine Data Source tab, as depicted in Figure L2.3.6.

Figure L2.3.6: Creating the Alarm Logger Primary Data Source

GENESIS32 Standard Training Manual

4. Click on New to open the Create New Data Source dialog, depicted in Figure L2.3.7.

Figure L2.3.7: Creating a New Data Source 5. Select System Data Source. The difference between a System Data Source and a User Data Source is that the former is available to all users and the latter only to the user who creates the data source. 6. Click on Next to select the database driver for this data source. 7. Select SQL Native Client, as depicted in Figure L2.3.8.

Figure L2.3.8: Selecting the Database Driver 8. Click on Next and Finish to start configuring the specific details for this ODBC driver. 9. In the Name field enter AlarmLogger.

GENESIS32 Standard Training Manual

10. In the Server field select (local) to use the local SQL Server or MSDE, as depicted in Figure L2.3.9.

Figure L2.3.9: Connecting to SQL Server 11. Configure the connection to use the credentials of the currently logged-on user, as depicted in Figure L2.3.10, and click Next.

Figure L2.3.10: SQL Server Authentication 12. Click on Next to select the default database to use. 13. Enable Change the default database to, and select AlarmLogger from the drop-down list, as depicted in Figure L2.3.11.

GENESIS32 Standard Training Manual

Figure L2.3.11: Selecting the Default Database 14. Click on Next to configure any additional properties, as depicted in Figure L2.3.12. Typically the default settings in this dialog are sufficient.

Figure L2.3.12: Additional Settings 15. Click on Finish to show the final configuration of this connection, as depicted in Figure L2.3.13. Optionally click on Test Data Source to check the validity of the settings by running a test, as depicted in Figure L2.3.14. Click on OK to return to the Select Data Source dialog.

GENESIS32 Standard Training Manual

Figure L2.3.13: SQL Server Connection Setup

Figure L2.3.14: SQL Server Connection Test 16. Select the Data Source AlarmLogger, as depicted in Figure L2.3.15, and click on OK to return to the AlarmWorX32 Logger.

GENESIS32 Standard Training Manual

Figure L2.3.15: Selecting the AlarmLogger Data Source 17. The SQL Server Login dialog will appear, as depicted in Figure L2.3.16. But since the credentials of the currently logged-on user are used, nothing has to be configured here. Click on OK to return to the Alarm Logger Configurator.

Figure L2.3.16: SQL Server Login 18. With the database connection in place select the Table(s) Management page. 19. Set the Table Name to AlarmLog. 20. Click on Apply to accept the changes. 21. Select the Events configuration from the tree control, and choose the Database Connection page. Click the button and choose the Machine Data Source page. 22. Select the AlarmLogger Data Source for configuration as well. In this case simply selecting it from the list will suffice. 23. Choose the Tables Management page, and set the Table Name for this configuration to EventLog. Click Apply to commit the changes to the database.

GENESIS32 Standard Training Manual

2.3.1.3

Associating Nodes and Configurations

The Alarms and Events configurations are now complete. If the Alarm Logger Configurator only has one configuration (aptly named Default), it will automatically start this configuration. NOTE: When multiple configurations are present, as is the case in the Training Course Application, the configurations need to be associated with a node to ensure they will be started when the alarm server enters runtime. 1. 2. 3 4 5 6 7 8 9 Click on the Nodes item in the tree view. Select Edit New Node to create a new node. Enter your own computer name into the node name field. You may browse for your node name if you desire. Click on Apply to commit the changes. Select Edit New Link to Configuration to associate a configuration with this node. Select the Alarms configuration and click on Apply. Click on Add New to add the other configuration as well. Select the Events configuration and click on Apply. Both configurations are now associated with the current node. The final task before the AlarmWorX32 Logger can be started is to make the current database the active database. Select File Make Active, and click Yes to activate the database. Once the active database has been changed, start the Alarm Logger by clicking on the Traffic Light icon or choosing Action Start Logger from the menu. The traffic light will change to green, and the server will be running in the background. Close the Alarm Logger Configurator. The Alarm Logger will remain running.

10 11 12

GENESIS32 Standard Training Manual

Alarm Report ActiveX


5.1. Objectives

At the end of this chapter, you will be familiar with the following concepts: The Alarm Report ActiveX and where to configure its properties Some general settings of the ActiveX Alarm Report database connection Column configuration Record sorting in the alarm report Runtime options

5.2.

Alarm Report ActiveX

Alarms logged to a database can be a chore to sort through and analyze. The powerful Historical Alarm Analysis (Report) ActiveX solves this problem by easily creating filtered reports, pie charts, bar plots, and even exporting to custom Crystal Reports. At the click of a button, you can find out which alarm is occurring most often, see if there are certain "trouble spots," review downtime, and more.

Figure 2.4.1: Alarm Report ActiveX The Alarm Report ActiveX, shown in Figure 2.4.1 allows reporting (user-configured or preconfigured) and graphing of alarms. The source of the alarm data can be live alarms, alarms previously logged by the Alarm Logger, or a combination of both. Because the Alarm Report is an ActiveX, you can drop it into the AlarmWorX32 Container, within any GraphWorX32 HMI display, an HTML Internet/intranet-based Web page, or any other ActiveX container.

GENESIS32 Standard Training Manual

5.3.

Alarm Report Properties

To start the configuration of the Alarm Report ActiveX, double-click the ActiveX (the yellow notebook type object). This opens the Alarm Report ActiveX Properties dialog box, shown in Figure 2.4.2. Use these property pages to configure how alarms will be reported (appearance, organization, etc.) and which report type will be used.

Figure 2.4.2: Alarm Report ActiveX Properties NOTE: Right-clicking on the Report ActiveX and selecting Properties also opens the Alarm Report ActiveX Properties dialog box. The ActiveX Properties dialog contains the following configuration pages: General Columns Grid Configuration Charts Configuration Fonts Records Sorting Record Filtering Reporting Summary Web Access Of these configuration pages, this class will work closely with the General, Columns, and Record Sorting pages. Other configuration pages, such as the Charts Configuration, Reporting, and Summary pages, have default configurations that allow you to use the features they apply to with no configuration required (although changes can be made as desired).

GENESIS32 Standard Training Manual

5.4

General Settings and Database Connection

The General tab of the Alarm Report ActiveX Properties dialog box, shown in Figure 2.4.2, allows you to specify the name of the report file, select the border type and connect to a data source. Some other important settings on this page are: Enable Popup Toolbar: When this option is checked, the Report Runtime toolbar is available during runtime mode. Auto Update: Specifies the frequency (in seconds) at which the Alarm Report updates data from the Alarm Logger database. The most important option on this configuration page is the Data Source Connection Parameters. This is the one configuration that must be done on the Alarm Report before any data are shown. Clicking the Connection Parameters button opens the Database Connection dialog box, shown in Figure 2.4.3, where you can specify an alarm logger database from which the report will pull historical alarms.

Figure 2.4.3: Database Connection Properties All data source connections are made through the Data Link Properties dialog box. The Connection tab settings may vary depending on which data provider is selected. The Data Link Properties dialog for a Microsoft SQL Server data provider is shown in Figure 2.4.4. Click the Help button at any time to view the Microsoft Data Link help documentation.

GENESIS32 Standard Training Manual

Figure 2.4.4: Data Link Properties NOTE: The Quick Lab following this section outlines the steps necessary to configure a database connection. For more information about database connection configuration also refer to the "General" section in the AlarmWorX32 Report ActiveX Help documentation.

5.5

Column Configuration

In the Columns tab of the Alarm Report ActiveX Properties dialog box, shown Figure 2.4.5, you can specify which columns will appear in your alarm report. By default, the following three items are included in the report: EventTime, Tag, and Message, as shown in the selected list in Figure 2.4.5.

Figure 2.4.5: Column Configurations By clicking the Add and Remove buttons in the middle and the up and down arrows on the right side of the dialog, you can select which columns to include in the report as well as indicate the order of their appearance. You can also change the appearance of a column by either double-clicking on an item in the Selected list or selecting the item and clicking the Config button. The Set Column configuration dialog allows you to set the font, color, width, and cell properties by selecting and changing the various options available.

GENESIS32 Standard Training Manual

NOTE: The Quick Lab following this section outlines some steps necessary to configure columns. For more information about column configuration also refer to the "Columns" section in the AlarmWorX32 Report ActiveX Help documentation.

5.6.

Records Sorting

The Records Sorting tab of the Alarm Report ActiveX Properties dialog box has just one button: the Sort By button. Clicking the Sort By button opens the Sorting Fields dialog box, as shown in Figure 2.4.6. You can choose whether to disable or enable sorting. If you choose to enable sorting, here you will specify the priority by which the fields in the alarm report are sorted. Records can be sorted based upon any column of information included in the report.

Figure 2.4.6: Sorting Fields Configuration All elements will be sorted by the first category in the list. In the event that two elements in the first category are identical, the reported alarms are sorted by the criteria configured for the next item in the list. NOTE: The Quick Lab following this section outlines the steps necessary to configure records sorting. For more information about records sorting also refer to the "Records Sorting" section in the AlarmWorX32 Report ActiveX Help documentation.

5.7.

Alarm Report Runtime Options

Double-clicking anywhere on the Alarm Report ActiveX during runtime mode opens the Alarm Report Runtime Toolbar, as shown in Figure 2.4.7. Using the toolbar, you can execute certain operations and change how the data are viewed.

GENESIS32 Standard Training Manual

Figure 2.4.7: Runtime Toolbar There are two different views to choose from: Data Grid or Chart Summary. When viewing the Data Grid, you can further choose from a detailed report or a summary report. The Summary report provides a summary based on any column (configurable in the Configure mode Properties dialog), and the frequency of occurrence of items in that column. To view a Bar Chart or Pie Chart summary of the Alarm Report data during runtime mode, choose from the Chart Summary buttons on the Runtime toolbar. The number of items charted depends on the options selected on the Records Filtering tab of the Configure mode Properties dialog. If no filters are enabled, all alarm types are charted. Notice that sorting and filtering can be configured during Runtime just as they can during Configure mode. NOTE: The Quick Lab following this section steps through the use of the runtime options briefly. For more information about runtime options also refer to the "Runtime Mode" section in the AlarmWorX32 Report ActiveX Help documentation.

GENESIS32 Standard Training Manual

Quick Lab: AlarmWorX32 Report ActiveX


2.4.1 Quick Lab Overview

2.4

Once the data have been logged into a database using the Alarm Logger, it is also rather useful to be able to look at what actually has been logged. The Alarm Report ActiveX was designed for this purpose. This lab will take you through the steps of configuring the Alarm Report ActiveX in order to view the data logged by your Alarm Logger. Estimated time to complete this lab: 20 minutes. 2.4.1.1 Task Checklist In this quick lab, you will complete the following tasks: 2.4.1.2 Support Files To complete this quick lab, you will need the following support files: TankLevelSimulation.mdb AlarmServer.mdb AWXLog32.mdb AlarmLogger.mdb Insert an Alarm Report ActiveX into a GraphWorX32 display. Configure the Alarm Report ActiveX. View historical alarms in the Alarm Report ActiveX.

2.4.2.1

Creating a Historical Alarm Reporter


1. Open a new GraphWorX32 display from Start Programs ICONICS GENESIS-32 GraphWorX32 GraphWorX32.

The AlarmWorX32 Historical Alarm Reporter is an ActiveX, so it can be used in any ActiveX Container, such as GraphWorX32.

2. Immediately choose File Save and save the display as AlarmReporter.gdf, choosing the file type as GraphWorX32 Displays without VBA (*.gdf).

GENESIS32 Standard Training Manual

3. Inside the display insert a new Alarm Reporter ActiveX, using the icon from the ActiveX toolbar. 4. Resize the Alarm Viewer ActiveX so it leaves approximately 100 pixels at the top and the bottom of the screen, as depicted in Figure L2.4.1.

Figure L2.4.1: Alarm Reporter Inside the Display 5. With the Alarm Reporter inserted its properties can be configured. Double-click on the Alarm Report ActiveX to open up the properties dialog. 6. Select the General tab, and then click on the Connection Parameters button to open the Database Connection dialog. 7. Select the SQL Server data provider, and then click on the Build Connection String button to open the Data Link Properties dialog. 8. Enter (local) as the Server Name. 9. Select Use Windows NT integrated security. 10. Select the database AlarmLogger as depicted in Figure L2.4.2.

GENESIS32 Standard Training Manual

Figure L2.4.2: Configuring the Data Link 11. Click on OK to return to the Alarm Reporter properties. 12. For the Base Table Name enter or select AlarmLog, as depicted in Figure L2.4.3.

Figure L2.4.3: Selecting the Base Table Name 13. Click on Connect to establish the connection to the database and table. 14. Click on OK to return to the Alarm Reporter properties. 15. Select the Columns tab to configure which columns will be shown to the operator.

GENESIS32 Standard Training Manual

16. In addition to the already present columns EventTime, Tag, and Message, we will also add the CV and Area columns. 17. Select the CV and Area columns in the Available list and click on the Add button to add these columns to the Selected list. 18. Select Area and move it up using the arrow buttons on the side, as depicted in Figure L2.4.4.

Figure L2.4.4: Modifying the Columns 19. Click on OK to close the property pages and return to GraphWorX32. 20. Go to File Save to save the display. 2.4.2.1 Alarm Reporter in Runtime Click on the Runtime menu to start runtime mode and show the logged alarms, as depicted in Figure L2.4.5.

GENESIS32 Standard Training Manual

Figure L2.4.5: Alarm Reporter in Runtime Mode 21. Double-click on the Alarm Report ActiveX to open the Runtime toolbar, shown in Figure L2.4.6, and explore your viewing options.

Figure L2.4.6: Alarm Report Runtime Toolbar 22. Note that you can configure record filtering and sorting during Runtime and buttons respectively. The with the update of the latest records in the database. button will force an

23. Switch between the Detailed Report view and Alarm Summary view using the and buttons respectively. The Alarm Summary view can be set to summarize by whatever column you prefer in the ActiveX properties window in Configure mode. 24. You can also view your data in the form of a bar chart or pie chart with the and buttons. The properties of these charts are also configurable in Configure mode.

GENESIS32 Standard Training Manual

25. The five report buttons in the middle of the toolbar will execute a Crystal Report on the data you are viewing. These reports are configurable when the ActiveX is in Configure mode, and up to five can be configured and enabled at a time. Two are configured for you by default. 26. After exploring the Runtime options of the Alarm Report ActiveX, make sure your changes are saved (if desired), and close the display.

TrendWorX32 SQL Logger


6.1. Objectives
The TrendWorX32 SQL Logger and its Configurator Basic configuration settings Database groups and configuring database connections Databases supported by the Trend Logger Configuring logging groups Configuring logging tags

By the end of this chapter, you will be familiar with the following concepts:

6.2.

Introduction to TrendWorX32

TrendWorX32 is a powerful collection of real-time trending, historical data logging, reporting, and analysis tools that seamlessly integrates with enterprise-wide information systems. Based on the OPC Historical Data Access specification for creating Plug and Play historical data servers and clients, TrendWorX32 offers an open solution to applications requiring scalable and distributed real-time performance. The powerful Microsoft-based ADO/OLEDB data-logging provider is at the core of TrendWorX32. OPC HDA provides the standard COM and OLE interface for the ICONICS Trend Viewer ActiveX Control to display real-time and historical data, separately or simultaneously. Several trend display types are supported, including time plots, XY plots, logarithmic plots, bar plots, the popular strip chart recorder, and even circular charts! Acquire thousands of data points and organize them into groups for very fast and efficient replay of historical and real-

GENESIS32 Standard Training Manual

time information. You can use the built-in Visual Basic for Applications to create reports, calculations, and data analysis. TrendWorX32 integrates with Microsoft Access, Microsoft SQL 7.0, Microsoft SQL 2000, and Oracle using ADO and OLEDB database technologies. In addition, TrendWorX32 supports MSDE 7.0 and MSDE 2000.

6.3.

TrendWorX32 SQL Logger and Logger Configurator

The primary purpose of TrendWorX32 32-bit data logging is to provide both a datacollection system and a data-retrieval station for historical data to trending and reporting clients. The TrendWorX32 SQL Data Logger: Collects real-time data from OPC servers. Logs real-time data to a database. Provides data-retrieval capability by implementing a draft of the OPC HDA (Historical Data Access) specification. Provides data-retrieval services locally and remotely across computer boundaries via DCOM. The diagram in Figure 3.1.1 shows the internal system architecture of the TrendWorX32 SQL Data Logger:

Figure 3.1.1: Trending and Data Logging Architecture The TrendWorX32 SQL Data Logger not only contains data-logging and data-retrieval historian services, but it also adds a scalable, client-server architecture to the GENESIS32 trending software. This architecture ensures optimal load balancing and distribution, even for large-scale applications. The TrendWorX32 SQL Data Logger uses the most current data-access technology called ADO (ActiveX Data Objects). ADO is a database-access mechanism that provides a wrapper of the OLE DB. OLE DB is a COM approach to database programming that can be used to program any database (relational or not relational) as long as there is a dedicated OLE DB data provider for that database. The end result is that applications based on ADO/OLE DB can potentially access any database regardless of the underlying storage media, file system, and location. TrendWorX32 SQL Data Logger currently uses ADO version 2.5, the Universal OLE DB ODBC data provider supplied by Microsoft, as well as native OLE DB

GENESIS32 Standard Training Manual

providers to access Microsoft Access, Microsoft SQL Server, MSDE, and Oracle-compliant databases.

Figure 3.1.2: Functional Diagram of TrendWorX32 SQL Data Logger TrendWorX32 SQL Data Logger can be deployed using the same PC on which the database resides, or using a different PC that is networked to the database. In addition, you can have TrendWorX32 SQL Data Logger deployed on multiple PCs data logging to the same (or different) databases, therefore providing a scalable and distributed data-logging architecture. The TrendWorX32 Configurator, shown in Figure 3.1.3, is used to create and maintain a tag database for use by the TrendWorX32 SQL Data Logger. Its main function is to perform configuration for data logging. In addition to simple tag configuration, the Configurator is used to create and maintain a process-area hierarchy and to group tags into one or more named configurations to support servers running on multiple network nodes.

Figure 3.1.3: TrendWorX32 Configurator The TrendWorX32 Configurator receives field data from any OPC-compliant data access server and performs configuration. In keeping with the open standards employed throughout the GENESIS32 architecture, your trend configurations are saved to a Microsoft Access or Microsoft SQL Server database. NOTE: The Quick Lab following this section outlines the steps necessary to create Trend Logger configuration databases. For more information about creating configuration databases also refer to the "Creating Configuration Databases" section in the TrendWorX32 Configurator Help documentation.

GENESIS32 Standard Training Manual

6.4.

Trend Logger Configuration

The configuration layout of the TrendWorX32 SQL Data Logger is quite similar to that of an OPC server configuration. The key concept here is the database group object, which replaces the device of the OPC data server configuration. A configuration holds settings for: Database groups Logging groups Logging tags

Figure 3.1.4: Trend Logger Configuration Settings To control the behavior of the logging configuration when the Data Logger Server is put into runtime mode, the following configuration settings are provided in the Logger configuration settings: Network Node Name: The node on which the logging configuration will run; typically this value is set to (local) for a locally running data logger. Use Global Connection: When enabled, the connection to the database will be maintained open. Use UTC Time: When enabled, the time stamps will always be logged in UTC format. Retrials: The number of times the Data Logger will try to log a given data packet if it has failed initially. Retrial Delay: The period (in seconds) between retrials. Max Samples: The maximum number of samples to keep in memory prior to data logging on a per-signal basis. Max Logging Packets: The maximum number of data-logging packets to keep in memory in case of data-logging failure. NOTE: The Quick Lab following this section outlines the steps necessary to create a Trend Logger configuration. For more information about the configuration level parameters also

GENESIS32 Standard Training Manual

refer to the "Creating a New Configuration" section in the TrendWorX32 Logger Configurator Help documentation.

6.5.

Database Support and Options

A key feature of the TrendWorX32 SQL Data Logger is its ability to handle data logging and data retrieval with respect to multiple types of databases concurrently, therefore enabling you to develop a very cost-effective data-logging and data-retrieval application. TrendWorX32 SQL Data Logger will support data logging and data retrieval to or from: Microsoft Access Microsoft SQL Server 6.5, 7.0, and 2000 MSDE 7.0 and 2000 Oracle 8.0 TrendWorX32 SQL Data Logger is a MFC/ATL free-threaded server application that performs data logging and data retrieval by implementing a draft of the OPC HDA (Historical Data Access) specification. Although Microsoft Access has its applications, it must be considered that a database server like Microsoft SQL Server, MSDE, or Oracle may provide better performance and functionality for larger data-logging systems. This becomes especially relevant when considering maintenance, as Microsoft Access databases do not have an automatic compacting function. This means that every so often a Microsoft Access database will have to be compacted manually. During the compacting process the TrendWorX32 SQL Logger cannot log any data to the database. NOTE: For more information about choosing different databases refer to the "Choosing a Database" section in the TrendWorX32 SQL Data Logger Help documentation.

6.6.

Database Group Configuration

To set up data logging, you must first configure the underlying database and set up ODBC data sources. This can be done within the TrendWorX32 Logger Configurator by connecting a Database Group to an existing database or a new database. It is very critical that the PCs on which the TrendWorX32 SQL Data Logger resides have full access to the target database to create, add, delete, and update tables. Otherwise, data logging cannot be accomplished. A database group object represents a: High-level grouping of groups of signals to data log Multithreaded object for managing data updates and logging-to-disk activities along with an extensive runtime user interface Physical connection to an underlying database In addition, each database maintains a list of recent errors for troubleshooting, which can be in the TrendWorX32 Logger Configurator.

GENESIS32 Standard Training Manual

Figure 3.1.5: Database Group Configuration The following configuration fields are available for a database group: Name: Enter the name of the database group in this field. Database connection settings: This section allows you to set up a connection to the data source. It also allows you to set up a new data source. Activate database group: If the TrendWorX32 SQL Data Logger is in runtime mode, clicking Activate starts data collection and data logging for all logging groups of the selected database group. Deactivate database group: If the TrendWorX32 SQL Data Logger is in runtime mode, clicking Deactivate stops data collection and data logging for all logging groups of the selected database group. Database switching: Clicking Switch Database allows you to switch to a different database while in runtime mode. NOTE: Database switching is supported in runtime mode; that is, when data logging is active. The TrendWorX32 SQL Logger can use different databases for data logging, including Microsoft Access, Microsoft SQL Server, MSDE and Oracle. Different databases require a different ODBC setup, so some of the dialogs may be different depending on which database you use. NOTE: The Quick Lab following this section outlines the steps necessary to create a Database Group. For more information about the database level parameters and considerations also refer to the "Creating a New Database Group" section in the TrendWorX32 Logger Configurator Help documentation.

GENESIS32 Standard Training Manual

6.7.

Logging Group Configuration


Each database group object is responsible for managing data Logging Groups of signals. A logging group includes: A logical collection of signals to be data-logged Common data-collection rate and data-logging table Common data-logging configuration Group style management and editing capability for a collection of signals The logging group properties dialog box contains the following three tabs: Data Collection tab Logging tab Table Management tab The logging group allows you to specify two different rates on the Data Collection tab: a data-collection rate and a calculation period. The data-collection rate is the rate at which the TrendWorX32 SQL Data Logger receives values from the OPC server. It has to be noted that if there are no new values available in the OPC server, no updates will be sent to the SQL Data Logger. The calculation period, on the other hand, affects how the data are collected, as well as over which period statistics, such as minimum and maximum, are calculated (if calculations are applied).

Figure 3.1.6: Data Collection Configuration You can also configure Start Conditions and Stop Conditions on the Data Collection tab, to define the beginning and end of data collection, or the period during which the logging group is connected to the data source and is logging data. The Logging tab in the Logging Group dialog, shown Figure 3.1.7, determines the settings and conditions for the storage of historical information to the database for the selected logging group. It also provides excellent load-balancing capabilities when writing to disk.

GENESIS32 Standard Training Manual

Figure 3.1.7: Logging Settings The manner in which the collected data are actually logged to the database by the Data Logger is determined by the settings on the Logging tab. The On Time check box refers to a data-logging time. On Interval refers to a selected time period during which data logging occurs (for example, every 30 minutes). The logging subinterval is used for tags, which have this option enabled. It basically averages samples, at the selected subinterval, prior to logging to disk. If the option for the tag is not enabled, and the tag is not configured to log all values, only one averaged sample will be data-logged. NOTE: The fastest recommended time for logging data to disk is 5 seconds. The Table Management tab in the Logging Group dialog box, shown in Figure 3.1.8, enables you to configure the data-logging process such that a new table can be created from the data when requested. This allows a better overview of the data than a continuous stream of data would. Each group of signals stores its data to a single table or a cyclic sequence of tables (userconfigurable). This allows for a controlled size of database storage. For example, you can set up the data-logging configuration for a group such that the data are stored to multiple, sequential tables. Trend clients may be configured to retrieve data from the most recent tables, while the other tables are maintained for reporting and comparison with recent data. Although historical information is retrieved by combining information from various historical tables, the ability to store data in multiple (sequential) tables can be used for database maintenance optimization as well as overall system load balancing. By controlling the size of each historical table, you can avoid creating extremely large tables, which may degrade overall data logging and database performance. To accelerate data retrieval, TrendWorX32 SQL Server creates the necessary database schema to maintain updated information with respect to the time interval for which each table logs data.

GENESIS32 Standard Training Manual

Figure 3.1.8: Tables Management Settings The Table Management tab configures how the data will be stored in terms of the number of tables and when a new table will be started. The number entered in the Number of Tables field determines the maximum number of tables that will be created. Therefore, when that number is reached and the last table is full, the TrendWorX32 SQL Server will wipe out all information in the first table to make room for new data. This is important to remember when configuring the settings in the Create New Table field. The reason for limiting the number of tables is to save room in your system. NOTE: The Quick Lab following this section outlines the steps necessary to create and configure a logging group. For more information about logging group parameters and considerations refer to the "Creating a New Logging Group" section in the TrendWorX32 Logger Configurator Help documentation.

GENESIS32 Standard Training Manual

6.8.

Logging Tag

Each logging group maintains a collection of individual Logging Tags. These signals can be OPC signals or calculated signals. Each signal can be configured with respect to various attributes, such as deadband and logging, and can be based on an OPC server tag or an expression incorporating OPC server tags.

Figure 3.1.9: Logging Tag Configuration Signal name: The Signal Name field shows the actual signal (tag or point) name or expression. When you click the tag name in the lefthand pane of the TrendWorX32 Configurator screen, the tag name or ID, which uniquely identifies the tag, is displayed in the Signal Name field. Description: This field contains a description of the actual signal. For Unicode applications, the description can be language-aliased so that trend clients will use the translated description during animation (runtime) mode. TrendWorX32 Reporting uses the Description text on a per-report tag basis. This option, if used, will label the resulting data columns of the target report using the defined Description entries in the TrendWorX32 Configurator. By default, when a signal is inserted in the TrendWorX32 Configurator, the Description entry of the signal will be its logging name. You can override the Description field, which will be used to label the resulting data column in the final report. If the Description field in the TrendWorX32 Configurator is left empty, the logging name will be used to label the resulting data column of the report. The TrendWorX32 Reporting application will still display in the tree view or edit dialogs the report tags using their logging names. Logging name: Initially the signals Logging Name is set to match the actual tag (point) name. You can override this setting and choose a

GENESIS32 Standard Training Manual

more appropriate name, such as "Temperature Measurement." This, in turn, will represent the "signal name" by which historian clients will access the data logged for that signal. If the signal is an expression, its logging name should be replaced with a description that does not include expression-specific syntax. NOTE: Avoid using long logging names. If reporting will be used, logging names should be a maximum of 60 characters. If the tag is an expression, the logging name should be modified not to contain expression symbols or mathematical symbols. In addition, avoid using special characters, such as @, #, &, *, $, !, ^, %, ~, and ?. Engineering units: This field allows you to enter engineering units that will be used. For a Unicode application, the Eng. Units field can be language-aliased, and as a direct result, the trend clients will scale the historical data upon switching to a new language. Deadband: Each group can also have an individual data-logging deadband and filter for each tag (signal) it maintains. For instance, you may choose to log data for all values retrieved from a certain OPC data server, or for the average of the values over a period of time. In addition, you can configure a deadband value (absolute or percentage) for each signal. The Deadband field allows you to specify a specific (absolute) operational value or a percentage of operation value a signal must change before the server updates with the new value. The deadband is always computed using the most recent sample value, and it is not based on the High/Low range sample information. A deadband value of 0 results in storing all samples to the database. Ranges: The Hi Limit field sets the values for the tag's high limit. The Lo Limit field sets the values for the tag's low limit. In addition, if Update Ranges on Start is checked, the ranges for each tag will be refreshed from the OPC server. This ensures that ranges for this tag will be updated at the start of data logging. Clicking the Simple/Advanced button hides/shows the Log to Disk options. The Log to Disk field allows you to select the value(s) of the signal to log to the disk. If All Samples is selected, the server will log all values for that signal that were collected during that specific data-collection period. If other filters are selected, the appropriate calculations will be applied to the collected values before logging the result. NOTE: The Quick Lab following this section outlines the steps necessary to create and configure logging tags. For more information about OPC tag parameters refer to the "Creating a New Tag" section in the TrendWorX32 Logger Configurator Help documentation.

GENESIS32 Standard Training Manual

Quick Lab: TrendWorX32 SQL 2.5 Logger


2.5.1 Quick Lab Overview
This section will explain how to set up the TrendWorX32 Historical Logging system in order to collect data and make it available for replaying in a trend window. Estimated time to complete this lab: 45 minutes. 2.5.1.1 Task Checklist 2.5.1.2

In this quick lab, you will complete the following tasks: Create a logging configuration. Create a database group, and configure a database connection. Create a logging group. Create logging tags.

Support Files

To complete this quick lab, you will need the following support file: TankLevelSimulation.mdb

2.5.2 Creating a History Logging System


1. Open the TrendWorX32 Configurator from Start Programs ICONICS GENESIS32 TrendWorX32 TrendWorX32 Configurator.

2. The first time you open this Configurator, the default demo configuration will be in place. You will need to create a new Configuration Database to work from.

GENESIS32 Standard Training Manual

3. Click on the button, or choose File New and follow the Configuration Database Wizard to create an MS Access Configuration Database of the name DataLogger.mdb. Save the database in your C:\Program Files\ICONICS\GENESIS32\Examples\Training directory. 4. The TrendWorX32 Configurator with your new blank configuration will look like the one shown in Figure L3.1.1.

Figure L3.1.1: TrendWorX32 Configurator 2.5.2.1 Creating the Logger Configuration

In this Training Course Application a logging configuration will be created to run on the local machine.
1. Select Local Configuration on Configurations in the tree view to rename it or right-click, select New Configuration to insert a new configuration. Open the details pane on the right-hand side.

2. Set the Name to Training Course. 3. Click on Apply to commit the changes to the database.

GENESIS32 Standard Training Manual

2.5.2.2

Creating the Database Group

In the Training Course Application a single database group will be created, as all data will be logged to the same database. NOTE: Before following these steps, you must first create the database that you plan to log to, and name it TrendLogger. Refer to the steps taken in Lab B.1 Section 2 for help on creating the database if you have MSDE installed on your machine. Refer to the steps taken in Lab B.2 Section 2 for help in creating a database if you have Full SQL Server installed on your machine. 1. In the TrendWorX32 Configurator, click on the Training Course configuration and select Edit New Database Group to create a new Database Group. 2. Set the Name to Training Course. 3. Create a new Data Source by clicking on Browse to open the Primary Data Source dialog. Click on the Machine Data Source tab, as depicted in Figure L3.1.2.

Figure L3.1.2: Creating the TrendWorX32 SQL Logger ODBC Data Source 4. Click on New to open the Create New Data Source dialog, depicted in Figure L3.1.3.

GENESIS32 Standard Training Manual

Figure L3.1.3: Creating a New Data Source 5. Select System Data Source. The difference between a System Data Source and a User Data Source is that the former is available to all users and the latter only to the user who creates the data source. 6. Click on Next to select the database driver for this data source. 7. Select SQL Server, as depicted in Figure L3.1.4.

Figure L3.1.4: Selecting the Database 8. Click on Next and Finish to start configuring the specific details for this ODBC driver. 9. In the Name field enter TrendLogger. 10. In the Server field select (local) to use the local SQL Server or MSDE, as depicted in Figure L3.1.5, and click Next.

GENESIS32 Standard Training Manual

Figure L3.1.5: Connecting to SQL Server 11. Configure the connection to use the credentials of the currently logged-on user, as depicted in Figure L3.1.6.

Figure L3.1.6: SQL Server Authentication 12. Click on Next to select the default database to use. 13. Enable Change the default database to and select TrendLogger from the list, as depicted in Figure L3.1.7.

GENESIS32 Standard Training Manual

Figure L3.1.7: Selecting the Default Database 14. Click on Next to configure any additional properties, as depicted in Figure L3.1.8. Typically the default settings in this dialog are sufficient.

Figure L3.1.8: Additional Settings 15. Click on Finish to show the final configuration of this connection, as depicted in Figure L3.1.9.

GENESIS32 Standard Training Manual

Figure L3.1.9: SQL Server Connection Setup 16. Optionally click on Test Data Source to check the validity of the settings by running a test, as depicted in Figure L3.1.10. Click OK on the test results if the test was run, and then click on OK to return to the Select Data Source dialog.

Figure L3.1.10: SQL Server Connection Test 17. Select the Data Source TrendLogger, as depicted in Figure L3.1.11, and click on OK to return to the Data Logger.

GENESIS32 Standard Training Manual

Figure L3.1.11: Selecting the TrendLogger Data Source 18. The SQL Server Login dialog will appear, as depicted in Figure L3.1.12. But since the credentials of the currently logged-on user are used, nothing has to be configured here. Click on OK to return to the Trend Logger Configurator.

Figure L3.1.12: SQL Server Login 19. Click on Apply to accept the changes, as depicted in Figure L3.1.13.

GENESIS32 Standard Training Manual

Figure L3.1.13: Configured Database Connection 20. To check if the connection to database can be established successfully, you can click on the Perform Test button on the right-hand side of the dialog. 2.5.2.3 Creating the Logger Group

In the Training Course Applications two logging groups will be created: one for the simulated tags and one for the tank level tags. 1. Select Edit New Logging Group to create a new Logging Group.

2. Set the Name of the logging group to Levels. 3. In the Data Collection tab, select the General section to show the data collection rate and the calculation period parameters. Enter a data collection rate of 10 seconds and a calculation period of 1 minute, as depicted in Figure L3.1.14.

GENESIS32 Standard Training Manual

Figure L3.1.14: Data Collection Configuration 4. It is also possible to control the start and stop conditions for the data collection. To set up these conditions, simply click on the Start Conditions or Stop Conditions sections on the Data Collection tab. 5. In the Training Course Application the default Start Condition shall be used: On Start. 6. No stop conditions will be used in this exercise. Logging Parameters and Table Management Besides the data collection parameters previously configured, two additional sets of parameters have to be configured: Logging parameters, which control when data are actually stored into the database, and Table Management, which controls the number of tables maintained in the database and when the TrendWorX32 SQL Data Logger starts a new table. 1. Open the Logging tab. Enable On Interval, and disable any other options that may be enabled. 2. Enter a time period of 1 minute as the interval, as depicted in Figure L3.1.15. This will ensure that the TrendWorX32 SQL Data Logger will store anything it has in memory to the database every minute.

GENESIS32 Standard Training Manual

Figure L3.1.15: Setting up the Logging Interval 3. Open the Table(s) Management tab. 4. Set the table name to Levels. This sets the base name for all tables that are used for this logging group. 5. Enter a value of 28 for the number of tables. 6. Enable On Time, and disable any other options that may be enabled. 7. Enter a time of 0:00:00 as the time period, as depicted in Figure L3.1.16. This will make the TrendWorX32 SQL Data Logger start a new table every day at midnight. So a total of 28 tables are maintained for 4 weeks before the logger starts overwriting the first table. The TrendWorX32 SQL Data Logger basically maintains a circular log of tables, containing 1 days data, as depicted in Figure L3.1.17. 8. Click on Apply to commit the changes to the configuration database.

GENESIS32 Standard Training Manual

Figure L3.1.16: Setting up the Table Management

Figure L3.1.17: Circular Set of Tables Maintained by TrendWorX32 2.5.2.4 Creating the Logger Tags

In the Training Course Applications two logging groups will be created: one for the simulated tags and one for the tank level tags. 1. Select the logging group and select Edit New OPC Tags. 2. Browse to the Tank Level DataWorX32 Registers: My Computer ICONICS.DataWorX32.8 Registers TrainingCourse Tanks. Select all six folders Tanks1 through Tanks6 on the right side, and then click on OK. All items have now been added to the logging group, as depicted in Figure L3.1.18.

GENESIS32 Standard Training Manual

Figure L3.1.18: OPC Tags Added to the Configuration NOTE: The properties of the logged OPC tags can be configured into great detail, as Figure L3.1.19 depicts. Besides some obvious parameters, such as Signal Name and Description, it is also possible to configure what is actually logged to disk. By default all samples will be logged to disk. However, it is also possible to select from a wide variety of statistics, or to use a totalizer function to log not the actual value but an accumulated value instead.

Figure L3.1.19: Logging Tags Details NOTE: The Tank Levels do not change that much until the displays are configured as well, so for some changing data in this project a number of simulation tags will be added as well. 3. Select the Training Course database group in the tree. 4. Select Edit New Logging Group to create a new logging group.

5. Set the Name of the logging group to Simulated. 6. Open the Data Collection page and select the General section to show the data collection rate and the calculation period parameters. Enter a data collection rate of 1 second and a calculation period of 1 minute. 7. It is also possible to control the start and stop conditions for the data collection. To set up these conditions, simply click on the Start Conditions or Stop Conditions sections on the Data Collection page. 8. For the example application, the default Start Condition shall be used: On Start. 9. No stop conditions will be used in this exercise.

GENESIS32 Standard Training Manual

10. Open on the Logging tab. Enable On Interval, and disable any other options that may be enabled. 11. Enter a time period of 5 seconds as the interval. This will ensure that the TrendWorX32 SQL Data Logger will store anything it has in memory to the database every 5 seconds. 12. Open the Table(s) Management tab. 13. Set the table name to Simulated. This sets the base name for all tables that are used for this logging group. 14. Enter a value of 28 for the number of tables. 15. Enable On Time, and disable any other options that may be enabled. 16. Enter a time of 0:00:00 as the time period. 17. Click on Apply to commit the changes to the configuration database. 18. With the logging group configured, tags can now be added using Edit New OPC Tags. 19. Browse to My Computer ICONICS.Simulator.1 SimulatePLC. Select Ramp, Random, and Sine on the right side, and then click on OK. All items have now been added to the logging group, as depicted in Figure L3.1.20.

GENESIS32 Standard Training Manual

Figure L3.1.20: Simulated OPC Tags Added to the Configuration 20. Select the Training Course configuration as depicted in Figure L3.1.21. 21. From the Control Board, click Connect to ensure the Configurator is connected to the Trend Logger. 22. From the Control Board, click Make Active to ensure this configuration is downloaded into the Trend Logger, and then start the logger by clicking the Start Datalogging button, or the stoplight button on the toolbar.

GENESIS32 Standard Training Manual

Figure L3.1.21: Activating the Configuration 23. Select File Exit if you would like to close the Configurator. NOTE: The data logger will not continue to run in the background. So, if you choose to close the Configurator you will need to start the data logger again from GenTray.

GENESIS32 Standard Training Manual

Trend Viewer ActiveX


7.1. Objectives
The Trend Viewer ActiveX and where to configure its properties Some general settings of the ActiveX Appearance settings Configuring ranges Pen configuration Configuring rates Using the Trend Viewer in runtime

By the end of this chapter, you will be familiar with the following concepts:

7.2.

Trend Viewer ActiveX

The ICONICS Trend Viewer, shown in Figure 3.2.1, is both an OPC Data Access and an OPC Historical Data Access client, allowing it to show both real-time and historical data. The Trend Viewer is even capable of showing real-time and historical data in the same trend window. Features of the TrendWorX32 Viewer include: Real-time data displays Historical data displays Data utility functions Sophisticated, multithreaded data buffering to guarantee data integrity with support for customer-configurable data-collection rates The TrendWorX32 Viewer is interfaced to display memory-based historical data from the GENESIS32 Persistent Trending memory-based data-logging OLE Automation server, as well as historical servers supporting the OPC HDA (Historical Data Access) Interface, such as the TrendWorX32 SQL Server.

GENESIS32 Standard Training Manual

Figure 3.2.1: TrendWorX32 Viewer ActiveX The TrendWorX32 Viewer ActiveX has many new features, including: Support for stacking of multiple trend plots Support for background images Customizable background printing option Improves the x/y axes auto-size feature Tick mark interval support on x/y axes Customizable time stamp spacing in trend display Plot title support on y-axis Font-sensitive auto-size support on chart title Improved grid animation control for the new plot style Improves the user-friendliness and readability of configuration panel and trend displays Fully backward compatible with the previous plot style Support for VCRWorX32 data replay

7.3.

Trend Viewer Properties

The Trend Viewer ActiveX Properties dialog box, shown in Figure 3.2.2, is the configuration user interface for the ActiveX. Double-clicking the ActiveX during configuration mode opens the Properties dialog box, which as you can see contains the following tabs: General tab Appearance tab Ranges tab Pens tab Rates tab

GENESIS32 Standard Training Manual Settings tab NOTE: Right-clicking on the Viewer ActiveX and selecting Properties also opens the Trend Viewer ActiveX Properties dialog box. Not all of these configuration options are within the scope of this class. For more information about Trend Viewer Properties not covered in this class, refer to the ActiveX Properties section of the TrendWorX32 Viewer ActiveX Help documentation.

Figure 3.2.2: Trend Viewer ActiveX Properties

7.4.

General Configurations

The General tab, shown in Figure 3.2.2, is the default tab of the Properties dialog box. The General tab handles the following functions: Viewer title File selection Web configuration Plot type The Trend Viewer can show data in six different plot types: Bar Plot, Circular Chart, Logarithmic Plot, Time Plot, Strip Chart, and XY Plot. You should always choose the Plot Type first because this choice determines which options will also be available later on. NOTE: The Quick Lab following this section outlines the steps necessary to configure some General properties. For more information about options available on the General tab also refer to the "General Tab" section in the TrendWorX32 Viewer ActiveX Help documentation.

GENESIS32 Standard Training Manual

7.5

Appearance Settings

The Trend Viewer provides a wide variety of parameters for configuring its layout and appearance, and the appearance of up to 64 OPC tags to which it may be connected. The Appearance tab of the Properties dialog box, shown in Figure 3.2.3, sets the appearance properties for the following items: Workspace Details Ranges Time Grids

Figure 3.2.3: Appearance Properties The Appearance pages of specific interest in this course are the Details and Ranges pages. The Details section of the Appearance tab manages the detail display information area (the tag and data summary list), and the enabled choices closely match the selected plotting type. Clicking the Columns button on the Details tab opens the Detail Window Columns dialog box, which specifies the column names for the details section of the Trend Viewer, and also enables you to choose which columns to display in the Details window. Clicking the Spacing button allows you to configure the default column spacing for the Details window to be recalled during runtime mode. The Number of Entries field displays the number of pens in the Details window of the Viewer. If more pens exist, the Details window will show a scroll bar for scrolling up or down, so it is often helpful to be able to increase the number of entries. The Ranges section of the Appearance tab manages the Ranges Configuration for the trend display. Depending on the selected plot type, some options may or may not be available. You can edit the number of Visible Ranges here so that separate ranges for each pen in the viewer can be shown at once if desired. NOTE: The Quick Lab following this section outlines the steps necessary to configure some Appearance properties. For more information about options available on the Appearance tab also refer to the "Appearance Tab" section in the TrendWorX32 Viewer ActiveX Help documentation.

GENESIS32 Standard Training Manual

7.6

Configuring Ranges

The Ranges tab of the Properties dialog box, shown in Figure 3.2.4, manages the global ranges configuration for the trend display. Depending on the selected plot type, some options may or may not be available.

Figure 3.2.4: Ranges Properties The Global Ranges section of the Ranges tab sets the ranges for the trend display. If Global Ranges is checked, all pens will be drawn using the same set of ranges. These can be constants, expressions, OPC tags, or global aliases. NOTE: The Quick Lab following this section outlines the steps necessary to configure some Ranges properties. For more information about options available on the Ranges tab also refer to the "Ranges Tab" section in the TrendWorX32 Viewer ActiveX Help documentation.

7.7

Pen Configuration

The Pens tab of the Properties dialog box, shown below, handles the signal connection, editing, and configuration for the data displayed in the trend. The following types of signals can be viewed in the Trend Viewer: Real-time (expressions and OPC tags) Historical Persistent (real-time with a small amount of immediate history)

Figure 3.2.5: Pens Properties

GENESIS32 Standard Training Manual The Trend Viewer can show both real-time and historical data; however, it can also be configured to show historical data only. In this case the Trend Viewer will not periodically request data from the database, but only request data when the operator has made a change in the window time frame. To enable historical data only mode, simply enable the History Only check box. Trend Pens can be configured in great detail using the Edit Trend Pen dialog. A pen's appearance can be modified using Line and Width parameters. A pen also provides a variety of additional options: Visible, Stair Plot (to plot straight horizontal and vertical lines only), Pen Comments (to show if comments have been added to this pen), Pen Marker (a vertical marker on the side of the trend window), and Show Samples (to show the actual location of the samples).

Figure 3.2.6: Edit Trend Pens Properties It is also possible to change how a historical pen requests its data from the database. The default configuration has the pen request its data using the Last Sample method, which means that for every required point of the trend grid a value is plotted. If no value is available in the database, the last (previous) sample value is used. Another common option to use is Raw Data, as this will only request those samples that are actually available in the database. The Trend Viewer will then draw lines between the actual samples. NOTE: The Quick Lab following this section outlines the steps necessary to configure some Pens properties. For more information about options available on the Pens tab also refer to the "Pens Tab" section in the TrendWorX32 Viewer ActiveX Help documentation.

7.8

Configuring Rates

In the Rates tab of the Properties dialog box, shown in Figure 3.2.7, you can select the desired DataCollection Rate and the number of Samples, among other variables. Currently the fastest datacollection rate is 10 milliseconds (ms). The update rate is calculated by inserting the variables on the Rates tab into an equation. Therefore, if you change one of these variables, all other variables will be updated automatically. Notice also that the data-collection rate is configured independently of the drawing action. The fastest display update rate is 50 ms, with the exception of bar plots, in which the display rate matches the data-collection period. The maximum number of samples that can be displayed at once is 7200.

GENESIS32 Standard Training Manual

Figure 3.2.7: Rates Properties The Display Refresh Rate controls the speed at which the signal curves will be drawn. If, for example, the Data-Collection Rate is set to 250 ms and the Display Refresh Rate is set to 4, the samples will be collected at 250 ms, but the signal curve will be updated every second without loss of data. This is a great option to minimize system-resource usage. The History Refresh Rate controls the frequency at which the historical pens will be refreshed with new historical data from the TrendWorX32 historical database. This can be used as an optimization and load-balancing tool. For example, if the TrendWorX32 SQL Server is configured to log to the database every 1 min., then the History Refresh Rate should be set to a maximum of 1 min. NOTE: The Quick Lab following this section outlines the steps necessary to configure some rates properties. For more information about options available on the Rates tab also refer to the "Rates Tab" section in the TrendWorX32 Viewer ActiveX Help documentation.

7.9

Trend Viewer Runtime Toolbar

The Trend Viewer Runtime Toolbar is the runtime user interface for the ActiveX. The toolbar offers you access to various runtime TrendWorX32 Viewer ActiveX functions and operations. To view or hide the toolbar, double-click the TrendWorX32 Viewer during runtime. You cannot view the toolbar in configuration mode.

Figure 3.2.8: Runtime Toolbar Many of the buttons on the Runtime Toolbar provide access to some properties configurable in both Configure and Runtime modes, such as Edit Pens, Edit Trend, and Edit Period.

GENESIS32 Standard Training Manual Some options, such as Cursor and Page Forward/Back, Zoom Trend, and Set Right Time are only available when the viewer is in Freeze Mode. Clicking the Statistics button opens the Trend Statistics dialog box, shown in Figure 3.2.9.

Figure 3.2.9: Runtime Statistics The Trend Statistics dialog box shows relative statistics for all pens in a trend. In the case of bar plots, the statistics window shows the statistics profile of all signals combined. Clicking the Set Right Time button opens the Set Trend Top/Right Time dialog box, shown in Figure 3.2.10. This dialog box enables you to view a specific historical trend period. In freeze mode, this causes the TrendWorX32 Viewer to retrieve and display the selected historical and persistent trend data from the TrendWorX32 Persistent Trending memory buffers.

Figure 3.2.10: Set Right Time NOTE: The Quick Lab following this section explores some of the available runtime options. For more information about the runtime options available also refer to the "Trend Viewer Toolbar" section in the TrendWorX32 Viewer ActiveX Help documentation.

GENESIS32 Standard Training Manual

Quick Lab: Trend Viewer ActiveX


2.6.1 Quick Lab Overview

2.6

Once the data have been logged into a database using the TrendWorX32 SQL Data Logger, it is also rather useful to be able to look at what actually has been logged. The TrendWorX32 Viewer ActiveX was designed for this purpose. Estimated time to complete this lab: 40 minutes. 2.6.1.1 Task Checklist 2.6.1.2

In this quick lab, you will complete the following tasks: Insert a Trend Viewer ActiveX into GraphWorX32. Configure the Trend Viewer ActiveX. Add and configure pens. Configure the Trend Viewer Details window. View OPC Historical Data Access data in the Trend Viewer.

Support Files

To complete this quick lab, you will need the following support files: TankLevelSimulation.mdb DataLogger.mdb TrendLogger.mdb

2.6.2 Creating a Historical Trend Viewer


1. Open a new GraphWorX32 display from Start Programs ICONICS GENESIS-32 GraphWorX32 GraphWorX32. 2. Immediately choose File Save and save the display as HistTrendViewer.gdf, choosing the file type as GraphWorX32 Displays without VBA (*.gdf).

GENESIS32 Standard Training Manual

3. Inside the display insert a new Trend Viewer ActiveX by clicking the button on the ActiveX toolbar. 4. Resize the Trend Viewer ActiveX so it leaves approximately 100 pixels at the top and the bottom of the screen, as depicted in Figure L3.2.1.

Figure L3.2.1: Trend Viewer Inside the Display 2.6.2.1 Configuring the Trend Viewer

In this Training Course Application the Trend Viewer will be configured to show data in a linear time-based plot. 1. Double-click on the Trend Viewer ActiveX to open its property pages. 2. Select the General tab, and select the Time Plot as the Plot Type, as depicted in Figure L3.2.2.

GENESIS32 Standard Training Manual

Figure L3.2.2: Configuring the General Properties 3. Select the Rates tab to configure the data collection rate and trend period of the trend window. 4. Set the Data Collection Rate to 1 second, as this was also the data collection rate used in the Data Logger. Although the data collection rates don't have to be the same in the Logger and Viewer, it is advised to make the Trend Viewer's data collection rate an integer multiple of the Data Logger's data collection rate. 5. Set the History Refresh Rate to 5 seconds. The history refresh rate is the rate at which the viewer checks the database to determine if new data have been logged. 6. Enter a Trend Period of 30 minutes, as depicted in Figure L3.2.3.

GENESIS32 Standard Training Manual

Figure L3.2.3: Configuring the Data Collection Rate 2.6.2.2 Configuring Trend Viewer Pens

In this Training Course Application the Trend Viewer will be connected to historical pens that we have configured in the previous section so the logged data can be visualized. 1. Select the Pens page to add the logged signals to the plot. 2. Click on Tags Menu History Tags to open the Unified Data Browser. 3. Browse to My Computer ICONICS.TWXSQLSvr.1 Training Course Simulated, as depicted in Figure L3.2.4.

Figure L3.2.4: Selecting the Logged Signals 4. Select all tags, and click on OK to return to the properties window, which now has three tags added to the list, as depicted in Figure L3.2.5.

Figure L3.2.5: Adding the Pens

GENESIS32 Standard Training Manual

5. Select the first pen, called SimulatePLC.Int Ramp, and click on Edit to open the Edit Trend Pen dialog. 6. Enable Stair Plot to draw straight lines only. 7. Enable Pen Marker to enable the marker, and change the Width to 2. 8. Change the Filter to Raw Data to request only actual samples from the TrendWorX32 Logger, as depicted in Figure L3.2.6.

Figure L3.2.6: Configuring the Pen Details 9. Click on OK to return to the Pens property page. 10. Repeat the above steps for all three pens. 2.6.2.3 Configuring the Trend Viewer Details Window

At the bottom of the Trend Viewer the details window can be found. In this Training Course Application the details window will be configured to show information on the historical samples. 1. Select the Appearance tab. 2. Select the Details page, as depicted in Figure L3.2.7.

GENESIS32 Standard Training Manual

Figure L3.2.7: Configuring the Details Appearance 3. Click on the Columns button to open the Detail Window Columns dialog, as depicted in Figure L3.2.8.

Figure L3.2.8: Configuring the Details Window Columns 4. Enable the Description check box and the Value check box. 5. Enable the Quality check box. The Quality property can be useful when looking at historical data, as it also shows when logging has started and stopped. 6. Enable the Time check box and the Date check box as well. 7. Click on OK to return to the Appearance tab.

GENESIS32 Standard Training Manual

8. Click on the Spacing button to configure the relative spacing of the selected columns. Adjust the column sizes so that all columns fit in the window properly as depicted in Figure L3.2.9.

Figure L3.2.9: Configuring the Column Spacing 9. Click on OK to accept the column spacing and to return to the Appearance tab. 10. Select the Ranges page, and enable Global Ranges. Set the range to be from 0-100. 11. Click on OK to close the property pages and return to GraphWorX32, and go to File Save to save the display. 2.6.2.4 Trend Viewer in Runtime 1. Click on the Runtime menu to start runtime mode and look at the historical data, as depicted in Figure L3.2.10.

Figure L3.2.10: Trend Viewer Display in Runtime

GENESIS32 Standard Training Manual

2. Right-click on one of the pens in the details window and choose Options Visible. This makes the pen visible, as depicted in Figure L3.2.11.

Figure L3.2.11: Control Pen Visibility 3. Double-click on the Trend Viewer to open the Trend Viewer toolbar. 4. Click on the fourth button (the hand icon) to freeze/stop the Trend Viewer. 5. Once the Trend Viewer is stopped, press and hold down the Shift key and drag the mouse pointer across the window to zoom into a particular area, as depicted in Figure L3.2.12. 6. Double-click on the Trend Viewer to open the Trend Viewer toolbar. 7. Click on the fourth button (the hand icon) to freeze/stop the Trend Viewer. 8. Once the Trend Viewer is stopped, it is possible to drag the mouse pointer over the trend to show the historical values in the details window at the bottom of the trend. 9. To be able to identify special events at a later date, the Trend Viewer allows the insertion of notes at a pen sample.

GENESIS32 Standard Training Manual

Figure L3.2.12: Zoom into the Trend Window 10. Move the cursor to the relevant sample in the trend. 11. Select a pen, e.g. Simulated.Ramp, in the details window. 12. Right-click on the pen and choose Options Insert Comment to open the Comment(s) Entry dialog box, as depicted in Figure L3.2.13. 13. Enter an appropriate comment, and click on OK to insert the comment into the database.

Figure L3.2.13: Adding Comments to a Historical Trend

GENESIS32 Standard Training Manual

Introduction to GraphWorX32
8.1 Objectives

8.0

By the end of this section, you will be familiar with the following concepts: Using the different tools inside GraphWorX32 Draw static objects Assign OPC-based animation, such as size actions, to static objects previously drawn Creating a simple GraphWorX32 display

8.2

Introduction

GraphWorX32 is an OPC-based HMI graphics software tool. Using its complete set of drawing and animation tools, it is possible to create powerful live operator and visualization displays. Since GraphWorX32 is an OPC client application, it can be connected to any OPC server available on the market. GraphWorX32 is tightly integrated with VBA. Using the rich command set of VBA, it is possible to extend the capabilities of GraphWorX32 using any application that is OLE automation compliant. Since GraphWorX32 is also an ActiveX container application, it can easily extend its functionality by inserting ActiveX controls. Using these ActiveX controls, which can be easily developed or obtained from any supplier, it becomes possible to integrate operational procedures, quality reporting or anything else.

8.3

Toolbars

The GraphWorX32 tools you use to create your displays are grouped by functionality and are available through the menu bar options and several toolbars. Selecting Toolbars from the View menu opens the Show Toolbars dialog box, shown in Figure 4.1.1, which allows you to select which toolbars you want to be visible. The Toggle Toolbars command on the View menu hides or shows all of the toolbars at once.

GENESIS32 Standard Training Manual

Figure 4.1.1: Show Toolbars Dialog 8.3.1 Main Toolbar

The Main toolbar, shown in Figure 4.1.2, is displayed by default across the top of the application window, below the menu bar. The toolbar provides quick mouse access to many tools used in your application. Use the Main toolbar for basic file and display maintenance such as creating a new display, opening a file, printing a file, and cutting, pasting and duplicating objects. It also allows you to undo and redo your last editing action, and to access help on your GraphWorX32 application.

Figure 4.1.2: Main Toolbar 8.3.2 View Toolbar

Using the View toolbar, shown in Figure 4.1.3, you can change the view of the display by activating different zoom functions. Additionally, the toolbar provides specific shortcuts for layering. All of the following functions can also be found by selecting Layers from the Format menu.

Figure 4.1.3: View Toolbar

GENESIS32 Standard Training Manual

8.3.3

Dynamics Toolbar

You can use the Dynamics toolbar, shown in Figure 4.1.4, to make dynamic connections (e.g., action dynamics, selector dynamics, and intrinsic dynamics) to data points in OPC servers.

Figure 4.1.4: Dynamics Toolbar 8.3.4 ActiveX Toolbar

The ActiveX toolbar, shown in Figure 4.1.5, enables you to insert various ActiveX objects into the GraphWorX32 display. Click the OLE button to browse for a list of objects.

Figure 4.1.5: ActiveX Toolbar 8.3.5 Draw Toolbar

You can use the Draw toolbar, shown in Figure 4.1.6, to draw static graphic objects; to select objects; to fill or unfill objects, including drawing objects and text objects; and to import bitmaps, metafiles, and GraphWorX32 symbols.

Figure 4.1.6: Draw Toolbar 8.3.6 Arrange Toolbar

The Arrange toolbar, shown in Figure 4.1.7, is used for grouping and ungrouping objects, aligning objects, rotating objects, and shifting objects in layers.

GENESIS32 Standard Training Manual

NOTE: It is possible to rotate text in a GraphWorX32 display. Text can only be rotated in 90-degree increments by using the Rotate Left and Rotate Right buttons. This ability to rotate text applies to: Multiline text Left, center and right alignments Text objects Process points Data entries State fields Time/date Buttons Check boxes and radio buttons cannot be rotated.

Figure 4.1.7: Arrange Toolbar 8.3.7 Text Style Toolbar

The Text Style toolbar, shown in Figure 4.1.8, is used to change the font attributes of text objects in a display.

Figure 4.1.8: Text Style Toolbar 8.3.8 Layers Toolbar

Using the Layers toolbar, shown in Figure 4.1.9, you can add, remove, or duplicate a layer. You can also edit the layer properties, set the active layer, set the next layer, set the previous layer, hide layers above the current layer and hide layers below the current layer.

Figure 4.1.9: Layers Toolbar NOTE: The toolbars and menus are described in detail in the GraphWorX32 Help documentation.

GENESIS32 Standard Training Manual

8.4

Introduction to Dynamic Connections

GraphWorX32 enables you to make dynamic connections from display objects to points coming from various OPC data servers. The objects are animated and controlled by the values of those data points. You can make multiple dynamic connections to a single object. For example, you can create an object that changes in color and size based on values from two different point connections. You can create dynamic connections with functions contained in the Dynamics menu and the Dynamics toolbar. Types of dynamic connections include flash, color, process point (PPT), data entry, size, location, analog and digital selector, animator, hide, and rotation. One type of Dynamic is the Pick Action function. This function allows you to configure an object such that it performs an action when the object is clicked during runtime mode. Such actions include loading displays, popping up windows, launching applications, and downloading values. We will explore these actions more, later in this chapter. 8.4.1 Size Dynamics

Using the Size button on the Dynamics toolbar, you can define an object that changes size based on the real-time value of its connected data point. The object automatically sizes to scale for incoming data points, such that a 100 percent scale equals the full size of the drawn object. You can override the size by defining range override values. During runtime mode, the Size connection resizes the object in proportion to the percentage of the high and low ranges of the connected data point. The object can be resized in many different ways, indicated by the options shown in the Property Inspector depicted in Figure 4.1.10.

GENESIS32 Standard Training Manual

Figure 4.1.10: Size Dynamic Property Inspector

GENESIS32 Standard Training Manual

Quick Lab: Creating a Simple Display

4.1

4.1.1 Quick Lab Overview This lab is intended to get you comfortable with working in the GraphWorX32 environment, by creating a very simple display with a dynamic object that changes size based on the value of an OPC DA tag. Estimated time to complete this lab: 15 minutes. 4.1.1.1 Task Checklist 4.1.1.2

In this quick lab, you will complete the following tasks: Create and configure static objects. Configure a size dynamic.

Support Files

To complete this quick lab, you will not need any support files. 4.1.2 Creating a Simple Display This section will explain how to use GraphWorX32 to create static objects and how to attach animations based on OPC data to those static objects. 4. Open a new GraphWorX32 display from Start Programs ICONICS GENESIS-32 GraphWorX32 GraphWorX32. 5. Immediately choose File Save and save the display as Simple.gdf, choosing the file type as GraphWorX32 Displays without VBA (*.gdf). 6. Create a rectangle on the screen using the Rectangle/Square tool from the Draw toolbar. To select the tool from the toolbar, left-click on the button once. The mouse cursor will change to reflect the selected (drawing) tool. 7. In the drawing space, create the rectangle by moving the mouse while keeping the left mouse key pressed.

GENESIS32 Standard Training Manual

NOTE: When drawing or resizing shapes and lines, pressing the SHIFT key while you draw will preserve the current aspect ratio of the object. This means when drawing a rectangle, pressing SHIFT will help you create a perfect square. If you have already drawn a rectangle of a particular aspect ratio that you prefer, pressing SHIFT will keep that ratio as it is resized. 8. Once drawn, the rectangle should still be selected, which is indicated by eight handles around it. If it is not selected anymore, click on the pointer tool on the Draw toolbar and select the rectangle by clicking on it once. 9. To assign a size-dynamic to the rectangle, select the size action tool from the Dynamics toolbar. The property page of the rectangle will be opened, with the Size tab active. 10. Select the vertical size action, using the toolbar. button on the Dynamics

11. Besides a direction in which the object's size changes, a data source or signal has to be chosen as well. Click on Data Tags to open the Unified Data Browser. 12. Browse to ICONICS.Simulator.1\SimulatePLC.INPUTS.Int Ramp via the My Computer branch, as depicted in Figure L4.1.1. Click on OK after selecting the signal.

Figure L4.1.1: Selecting an OPC Tag

GENESIS32 Standard Training Manual

NOTE: Browsing for tags through the My Computer branch will result in a tag path that will only work locally because it does not contain any network name or address in it. If a client will be connecting to a tag remotely, then that tag must be browsed for via the Network Neighborhood branch, which would append the node name where the tag exists to the front of the tag path. 13. The OPC tag is now entered into the Data Source field at the top of the dialog, as depicted in Figure L4.1.2. 14. When the object is an irregular object, it may be useful to use the Clip option instead of the default Scale option. Using the Clip option will ensure the object keeps its shape at all times.

Figure L4.1.2: Size Action Property Dialog 15. Click on OK to close the Property Inspector. 16. Click on File Save to save the display.

GENESIS32 Standard Training Manual

17. Click on the Runtime menu to start runtime mode and see the object change size, as depicted in Figure L4.1.3.

Figure L4.1.3: Size Action in Runtime 18. Make sure the file is saved, and then click on File Exit to close GraphWorX32.

GENESIS32 Standard Training Manual

GraphWorX32: Configuration and Connection Types


9.1 Objectives

9.0

By the end of this section, you will be familiar with the following concepts: Configuration of GraphWorX32 properties Assign OPC-based animation, such as color actions, to static objects previously drawn Toggle value pick actions Creating operator displays

9.2

Dynamic Connections Continued

Only the size dynamic was covered in the previous section. There are several more dynamics available within GraphWorX32, which will continue to be covered throughout this chapter. 9.2.1 Color Dynamics The Digital Color dynamic on the Dynamics toolbar allows the color of the object to change based on a digital event. The color connections are prioritized in the order in which they are created. Therefore, if two data points are true at the same time, the higher-priority color connection takes precedence. If none of the connected data points is true, the object is displayed in its original color. The Color connection is used to indicate states such as alarm conditions and temperature changes, or to notify operators of the flow in a pipe.

GENESIS32 Standard Training Manual

Figure 4.2.1: Color Dynamic Property Inspector The Color Dynamic Property Inspector allows for several data sources to be configured, each with a different color to change to. For this reason, each time you set a data source you must Add it to the data source list. 9.2.2 Toggle Value Pick Actions The Toggle Value pick action in the Pick tab of the Property Inspector is used to toggle between two specified values during runtime mode. The data source is the tag to which the downloaded values are to be written.

Figure 4.2.2: Toggle Value Pick Action Toggle Value 1 specifies the first toggle value when the button is clicked, and Toggle Value 2 specifies the second toggle value when the button is clicked.

GENESIS32 Standard Training Manual

9.3

System Configuration

This section explains the different ways of configuring and customizing your system. You can customize your GraphWorX32 system using: Command line options Application Preferences dialog box Display Properties dialog box

9.3.1 Application Preferences The Application Preferences dialog box, shown in Figure 4.2.3, sets default operating parameters for your display-editing environment. These parameters apply to each new display created in GraphWorX32. Select Application Preferences from the Format menu. The Application Preferences dialog box opens, as shown in Figure 4.2.3. Here you can set the defaults for the display. Since GraphWorX32 Preferences apply only to new displays, changes made in this dialog box will not be seen until you select New from the File menu.

Figure 4.2.3: Application Preferences Dialog Box 9.3.2 Display Properties You can also define the properties for the current display by selecting Display Properties from the Format menu. This opens the Display Properties dialog box, shown in Figure 4.2.4. Any changes you make in this dialog box will be immediately reflected in the display.

GENESIS32 Standard Training Manual

Figure 4.2.4: Display Properties Dialog Box As you can see, the Display Properties dialog box is very similar to the Application Preferences dialog box. These dialog boxes contain the following tabs: General Window Runtime Runtime Advanced Grid Script Editor Load Tabs

GENESIS32 Standard Training Manual

ToolTips Compatibility VBA In addition to the Font scaling option, the General tab of the Display Properties also offers options for the scalability of the display itself. The default is a Fixed Scale display, which will not change its size depending on the screen resolution. When desired a display can be made scalable by selecting the Scaleable Display option. The display will then resize depending on the screen resolution. When using scalable displays it is usually wise to also enable Preserve Aspect Ratio to avoid distortion of the screen. The General page also provides the settings for the size of the display. In the right hand corner the Width and Height of the display can be entered. Other options that can be modified from the Windows page include the visibility of the title bar and menu during runtime mode. And whether or not the display can resized using its frame. Besides the configuration of the Focus Highlights and the Disabled Object colors, one very important property is also made available on the Runtime tab. This property is the Maximum Update Rate. The default value for this is 50 milliseconds. However, for nearly all applications a value of 500 or 1000 would be more appropriate. The Maximum Update Rate is used by GraphWorX32 when communicating with the OPC Server. When GraphWorX32 creates its connection to the OPC server, it specifies the Maximum Update Rate to the OPC server, effectively requesting that the OPC server sends its updates at this rate. Although it may appear that 50 ms updates are useful, it has to be considered that many OPC servers cannot provide this many updates, either because they have to request too many signals or because they are communicating with a slow (serial) connection. Any of the settings that are set inside the Display Properties dialog can also be set as application preferences. When setting them as application preferences, each new display that will be created will automatically inherit the settings as specified inside these application preferences. Of course, it is still possible to override the application preferences inside the Display Properties. The application preferences are set from the menu Format Application Preferences. To re-apply the application preferences to the currently loaded display, select Format Apply Preferences to Properties. To set the current display properties as the new application preferences, select Format Save Properties as Preferences.

GENESIS32 Standard Training Manual

9.3.3 Symbols GraphWorX32 comes with a symbol library. Using the symbol library, it is easy to quickly place most of the static objects on a display. The symbol library not only can contain static objects, but it can also contain objects that already contain dynamic actions. The symbol library already contains several objects that can be used inside your projects, and a simple drag-and-drop action allows you to easily insert your own graphical objects inside the symbol library.

9.4

Introduction to Data Connections

GraphWorX32 uses several different types of data connections to connect objects to the field Input/Output. The following topics will be discussed here: Making data connections with the Unified Data Browser Expressions Constants and local variables Creating generic reusable displays and symbols with aliasing Dynamic animation is achieved by transforming visible objects based on specified data connections. Each dynamic object allows one or more data connections for its primary value(s). Some dynamics also allow range overrides; these range overrides are also data connections. A data connection is most likely to be a tag representing a value in the system. However, a data connection can also be a database connection, a constant value, a local GraphWorX32 variable, or a mathematical expression (which can include tags, constants, and local variables). Data connections can be typed directly into the data source edit control in the configuration dialogs of the various dynamics. Text strings can also be dragged and dropped into this edit control from any drag source, which makes the drag-and-drop data available in the Windows text clipboard format. There are also two buttons, as shown in Figure 4.2.5: The Data Tags button, which opens the Unified Data Browser The Expression button, which opens the Expression Editor, enabling you to create and modify expressions NOTE: For more information about the Unified Data Browser, please see the Unified Data Browser Help documentation. For more information about the Expression Editor, please see the Expression Editor Help documentation.

GENESIS32 Standard Training Manual

Figure 4.2.5: Data Tags and Expression Buttons in Property Inspector 9.4.1 Expressions Clicking the Expression button in the Property Inspector opens the Edit Expression dialog box, as shown in Figure 4.2.6.

Figure 4.2.6: Expression Button in Property Inspector The Expression Editor, shown in Figure 4.2.7, is available to assist you in creating expressions for your GENESIS32 applications. The window is resizable and can be stretched as well as maximized or minimized. The drop-down list at the top of the Edit Expression dialog box keeps track of the last 50 expressions you have entered. The expression entered most recently is the first one in the drop-down list. NOTE: For more information about the Expression Editor, please see the Expression Editors help documentation.

GENESIS32 Standard Training Manual

Figure 4.2.7: Edit Expression Dialog Box 9.4.2 Local Variables Local variables inside GraphWorX32 are variables that are being updated continuously but are not connected to any real OPC server. They are only present within the GraphWorX32 display where they are defined. On changing displays they will loose their values and revert back to their configured initial values (0 by default). Once a local variable has been typed in, it can be selected from the local variable list that is available via Tags Menu Local Variables in the property pages of the dynamic actions. For local variables within an expression, use the following syntax: ~~local_variable_name~~ Example: x=~~Setpoint~~

GENESIS32 Standard Training Manual

Quick Lab: Tank Monitor Operator Screen


4.2.1 Quick Lab Overview

4.2

In this lab, you will create an operator screen used to monitor two pipelines, and control the level of a tank. All animation in this display will be simulated within the display using variables and expressions. This will allow you to begin using GraphWorX32 tools in creating a display that might be used in a real HMI project, before fully interfacing with OPC data. Estimated time to complete this lab: 1 hour 15 minutes. 4.2.1.1 Task Checklist 4.2.1.2

In this quick lab, you will complete the following tasks: Set display properties. Insert and use symbols. Configure size and color dynamics. Use expressions to simulate data.

Support Files

To complete this quick lab, you will not need any support files.

4.2.2 Creating the Tank Monitor Operator Display


This section will describe how to create the first operator screen. This operator screen will give an overview of two pipelines. One of the pipeline's dynamics will be added to the pumps to control the level in the tank. 1. Open a new GraphWorX32 display from Start Programs ICONICS GENESIS32 GraphWorX32 GraphWorX32. 2. Immediately choose File Save and save the display as Operator1.gdf, choosing the file type as GraphWorX32 Displays without VBA (*.gdf). 4.2.2.1 Setting the Display Properties 3. With the display created, some of the drawing properties need to be changed for this display via Format Display Properties.

GENESIS32 Standard Training Manual

4. On the General tab we will disable the Scale Font When Stretching Text check box, as depicted in Figure L4.2.1. Although this is to some extent a personal preference, it is usually more convenient to manually control the font size used for text entities than to have it controlled by the size of the bounding box. 5. In the Display Scaling section of the General tab, choose Scalable Display and Preserve Aspect Ratio. A setting such as this is ideal for having a flexible display during configuration, or when other applications will be used on the workstation.

Figure L4.2.1: Display Properties: General 6. Select the Window tab, and enable Scale window dimensions based on current screen resolution. This way, when the display is moved to other machines with different resolution, the dimensions should look the same.

GENESIS32 Standard Training Manual

Figure L4.2.2: Display Properties: Window 7. Select the Runtime tab. Click on the fill color for the Focus Rectangle, and then change the fill color to blue.

Figure L4.2.3: Display Properties: Runtime

GENESIS32 Standard Training Manual

8. Click on the border color for the Focus Rectangle, and then change the fill color to yellow, as depicted in Figure L4.2.3. 9. Select the Grid tab, as depicted in Figure L4.2.4.

Figure L4.2.4: Display Properties: Grid 10. Change the Grid Width to 25, and the Grid Height to 25. 11. Enable Show Grid and Snap to Grid. 12. Click on OK to apply the changes and close the Display Properties dialog. 13. Since we actually want to use these settings for all displays we will create, select Format Save Properties as Preferences. 14. In the Choose Settings dialog, depicted in Figure L4.2.5, ensure that all check boxes are enabled. 15. Click on OK to apply the properties as preferences. From now on, all new displays will be created with these properties set.

GENESIS32 Standard Training Manual

Figure L4.2.5: Display Properties: Grid 4.2.2.2 Inserting Symbols 1. One of the more noticeable items when you first open the GraphWorX32 application is the Symbol Library, which by default is docked to the left of the GraphWorX32 window. This default setting does reduce the amount of visible space for creating your displays. If you would like to reclaim this space, you can select Format Application Preferences and move to the Compatibility tab. Under the Symbol Library Style section, you may select the Standalone option, as shown in Figure L4.2.6.

Figure L4.2.6: Application Preferences: Compatibility

GENESIS32 Standard Training Manual

2. This will allow the Symbol Library to open as a standalone application, as depicted in Figure L4.2.7 so that it does not use that development space. This is optional, and absolutely should be based on the preference of the person developing the displays.

Figure L4.2.7: Symbol Library 3. With the symbols provided by the TrainingCourseV8-9 category, build the display depicted in Figure L4.2.8. To use a symbol in the display, simply drag it from the Symbol Library into the display.

Figure L4.2.8: First Operator Display To Be Created

GENESIS32 Standard Training Manual

4. The black-bordered blue rectangle in the middle of the tank is not available as a symbol. Use the square/rectangle tool on the Draw toolbar to create the rectangle in the middle of the tank. 5. The color of the rectangle has to be changed to have a black border and a blue filling. To modify the colors, select the rectangle by clicking on it once and go to the Color Palette, as shown in Figure L4.2.9.

Figure L4.2.9: Color Palette 6. To change the fill color, left-click on the desired color. To change the line color, right-click the desired color, and the colors of the rectangle will change accordingly. 7. Save the created display by selecting File Save, or use the Save button on the Main toolbar. 8. To visualize the current display in runtime mode, select the Runtime menu. Since we have not yet configured any dynamic actions to the various objects, nothing much will happen, but the inserted smart symbols will show some movement. 9. To return to configuration mode, select the Configure menu. 4.2.2.3 Adding the Size Dynamic

In this display a dynamic will be added which is based on a local variable. 1. Select the blue rectangle by left-clicking on it. 2. Eight handles appear around the rectangle. 3. From the Dynamics toolbar select the size action with the size dynamic property page will appear. button. The

4. In the Data Source field, type in ~~level~~, as depicted in Figure L4.2.10. This automatically creates a new local variable in the display. 5. Click on OK to close the Property Inspector.

GENESIS32 Standard Training Manual

Figure L4.2.10: Size Action Property Dialog 6. The default data type of a newly defined local variable is double. For this demo application we are going to change the data type, the high and low ranges, and the initial value. Open the local variables dialog by selecting Dynamics Edit Local Variables. 7. In the Edit Local Variables dialog, as depicted in Figure L4.2.11, select the local variable ~~level~~ from the list. 8. Change the data type to SHORT. Change the Initial Value and Low Range to 0, and the High Range to 100. 9. Click on OK to close the Edit Local Variables dialog.

Figure L4.2.11: Editing Local Variables

GENESIS32 Standard Training Manual

4.2.2.4

Adding Color Actions to the Pumps

Now we are going to change the two pump symbols just before and after the tank. Then we will add the possibility of switching them on and off by clicking on them, and they will change color to indicate which state they are in. 1. Select the pointer tool from the Draw toolbar, if it is not already selected, and click on the pump on the right-hand side of the tank. The pump symbol will become active. 2. The pump symbol is composed of subparts. To gain access to these subparts, it is possible to ungroup the symbol. However, if you did that you would have to regroup them at a later stage, which may also involve re-adding the dynamic actions of the group. Instead we will edit the symbol while leaving the symbol as a whole intact. Right-click on the symbol and choose Edit Symbol from the context-sensitive menu. Alternatively you can also press the SHIFT key and right-click. 3. A light gray border will appear around the symbol; inside this border leftclick on the black pump object. 4. On the Dynamics toolbar, click the button to add a pick action to the object. The pick action is used to give an object the ability to be clicked on and to execute a configurable action. 5. The Property Inspector dialog will appear with the Pick tab active. From the action list choose Toggle Value. This will change the layout of the page, allowing you to enter a data source and two values, as depicted in Figure L4.2.12.

Figure L4.2.12: Pick Field Property Dialog 6. In the Data Source field, enter ~~out_pump~~.

GENESIS32 Standard Training Manual

7. For Toggle Value 1, enter a value of 0, and a value of 1 for Toggle Value 2. 8. Click on OK to close the dialog. on the 9. With the pump still selected, click on the Color button Dynamics toolbar. The Property Inspector will appear with the Color tab active. 10. Select Data Tags to bring up the Unified Data Browser dialog. 11. Click on the GraphWorX32 tab and then click on Local Variables. 12. Select ~~out_pump~~, as shown in Figure L4.2.13, and then click on OK to return to the property page.

Figure L4.2.13: Selecting the Local Variable 13. Click on the Add button to add this color action to the list. The property dialog will now look like Figure L4.2.14. 14. Click on the colored square representing the Fill Color. The Color Palette will appear. 15. Select the bright green color, and click on OK to leave the color palette. 16. Also change the line color to bright green using the same procedure as used for the fill color.

GENESIS32 Standard Training Manual

Figure L4.2.14: Color Action Property Dialog 17. Click on OK to close the property dialog. 18. With the pump still selected, click in the color palette on the bright red color. The color of the object should now change to red. 19. Double-click outside the area surrounded by the gray border that indicates the outer bounds of the symbol being edited. This will exit the edit symbol mode and return to normal mode. 20. Now repeat steps 1-19, but this time apply these steps to the pump on the left-hand side of the tank. And instead of using the local variable named ~~out_pump~~, use a new local variable named ~~in_pump~~ instead. All other actions remain the same. 4.2.2.5 Creating an Expression To Simulate Data

To simulate the level in the tank based on the status of both pumps, we will add a little expression that will continuously calculate what is going into and out of the tank. 1. To run the calculation, a check box has to be added to the screen. Select the check box on the Dynamics toolbar and place it anywhere in the display. 2. The check box will be placed on the screen, and the Property inspector will appear on the screen. 3. Check While Down as Execution Trigger on the right-hand side with an interval of 100. Uncheck On Down and On Up.

GENESIS32 Standard Training Manual

4. Enable Force Initial Down State, to start execution right from the beginning. 5. Disable Value Tracking, as this is really only valid for digital values allowing the current state to be tracked. 6. In the Data Source field, select Tags Menu GraphWorX32 Local Variables and select ~~level~~. 7. As Value (While Down) select the browse button to open the Expression Editor. 8. Inside the Expression Editor, we will enter an expression, as shown in Figure L4.2.15, that will calculate the level in the tank utilizing the state of the input and output pumps. Enter the following expression using the buttons available whenever possible: x= max(0, min(100, ~~level~~ + ~~in_pump~~ - ~~out_pump~~))

Figure L4.2.15: Expression Editor 9. Click OK return to the property inspector, which should now look like Figure L4.2.16. The point of this check box is to constantly allow a calculation to run in the background every 100 ms that will manipulate the variables in the display. This calculation powers the animation of the valve, tank, and pump in this display with simulated functionality.

GENESIS32 Standard Training Manual

Figure L4.2.16: Check Box Property Inspector 10. Because this check box is simply a trick to constantly evaluate an expression, we do not need to see it in runtime. With the check box selected, click on the button on the Dynamics toolbar to add a Hide dynamic to the check box.

Figure L4.2.17: Hide Dynamic Property Inspector

GENESIS32 Standard Training Manual

11. Set the Data Source to 1, and choose Hide/Disable when True. This means that the check box will always be hidden. 12. Save the display by selecting File Save, or by clicking on the Save button on the Main toolbar. 13. When the file is saved, choose the Runtime menu to show the display in runtime mode, as shown in Figure L4.2.18. 14. Click on the pump on the left-hand side of the tank. This will change the color of the pump to green, and the level in the tank should start rising. Clicking again will stop the level from rising. 15. Click on the pump on the right-hand side of the tank. This will change the color of the pump to green, and the level in the tank should start dropping. Clicking again will stop the level from dropping. 16. When both pumps are clicked on (i.e., their color is green), the level in the tank will remain the same since the outflow is the same as the inflow.

Figure L4.2.18: First Operator Display in Runtime 17. Make sure the file is saved, and click on File Exit to close GraphWorX32.

GENESIS32 Standard Training Manual

GraphWorX32: More Common 10 Connections


10.1. Objectives
By the end of this section, you will be familiar with the following concepts: Configuring pop-up menu pick actions Configuring pop-up window pick actions Using state fields Using local aliasing

10.2 Dynamic Connections Continued


A few more types of dynamic connections available will be explained and used in this section. 10.2.1 Pop-up Window Pick Actions The Pop-up Window pick action in the Pick tab of the Property Inspector, shown in Figure 4.3.1, opens a pop-up GraphWorX32 window in runtime mode. This window will be considered a child to the originating display; it will open while leaving the parent open and running rather than replacing the display. The File Name field is where you define the display to be launched as the child. You can browse for the file, or type the file name in directly. Relative paths are supported here, and encouraged. The Override Display's Window Properties option allows the parent display to override the window properties of the display to be loaded with the settings defined with the Attributes button. The Modal Pop-up option opens the pop-up window as a modal window (i.e., disables the parent window), and finally the Center to Parent option automatically centers the pop-up window to the parent window when opened. NOTE: The Quick Lab following this section outlines the steps necessary to create a pop-up window pick action. For more information about pop-up window pick actions refer to the "Parameters for Pick Actions" section in the GraphWorX32 Help documentation.

GENESIS32 Standard Training Manual

Figure 4.3.1: Pop-up Window Pick Action Property Inspector 10.2.2 Pop-up Menu Pick Actions The Pop-up Menu pick action in the Pick tab of the Property Inspector, shown in Figure 4.3.2, configures the font and size for pop-up menus opened from a pick action. You can also configure the pop-up menu at mouse position.

Figure 4.3.2: Pop-up Menu Pick Action Property Inspector If you click Menu Editor, the Menu Editor dialog box, shown in Figure 4.3.3, will open, which includes fields for Font and Size.

GENESIS32 Standard Training Manual

Figure 4.3.3: Pop-up Menu Editor You can create menu items and sub menu items here, and edit each of them individually. Each menu item will have a pick action of your choice associated with it. 10.2.3 State Fields Clicking the States button in the PPT/DE tab of the Property Inspector opens the State Field Configuration dialog box, shown in Figure 4.3.4, which allows you to enter the meaning of a binary value. State fields refer to the state of a variable. They are usually a binary value, which is attached to a string, which in turn has some meaning.

Figure 4.3.4: State Field Configuration Dialog Box NOTE: The state field in GraphWorX32 is only able to display a single line of text. The configuration of state fields is very similar to that of aliases. You can enter a state value or simply select a state that already exists, enter or change the state string, and then click the proper action button (Add, Remove, Clear or Clear All). The Import and Export buttons open the Open and Save As dialogs, respectively. The Default String refers to the string that will appear when the state does not have a preconfigured string attached to it.

GENESIS32 Standard Training Manual

10.3 Data Connections Continued


In addition to Expressions and Local Variables covered previously, there are other data connection types available. 10.3.1 Local Aliases Aliasing is the ability to define a string (usually a short name) to represent another string (usually part or all of a tag name). You can access the Edit Aliases command on the Dynamics menu. You can also access it by right-clicking on an object in the display and selecting Edit Aliases from the pop-up menu. For local aliases within an expression, use the following syntax: <<local_alias_name>> Example: x=<<TankLevel>> When including an alias name in a data connection, the alias name should be surrounded by the special delimiters "<<" and ">>". These delimiters are used to identify the beginning and end of the alias name. For example: [opcserver].<<tank>>.out. In this case "tank" is the alias name.

Figure 4.3.5: Local Alias Configuration in Data Source

GENESIS32 Standard Training Manual

Quick Lab: Dynamics and Pick Actions


4.3.1 Quick Lab Overview

4.3

In this lab, you will create the second operator screen. The second operator will show a tank configuration, with a valve, a tank, and a pump. These objects will be dynamic based on the values of OPC signals in DataWorX32. This screen also shows the use of basic aliasing to populate the data in a GraphWorX32 pop-up window with appropriate data. Estimated time to complete this lab: 1 hour. 4.3.1.1 Task Checklist 4.3.1.2

In this quick lab, you will complete the following tasks: Configure size dynamics. Edit dynamics already in existing symbols. Add dynamics and to existing symbols. Configure pop-up menu and toggle value pick actions. Create and configure a pop-up window.

Support Files

To complete this quick lab, you will need the following support files: TankLevelSimulation.mdb

4.3.2 Creating the Tank System Overview Operator Screen


1. Open a new GraphWorX32 display from Start Programs ICONICS GENESIS-32 GraphWorX32 GraphWorX32. 2. Immediately choose File Save and save the display as Operator2.gdf, choosing the file type as GraphWorX32 Displays without VBA (*.gdf). Put the file in your C:\Program Files\ICONICS\GENESIS32\Examples\Training directory.

GENESIS32 Standard Training Manual

3. Start the Symbol Library by clicking on the Symbol Library button in the Draw toolbar or by selecting Draw Import Symbol. This will open the Symbol Library. 4. In the Symbol Library select the 2_Training category and use the TrainingClassV9 library. All required symbols are available in this category. 5. Using the symbols listed below, the display depicted in Figure L4.3.1 will have to be created. Ball Valve 90o Angle Pipe A Tank Jagged Cut-Away 90o Angle Pipe C Animated Pump

Figure L4.3.1: Second Operator Display To Be Created 4.3.2.1 Adding the Size Dynamic

GENESIS32 Standard Training Manual

Now that all static objects are created and positioned, the dynamics can be attached to the various objects. The cut-away object in the tank will be connected to a size action to show the level in the tank. 1. Select the cut-away object by left-clicking on it once. This object is composed of subparts, which we will want to edit individually. To gain access to these subparts, it is possible to ungroup the symbol. However, if you do that you would have to re-group them at a later stage, and any dynamics attached to the entire symbol would be lost. Instead we will edit the symbol while leaving the symbol as a whole intact. Right-click on the symbol and choose Edit Symbol from the context-sensitive menu, or press and hold the SHIFT key while right-clicking on the symbol. 2. A solid rectangle will appear around the symbol to indicate that it is being edited. Select the blue layer and pull it away from the rest of the symbol to make sure you have selected it. 3. With the blue layer of the cut-away still selected, select the size action from the Dynamics toolbar. The size dynamic property page will appear. 4. Click on Data Tags to open the Unified Data Browser. 5. Browse to the Network Neighborhood branch of the OPC DA tab and then to your own machine to see all OPC servers available on your machine. Remember that browsing for tags via the network branch will prepare the display for use over a network by appending the machine name before the tag path. If we browse through My Computer, this display could only be used on the same machine as the OPC server. Making the display network friendly will keep the display prepared for flexible use. 6. Via your machine name in the Network Neighborhood branch, browse to the ICONICS.DataWorX32.8 Registers TrainingCourse Tanks Tank1 folder to select the ICONICS.DataWorX32.8\TrainingCourse. Tanks.Tank1.Level tag on the right, as depicted in Figure L4.3.2. Click on OK after selecting the tag.

GENESIS32 Standard Training Manual

Figure L4.3.2: Selecting the Tank Level 7. Select the vertical direction on the top/left corner in the Size tab. 8. Enable Range Override to allow the entry of ranges. Enter 0 as the Low Range. Enter 100 as the High Range, as depicted in Figure L4.3.3. 9. Also choose the Clip option; this way the object will be sized by clipping portions off rather than by simply shrinking it.

Figure L4.3.3: Size Action Property Dialog 10. Select OK to apply the changes and close the Property Inspector.

GENESIS32 Standard Training Manual

11. Drag the blue layer of the cut-away back over to the black layer, and use your keyboards arrow buttons to line it back up to be directly on top. 12. Double-click outside the solid rectangle surrounding the symbol to restore the grouping. The blue handles around the symbol will return to indicate the symbol is no longer being edited. 13. Save the display using File Save. 4.3.2.2 Adding Dynamics to the Pump

The next step is to change the pump symbol. The pump will be configured to switch on and off by bringing up a small pop-up menu, and it will have animation to indicate which state it is in. button, if it is 1. Select the pointer tool from the Draw toolbar with the not already selected, and click on the pump. The pump symbol will become active with blue handles. 2. The pump symbol is also composed of subparts. To gain access to these subparts, edit the symbol as you did with the cut-away symbol. 3. Inside the symbol, left-click on the black spokes to select them. Notice that red handles appear around the object rather than blue. This is because there is a dynamic attached to this object. 4. Double-click on the spokes to bring up the Property Inspector, and click on the Animator properties page. Currently, the data source for the animation is 1, forcing the animation to be always active. We will set the data source so that the animation runs only when the pump is on. 5. Click Data Tags to open the Unified Data Browser. 6. Browse via Network Neighborhood Your Machine Name ICONICS.DataWorX32.8 Registers TrainingCourse Pumps Pump1 to select the ICONICS.DataWorX32.8\TrainingCourse.Pumps. Pump1.Running tag on the right, as depicted in Figure L4.3.4. Click on OK after selecting the Running bit.

GENESIS32 Standard Training Manual

Figure L4.3.4: Selecting the Pump Running Bit 7. The Animator properties should look like Figure L4.3.5. Notice that this animated object is simply a group of three spokes objects layered on top of each other, each of them acting as one frame of the animation. You can scroll through the three frames to see how the animation works.

Figure L4.3.5: Animator Property Dialog 8. Click OK when finished to close the property inspector, and double-click outside the symbol to exit the edit symbol mode and return to normal editing mode. 9. With the whole pump symbol still selected, select the pick action from the Dynamics toolbar with the button. The pick action is used to give

GENESIS32 Standard Training Manual

an object the ability, when it is clicked on, to execute a configurable action. 10. The Property Inspector will appear with the Pick tab active. From the action list choose Pop-up Menu. This will change the layout of the page, allowing you to configure a pop-up menu, as depicted in Figure L4.3.6.

Figure L4.3.6: Pop-up Menu Pick Action Property Dialog 11. Click on Menu Editor to open the Menu Editor dialog. 12. Click on Add Item to create a new item, and then click Edit Item; this will bring up a Pick field Property Inspector for that menu item. 13. From the Action list, choose Download Value, and then click on Tags Menu to open the Unified Data Browser. 14. Browse via Network Neighborhood Your Machine Name ICONICS.DataWorX32.8 Registers TrainingCourse Pumps Pump1 to select the ICONICS.DataWorX32.8\TrainingCourse.Pumps. Pump1.Start tag on the right, as depicted in Figure L4.3.7. Click on OK after selecting the Start bit.

GENESIS32 Standard Training Manual

Figure L4.3.7: Selecting the Pump Start Bit 15. Set the Value (On Up) to 1. 16. Set the Description to Start Pump, as depicted in Figure L4.3.8. The Description field is used as the label for the pop-up menu item.

Figure L4.3.8: Start Pump Action 17. Click on OK to return to the Menu Editor. 18. Click on Add Item to create a new item, and then click Edit Item. This will bring up a Pick field Property Inspector. From the Action list choose Download Value.

GENESIS32 Standard Training Manual

19. Click on Tags Menu to open the Unified Data Browser. 20. Browse via Network Neighborhood Your Machine Name ICONICS.DataWorX32.8 Registers TrainingCourse Pumps Pump1 to select the ICONICS.DataWorX32.8\TrainingCourse.Pumps. Pump1.Stop tag on the right. Click on OK after selecting the Stop bit. 21. Set the Value (On Up) to 1, and the Description to Stop Pump. 22. Click on OK to return to the Menu Editor. 23. The Menu Editor dialog will now have two menu items defined, as depicted in Figure L4.3.9.

Figure L4.3.9: Menu Editor 24. Click on OK to return to the Pick tab. 25. Click on OK to return to the display. 26. Save the display using File Save. 4.3.2.3 Adding Dynamics to the Valve

The next step is to change the valve symbol. It will change color to indicate which state it is in. When clicked on, it will open a pop-up window in which you will be able to change the state of the valve using a state field. 1. Select the pointer tool from the Draw toolbar, if it is not already selected, and click on the ball valve symbol. The valve object will become selected with blue handles.

GENESIS32 Standard Training Manual

2. Right-click on the symbol and choose Edit Symbol from the contextsensitive menu, or press and hold the SHIFT key and right-click to edit the symbol. 3. Select the actual valve portion of the symbol, leaving the pipes unselected. 4. Change the color of the valve to red by left-clicking on the red color in the color palette. NOTE: Left-clicking on the color will change the fill color of an object, while right-clicking on the color will change the line color. 5. With the red valve selected, click on the Color button Dynamics toolbar. 6. Click on Data Tags to open the Unified Data Browser. 7. Browse via Network Neighborhood Your Machine Name ICONICS.DataWorX32.8 Registers TrainingCourse Valves Valve1 to select the ICONICS.DataWorX32.8\TrainingCourse.Valves. Valve1.Status tag on the right, as depicted in Figure L4.3.10. Click on OK after selecting the Status bit. on the

Figure L4.3.10: Selecting the Valve Status Bit 8. Click on Add to add this tag to the list of color actions. 9. Select the bright green color for the fill color, as depicted in Figure L4.3.11.

GENESIS32 Standard Training Manual

Figure L4.3.11: Color Dynamic 10. Click on OK to close the Property Inspector dialog. 11. Double-click outside the area surrounded by the gray border that indicates the outer bounds of the symbol being edited. This will exit the edit symbol mode and return to normal editing mode. 12. Save the display using File Save. 4.3.2.4 Creating a Pop-up Window

As indicated before, the states of the valves will be changed using a state field in a pop-up window. We are now going to create this pop-up window, which we will later link to a pick action on the valve. 1. Open a new GraphWorX32 display from Start Programs ICONICS GENESIS-32 GraphWorX32 GraphWorX32 if you would like to keep the operator screen open, or simply create a new display from within GraphWorX32. 2. Immediately choose File Save and save the display as ValvePopup.gdf, choosing the file type as GraphWorX32 Displays without VBA (*.gdf). Save the display in your C:\Program Files\ICONICS\GENESIS-32\Examples\ Training directory. 3. Select Format Font to open the Font dialog, or use the Text Style toolbar to change the font to Tahoma and the size to 20, as depicted in Figure L4.3.12.

GENESIS32 Standard Training Manual

Figure L4.3.12: Changing the Font Size 4. As this is a pop-up window, we can make it a lot smaller than a normal window. We'll do this from the Format Display Properties. 5. On the General tab we will change the Display Dimensions. Change the Width to 300, and the Height to 150. Also on this tab, choose Fixed Scale Display. 6. On the Window tab we will change the following properties in the Runtime Titlebar Options. 7. Uncheck Start Minimize (if checked), since pop-ups should not be minimized. 8. Uncheck Start Maximize, since pop-ups should not be maximized either. 9. Check Override Caption, and enter Valve Control as the caption. 10. Set Outer Frame Edge to Raised (Resizable), and Inner Frame Edge to Sunken. 11. Also uncheck all other options except for Always on Top and Scale window dimensions based on current screen resolution, as depicted in Figure L4.3.13.

Figure L4.3.13: Display Properties: Window

GENESIS32 Standard Training Manual

12. Click on OK to commit the Display Properties changes. 13. Click on the Text button on the Draw toolbar, and then click on the topleft side of the screen. A cursor will appear. Type in Valve State, and then click outside the typing area to return to selecting mode. 14. Click on the Process Point/Data Entry button on the Dynamics toolbar, and click under the text you have just typed in. 15. The Property Inspector will appear with the PPT/DE tab active. Click on Data Tags to open the Unified Data Browser. 16. Browse via Network Neighborhood Your Machine Name ICONICS.DataWorX32.8 Registers TrainingCourse Valves Valve1 to select the ICONICS.DataWorX32.8\TrainingCourse.Valves. Valve1.Status tag on the right. 17. After clicking on a tag, it is moved to the edit box at the top of the Unified Data Browser where it becomes editable. 18. Replace Valve1 with <<valve>>, as depicted in Figure L4.3.14, and click on OK.

Figure L4.3.14: Selecting the Valve Status 19. Click on the States button to open the State Field Configuration dialog. 20. In the State Value field enter 0. In the State String field enter Closed, and then click on Add.

GENESIS32 Standard Training Manual

21. In the State Value field enter 1. In the State String field enter Open, and then click on Add. 22. It is also possible to enter a Default String if desired, which will be displayed when a source value is not in the list, as depicted in Figure L4.3.15.

Figure L4.3.15: State Field Configuration 23. Click on OK to close the State Field Configuration and return to the Property Inspector. Click on OK to close the Property Inspector as well.

GENESIS32 Standard Training Manual

Figure L4.3.16: Process Point Property Dialog on the Dynamics toolbar, and position the 24. Click on the Button icon cursor just below the previously created text and state field objects. 25. In the Property Inspector change the Action to Download Value. 26. Click on Tags Menu to open the Unified Data Browser. 27. Browse via Network Neighborhood Your Machine Name ICONICS.DataWorX32.8 Registers TrainingCourse Valves Valve1 to select the ICONICS.DataWorX32.8\TrainingCourse.Valves. Valve1.Open tag on the right. 28. After clicking on a tag, it is moved to the edit box at the top of the Unified Data Browser where it becomes editable. 29. Replace Valve1 with <<valve>> as you did in Step 18, and click on OK. 30. Set the Value (On Up) to 1 as depicted in Figure L4.3.17.

Figure L4.3.17: The Open Valve Action 31. Click on the Button tab and change the Text to Open. 32. Click on OK to close the Property Inspector.

GENESIS32 Standard Training Manual

33. Click on the Button icon on the Dynamics toolbar and position the cursor just next to the previously created button. 34. In the Property Inspector change the Action to Download Value. 35. Click on Tags Menu to open the Unified Data Browser. 36. Browse via Network Neighborhood Your Machine Name ICONICS.DataWorX32.8 Registers TrainingCourse Valves Valve1 to select the ICONICS.DataWorX32.8\TrainingCourse.Valves. Valve1.Close tag on the right. 37. After clicking on the tag it is moved to the edit box at the top of the Unified Data Browser where it becomes editable. 38. Replace Valve1 with <<valve>> as you did in Steps 18 and 29, and click on OK. 39. Set the Value (On Up) to 1, as depicted in Figure L4.3.18.

Figure L4.3.18: Close Valve Action 40. Click on the Button tab and change the Text to Close. 41. Click on OK to close the Property Inspector. 42. Click on the Button icon on the Dynamics toolbar and position the cursor just next to the previously created button.

GENESIS32 Standard Training Manual

43. In the Property Inspector change the Action to Close Window, as depicted in Figure L4.3.19.

Figure L4.3.19: Close Window Action 44. Click on the Button tab and change the Text to Dismiss. 45. Click on OK to close the Property Inspector. 46. Insert the Ball Valve symbol from the Symbol Library into the display and select the valve. 47. Right-click on the symbol and choose Edit Symbol from the contextsensitive menu, or press and hold the SHIFT key and right-click to edit the symbol. 48. Select the actual valve part of the symbol, and change the color of the object to red by left-clicking on the red color in the color palette. 49. With the red valve selected, click on the Color button on the Dynamics toolbar. 50. Click on Data Tags to open the Unified Data Browser. 51. Browse via Network Neighborhood Your Machine Name ICONICS.DataWorX32.8 Registers TrainingCourse Valves Valve1 to select the ICONICS.DataWorX32.8\TrainingCourse.Valves. Valve1.status tag on the right.

GENESIS32 Standard Training Manual

52. After clicking on the tag, it is moved to the edit box at the top of the Unified Data Browser where it becomes editable. 53. Replace Valve1 with <<valve>>, as you have in previous steps, and click on OK. 54. Click on Add to add this tag to the list of color actions. 55. Select the bright green color for the fill color, as depicted in Figure L4.3.20.

Figure L4.3.20: Color Dynamic 56. Click on OK to close the property page dialog. 57. Double-click outside the area surrounded by the gray border that indicates the outer bounds of the symbol being edited. This will exit the edit symbol mode and return to normal editing mode. 58. As this is a pop-up window, it should take up only a small part of the screen. To resize the display, change to Runtime Window Properties Mode by choosing it from the View menu, or typing CTRL + R. 59. Change the size of the window until it just fits in the dialog space, as depicted in Figure L4.3.21. This is done by simply grabbing the corner of the window and dragging it to the correct size.

GENESIS32 Standard Training Manual

60. Once the correct size has been chosen, you can exit from Runtime Window Properties Mode using the CTRL+R shortcut key combination if you choose. 61. You will need to save the display while it is the correct size. This is done by using the CTRL+S shortcut key combination while still in Runtime Window Properties Mode, or simply use the GraphWorX32 menus. If you re-maximize the display to save it, it will be saved in the maximized mode.

Figure L4.3.21: Resizing the Pop-up Window 4.3.2.5 Associating the Pop-up Window With the Valve

With the pop-up window created we can now add the functionality to open the pop-up window by clicking on the valve objects in the main display. 1. Return to the second operator display by selecting File Open and choosing the Operator2.gdf display, or switching to it if you chose to leave it open while creating the pop-up window. 2. Select the valve and right-click on the symbol. Choose Edit Symbol from the context-sensitive menu, or press and hold the SHIFT key and rightclick. 3. Select the actual valve, and click on the Pick action button on the Dynamics toolbar. Or choose Dynamics Actions Pick to add a pick action to the valve. 4. In the Property Inspector dialog select Pop-up Window as the Action. 5. Type in ValvePopup.gdf as the Filename, and enable the Center to Parent option, as depicted in Figure L4.3.22. NOTE: Referring to the filename in this way is an example of using Relative Paths. Because the two displays exist in the same folder, a full path is not needed and just the name of the file can be used. Using relative paths is preferred in many cases for simplicity and flexibility. This way the entire project can be moved and the filenames do not need to be changed for these actions to continue to work after the move. Relative

GENESIS32 Standard Training Manual

paths are also necessary if using WebHMI, so that paths will continue to work after publishing, and over the Web. With proper syntax, relative paths can also work if files are not in the same folder.

Figure L4.3.22: Pop-up Window Action 6. Recall that we used an alias in the tag paths in the pop-up window so that the window could be reused for multiple valves. We now need to define the value of that alias which will be passed into the pop-up window as we launch it with this pick action. Click on Set Aliases Local Aliases to open the Local Aliases Configuration dialog. 7. Enable Set Aliases Directly to specify aliases directly in this dialog. The other option is to use aliases that are preconfigured and stored in a text file. 8. Under Alias Name, enter valve, and under Alias Definition enter Valve1. NOTE: Alias names are case sensitive, so be consistent with the case of your alias here and everywhere you refer to it. 9. Click on Add to add the alias to the list, as depicted in Figure L4.3.23.

GENESIS32 Standard Training Manual

Figure L4.3.23: Setting the Aliases 10. Click on OK to return to the Property Inspector. 11. Click on OK to apply the changes and close the Property Inspector. 12. Save the display by selecting File Save, or by clicking on the Save button on the Main toolbar. 13. When the file is saved, choose the Runtime menu to show the display in runtime mode, as shown in Figure L4.3.24. 14. Click on the valve to open the Valve Control dialog from which the valve can be opened and closed. 15. Click on the pump to show a drop-down menu from which the pump can be started and stopped. 16. You should notice that when you open the valve, the valve should turn green and the tank level should start rising. If you start the pump, then the tank level should stay the same and the pump should be animated. If you close the valve while the pump is running, then the tank level should go down (and the valve should turn back to red). If the tank empties, then the pump should automatically be shut off. This type of functionality is common logic for a PLC device to control.

GENESIS32 Standard Training Manual

Figure L4.3.24: Second Operator Display in Runtime


17. Make sure the file is saved, and click on File Exit to close GraphWorX32.

GENESIS32 Standard Training Manual

GraphWorX32: Layers
11.1 Objectives
By the end of this section, you will be familiar with the following concept: Using layers in your GraphWorX32 application

11

11.2 Layers
Layers can be used to selectively display information based on user selection or currently active security levels. Additionally layers can be used to clutter and de-clutter the screen content based on zoom level. Using the Layers command on the Format menu, you can add, remove, or duplicate a layer. You can also edit the layer properties, set the active layer, set the next layer, set the previous layer, hide layers above the current layer and hide layers below the current layer. Hiding the layers above and below the current layer is useful when configuring one of the layers when you do not want to see the others.

Figure 4.5.1: Edit Layer Properties Dialog

GENESIS32 Standard Training Manual

You will notice in the layer configuration that whether a layer is visible in Runtime or not can be dependant upon the result of an expression, or can be explicitly hidden. There are pick actions that can control whether a layer is hidden as well. It is also important to note that, although the Layers toolbar only shows buttons for nine layers, this is certainly not a limitation to the number of layers that can be within a display. NOTE: The Quick Lab following this section outlines the steps necessary to create and configure layers. For more information about layers refer to the "Layers" section in the GraphWorX32 Help documentation.

Quick Lab: Using Layers


4.4.1 Quick Lab Overview

4.4

In this lab, a layer will be added to the Operator3.gdf display. On this layer two buttons will be added that will reset all pumps, and valves to their default states. This will allow you to become familiar with configuring and using layers in GraphWorX32 displays. Estimated time to complete this lab: 30 minutes. 4.4.1.1 Task Checklist 4.4.1.2

In this quick lab, you will complete the following tasks: Add a layer to an existing display. Configure the layer, and add a reset button to the screen on that layer.

Support Files

To complete this quick lab, you will need the following support files: TankLevelSimulation.mdb Operator3.gdf

4.4.2 Using Layers


We will start with the third operator screen that we created, and add a layer to that display. 1. If you do not already have the Operator3 display open, browse to your C:\Program Files\ICONICS\GENESIS-32\Examples\Training directory in Windows Explorer and open the Operator3.gdf file.

GENESIS32 Standard Training Manual

2. Select Format Layers Add Layer to open the Edit Layer Properties dialog. 3. Change Layer Name to SystemReset, as depicted in Figure L4.5.1. 4. Check Request data when layer is initially hidden. 5. Uncheck Release data when layer becomes hidden.

Figure L4.5.1: Editing Layer Properties 6. Click on OK to create the layer. The display will automatically switch to the SystemReset layer. The currently active layer is displayed at the bottom right in the status bar, which can be made visible using View Status Bar. button on the 7. Insert a button next to the top right tank (using the Dynamics toolbar), and select Download Value as the Action. 8. Click on Tags Menu to open the Unified Data Browser in order to choose a data source. 9. Browse via Network Neighborhood and to ICONICS.DataWorX32.8 Registers TrainingCourse Pumps Pump1 to choose the Stop tag for Pump1, as depicted in Figure L4.5.2. Click on OK after selecting the tag.

GENESIS32 Standard Training Manual

Figure L4.5.2: Selecting the Pump Stop 10. In the Pick tab of the Property Inspector, set the Value (On Up) to 1, as depicted in Figure L4.5.3.

Figure L4.5.3: Reset Pumps Download Value Properties 11. Click on the Button tab, and change the Text to Reset Pumps, as depicted in Figure L4.5.4.

GENESIS32 Standard Training Manual

Figure L4.5.4: Reset Pumps Button Properties 12. Click on OK to exit from the Property Inspector. 13. Make sure the newly created button is still selected, and click on the button on the Dynamics toolbar, or select Dynamics Actions Pick to add another pick action to the button. 14. Select Download Value as the Action. 15. Copy the Data Source from the first Pick properties tab in the Property Inspector, and paste it into the Data Source for this new Pick properties tab. 16. Click inside the Data Source of the new pick action (the second tab) and replace Pump1 with Pump2, as depicted in Figure L4.5.5.

GENESIS32 Standard Training Manual

Figure L4.5.5: Editing the Data Source 17. Set the Value (On Up) to 1. 18. Click on OK to exit from the Property Inspector. 19. Repeat Steps 1318 four more times, replacing Pump1 with the correct pump number so that, when finished, you have six Pick tabs attached, as depicted in Figure L4.5.6, with the following signals as data sources: \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Pumps.Pump 1.Stop \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Pumps.Pump 2.Stop \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Pumps.Pump 3.Stop \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Pumps.Pump 4.Stop \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Pumps.Pump 5.Stop \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Pumps.Pump 6.Stop

GENESIS32 Standard Training Manual

Figure L4.5.6: Six Pick Actions 20. Using the same method, create a Button with a Text label of Reset Valves and six Pick Actions of Download Value with Value (On Up) as 1 and the following Data Sources: \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Valves.Valve 1. Close \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Valves.Valve 2. Close \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Valves.Valve 3. Close \\MyMachine\ICONICS.DataWorX32.8\TrainingCourse.Valves.Valve 4. Close

NOTE: You may find it easier to duplicate the Reset Pumps button and simply change the Text and Data Sources. 21. Save the display by selecting File Save, or by clicking the Save button on the Main toolbar. 22. When the file is saved, choose Runtime from the menu to show the display in runtime mode, as shown in Figure L4.5.7.

GENESIS32 Standard Training Manual

Figure L4.5.7: Layered Display in Runtime 23. Open a number of valves using the pop-up window, and start a number of pumps using drop-down menus. 24. Click on Reset Pumps, and all pumps will stop. Click on Reset Valves, and all valves will stop. 25. Make sure the file is saved, and click on File Exit to close GraphWorX32.

GENESIS32 Standard Training Manual

GraphWorX32: Templates
12.1 Objectives
By the end of this section, you will be familiar with the following concept: Using templates with your displays

12

12.2 Templates
Templates are standard formats with established parameters that can be applied to a display at any time in the configuration mode. GraphWorX32 supports two file extensions: .gdf (graphic display file), the default file extension, and .tdf (template display file). Once a template has been inserted into a display, it is easy to reflect changes made to the template in the display. Whenever you make changes to the template, simply apply them to all affected displays, and the changes will be visible throughout all screens.

Figure 4.6.1: Template Format Options NOTE: The Quick Lab following this section outlines the steps necessary to create and apply a template. For more information about templates refer to the "Templates" section in the GraphWorX32 Help documentation.

GENESIS32 Standard Training Manual

Quick Lab: Using Templates


4.5.1 Quick Lab Overview

4.5

In this lab, you will get comfortable using GraphWorX32 templates, and you will apply these templates to the displays that have already been created in this training course. Estimated time to complete this lab: 45 minutes. 4.5.1.1 Task Checklist 4.5.1.2

In this quick lab, you will complete the following tasks: Create a GraphWorX32 template. Apply the template to displays. Edit and reapply the template.

Support Files

To complete this quick lab, you will need the following support files: TankLevelSimulation.mdb Operator1.gdf Operator2.gdf Operator3.gdf ValvePopup.gdf HistTrendViewer.gdf AlarmViewer.gdf AlarmReporter.gdf

4.5.2 Creating a GraphWorX32 Template


1. Open a new GraphWorX32 display from Start Programs ICONICS GENESIS-32 GraphWorX32 GraphWorX32.

GENESIS32 Standard Training Manual

2. Immediately choose File Save and save the display as TrainingCourse.tdf, choosing the file type as GraphWorX32 Templates without VBA (*.tdf), as depicted in Figure L4.6.1. Save the template in your C:\Program Files\ICONICS\GENESIS32\Examples\Training directory from which you have been working.

Figure L4.6.1: Creating the Template Display 3. If the Grid is not yet enabled on a 25 x 25 raster, enable the Grid settings as described previously. 4. The following steps will help you to create the display shown in Figure L4.6.2.

Figure L4.6.2: Template To Be Created

GENESIS32 Standard Training Manual

5. Draw the top section using a rectangle, and double-click on the rectangle to open the Property Inspector. 6. Uncheck the Fill Color, and change the 3D Edge to Raised, as depicted in Figure L4.6.3. Click OK to return to the display.

Figure L4.6.3: Rectangle Property Dialog 7. Change the default font size in the Text toolbar to Verdana 12 (if it is not already).

Figure L4.6.4: Changing the Font Size 8. Insert a text object on the left-hand side, and enter the text Training Course Application. 9. Insert a time/date object on right-hand side using the Dynamics toolbar. 10. Change the Display format to Date and Time. 11. Change the Date Format to dd MMMM yyyy, as depicted in Figure L4.6.5. The format takes the same parameters as the Format function of Visual Basic. button on the

GENESIS32 Standard Training Manual

Figure L4.6.5: Time/Date Properties 12. Click OK to apply the property changes and return to the display. 13. Insert a button at the bottom of the screen using the button on the Dynamics toolbar, and select Load Display as the Action. 14. For the Filename, type Operator1.gdf. NOTE: Recall that it can be useful to omit the directory from the file name, as depicted in Figure L4.6.6. This makes it possible to copy the files to another directory and still use them without any modifications. Simply changing the working directory will be sufficient.

GENESIS32 Standard Training Manual

Figure L4.6.6: Load Display Properties 15. GraphWorX32 pick fields can also have a keyboard shortcut attached. Click on the Key Shortcut button to open the Define Key Shortcut dialog. Type in 1, and enable Alt, as depicted in Figure L4.6.7.

Figure L4.6.7: Key Shortcut Configuration 16. Click on OK to assign the key shortcut. 17. Choose the Button tab and remove the .gdf from the text. 18. Click on OK to close the Property Inspector.

GENESIS32 Standard Training Manual

19. Also create buttons for the following displays with the relevant keyboard shortcuts. Remove the .gdf from the text of all buttons. Operator2.gdf and use the shortcut ALT + 2 Operator3.gdf and use the shortcut ALT + 3 HistTrendViewer.gdf and use the shortcut ALT + H AlarmViewer.gdf and use the shortcut ALT + A AlarmReporter.gdf and use the shortcut ALT + R

20. Select all buttons using the SHIFT key, selecting the HistTrendViewer button last. Use Arrange Make Same Size Both to make all buttons the same size. NOTE: We selected the HistTrendViewer button last because it has the longest caption. The last item chosen is the item to which all items are sized. 21. Click away from the buttons to deselect them, and then adjust the two outside buttons so that they are each one grid away from the edges. Then select all buttons again and use Arrange Space Evenly Across to distribute the buttons evenly. 22. Open Format Display Properties and select the Window page. Uncheck the Show Titlebar, Override Caption, and System Menu options. 23. Check the Start Maximized option, and uncheck the Show Runtime Menubar option. 24. Also check the Always on Top and Start Maximized options, and uncheck the Horizontal Scrollbar, Vertical Scrollbar, and Show Runtime Menubar options. NOTE: With these options, when in Runtime your displays will cover your Windows toolbar and Start menu. All GraphWorX32 menus will also be missing. With such settings, it is pertinent to know that you can enter and leave Runtime in GraphWorX32 by keying CTRL + M. 25. With the configuration depicted in Figure L4.6.8, the GraphWorX32 template is configured to make use of the whole screen, as many real operator screens are.

GENESIS32 Standard Training Manual

Figure L4.6.8: Display Properties: Window 26. Before closing the Display Properties, ensure that the top left of the drawing area is also at the top left of the drawing view in the Window Dimensions settings. Click OK to apply the changes. 27. Make sure the zoom is set to View Zoom 100%. You may not be able to see your configurations anymore at this time, since you do not have scrollbars and the objects may be behind the toolbars. You can use CTRL + R to use the Runtime Window Properties Mode to view the template as it will look in runtime and then return to regular Configure mode. 28. Save the created display selecting File Save, or use the Save button on the Main toolbar. This will bring up the Update Displays dialog box, as depicted in Figure L4.6.9.

Figure L4.6.9: Updating the Template Displays 29. Click on No, as the template has to be applied first to the relevant displays before it can update them.

GENESIS32 Standard Training Manual

4.5.2.1

Applying a Template to a Display 1. To apply a template to a display, open the display by selecting File Open and select Operator1.gdf. 2. Select Format Template Apply Template. 3. Browse to the template directory and select the TrainingCourse.tdf template, as depicted in Figure L4.6.10.

Figure L4.6.10: Applying the Template 4. After applying the template, the Operator1.gdf display should look as depicted in Figure L4.6.11.

Figure L4.6.11: GraphWorX32 Template Applied to a Display 5. The template has now been inserted into the display, and has applied its display properties to the target display as well. Save the display.

GENESIS32 Standard Training Manual

6. Now repeat the same procedure for the following displays: Operator2.gdf Operator3.gdf HistTrendViewer.gdf AlarmViewer.gdf AlarmReporter.gdf

NOTE: You may find that you need to adjust the objects on your displays after applying the template so that they dont overlap the template. You can select all items on a layer by keying CTRL + A so that they can all be moved together. You may also need your scrollbars to do this properly. To turn the scrollbars on temporarily, select View Toggle Both Scrollbars or CTRL + L to toggle them on and off. Just be sure they are off before saving. 7. With the template applied to all displays, enter runtime from any display. You should be able to use the navigation buttons at the bottom of the screen to navigate through the various displays. 4.5.2.2 Applying Template Changes

It is often necessary to make changes to a template, and these changes will need to propagate to all displays with this template assigned. In this exercise, we will do just that. 1. Open the template display TrainingCourse.tdf in GraphWorX32. NOTE: You may need to choose Format Edit Applied Template to edit the configurations. 2. Enable the Fill Color of the raised bar at the top of the screen and change it to white using the objects Property Inspector. 3. From the TrainingCourse Symbol Library, insert the ICONICS Logo and place it into the top area of the screen, as depicted in Figure L4.6.12.

GENESIS32 Standard Training Manual

Figure L4.6.12: Modified Template Header 4. Draw a rectangle along the bottom of the display outlining the buttons, and then click the rectangle to the back. button on the Arrange toolbar to send the

5. On the Color Palette, click the right arrow button once so you see some empty color boxes. 6. Right-click on the Color Palette and choose Eyedropper, as depicted in Figure L4.6.13.

Figure L4.6.13: Color Eyedropper 7. Your pointer should change to a dropper icon. Click on the blue in the ICONICS Logo to extract that color. The dropper icon should turn the color you are extracting. Now click inside one of the empty color boxes in the Color Palette to drop the color there for use. The box should turn the desired color blue. 8. Choose the Select pointer from the Draw toolbar to return your mouse to the select mode. Select the rectangle you created at the bottom of the display and left-click on the new blue color to set that color as the Fill Color, as depicted in Figure L4.6.14.

GENESIS32 Standard Training Manual

Figure L4.6.14: Outlined Buttons with Custom Color 9. Finally, select the ICONICS Logo Watermark symbol from the TrainingCourse Symbol Library and drag it onto the display. Stretch the symbol so that it takes up the whole interior of the display, as depicted in Figure L4.6.15.

Figure L4.6.15: Final Edited Template

GENESIS32 Standard Training Manual

10. Save the template display by selecting File Save. This will bring up the Update Displays dialog box, as depicted in Figure L4.6.16. NOTE: Make sure that none of your displays using this template is open, or you will not be able to save the template because it is still in use.

Figure L4.6.16: Updating the Template Displays 11. Click on Yes to bring up the Select Files dialog. 12. Click on Add to add the displays you want to update. Select all the displays to which we previously applied the template, and click Open. 13. When all displays are added, as depicted in Figure L4.6.17, click on OK to update the displays.

Figure L4.6.17: Updating the Displays 14. Open any of your displays, and you should be able to navigate through all displays and confirm that the template changes were applied, as depicted in Figure L4.6.18.

GENESIS32 Standard Training Manual

Figure L4.6.18: Final GraphWorX32 Project in Runtime

Additional Applications: GenBroker


13.1 Objectives
By the end of this chapter, you will be familiar with the following concepts: The need for GenBroker communications Types of communication GenBroker provides Enabling GenBroker/GenClient communications

13

13.2 Introduction
In addition to all the already-configured applications such as GraphWorX32, TrendWorX32 SQL Data Logger, and the AlarmWorX32 Server and Logger, even more applications are provided with GENESIS32. Some of these applications will be discussed in this chapter.

GENESIS32 Standard Training Manual

13.3 GenBroker Communications


DCOM is the method of communication for GENESIS32. There are, however, certain disadvantages to using DCOM. To overcome DCOM timeout problems, for example, it was necessary to eliminate Windows callbacks and reduce the number of different function calls over Windows DCOM communications. DCOM's major disadvantages are: Its complex settings often make its configuration ineffective when the client is remote. It does not work well across NT domains. Its connection over slow and unreliable networks (e.g., the Internet) is practically impossible. It is not easy to configure to pass through firewalls. In response to these difficulties, ICONICS has enhanced GENESIS32 with GenBroker, a proven, high-speed communications utility. Employing a network of applications, GenBroker uses TCP/IP and SOAP/XML channels to achieve real-time and secure communications between Web browser clients and WebHMI servers. Everything except the method of communication remains the same as before.

13.4 Communication Types


GenBroker uses the following basic methods of networked communications: OPC direct channel Direct channel over DCOM Direct channel over TCP/IP Direct channel over SOAP/XML Indirect channel via a mediator node Most channels, either direct or indirect, translate the OPC COM calls into one of two protocols and transmit them to the remote node, where GenBroker can execute them. (The OPC Direct channel is the only exception; it uses OPC calls.) Protocols that every channel can use for these transmissions are: DCOM: Suitable for local networks enabled with DCOM. Not recommended for Internet use. TCP/IP: Communicates over intranet/Internet through routers and firewalls. SOAP/XML: Communicates over intranet/Internet through routers and firewalls. NOTE: In order to use SOAP/XML channels in GenBroker, you must first install Microsoft Internet Information Server (IIS) on the GenBroker Server node. For more information, please refer to the GenBroker Help documentation.

GENESIS32 Standard Training Manual

13.5 Basic Steps in GenBroker Configuration


An example of a basic GenBroker configuration includes a server node connected to three PCs on a network that are connected to the Internet, as shown in Figure 7.1.1. PC1 - Server Node: This PC has WebHMI, GENESIS32 (with the Security Server), and the GENESIS32 License Utility installed. PC2 and PC3 - Client Nodes: These PCs have Microsoft Internet Explorer installed.

Figure 7.1.1: Basic Network Configuration Basic Steps for Server Side Configuration On the server node (PC1):
1. Create a display in GraphWorX32. 2. Save the display and then publish the display to the Web server using the

Web Publishing Wizard.


3. Configure GenBroker Server using the GenBroker Configurator, using the

OPC over TCP/IP direct channel (to enable communication over the Internet) as the default channel. Save the GenBroker configuration (.gbx) file.
4. Activate

GenBroker on the server node using the GenTray in GENESIS32.

Note: You may also want to configure the Security Server on the server node using the Security Configurator. You need to specify the location of the Security Server and the License Server in the GenBroker Configurator. Client Side Configuration: Viewing the Published Display File Once GenBroker is running, you can view the GraphWorX32 display that you have published to the Web server from any client Web browser:
1. On the client machine (PC2 or PC3), open the Web browser (e.g.,

Microsoft Internet Explorer).


2. Enter the URL for the published GraphWorX32 display in the Address

field of the Web browser window, and then click Go.

GENESIS32 Standard Training Manual


3. The Web page is downloaded from the Web server across the Internet and

appears in the client's Web browser window.

Quick Lab: GenBroker and GenClient


4.6.1 Quick Lab Overview

4.6

In this lab, you will walk through the steps of enabling GenBroker/GenClient communications between two machines. This is often desired for more complicated network communications, or to overcome the DCOM disadvantages discussed earlier. This lab is supplemental to the Standard GENESIS32 Training Class, and is an optional lab that can be done on your own time, or after taking the class. Estimated time to complete this lab: 15 minutes. 4.6.1.1 Task Checklist 4.6.1.2

In this quick lab, you will complete the following tasks: Activate GenBroker/GenClient communications on a Server machine. Activate GenBroker/GenClient communications on a Client machine.

Support Files

To complete this quick lab, you will not need any support files.

4.6.2 GenBroker and GenClient


1. Open the GenBroker Configurator from Start Programs ICONICS

GENESIS-32 Tools GenBroker Configurator.


2. The opening window of the GenBroker Configurator will appear, as

depicted in Figure L7.1.1, and will indicate what the active GenBroker Configuration file (.gbx) is.

GENESIS32 Standard Training Manual

Figure L7.1.1: GenBroker Configuration Opening Window


3. To create a new file, click on the Edit button. A new default will be

opened in the GenBroker Configurator, as depicted in Figure L7.1.2.

Figure L7.1.2: GenBroker Configurator


4. Immediately choose File Save to save this new file as

TrainingCourse.gbx in your C:\Program Files\ICONICS\GENESIS-32\Examples\Training directory. 4.6.2.1 Activating GenBroker/GenClient Communication on a Client Node

To use GenBroker/GenClient communication instead of DCOM on the client side:


5. Select Channels in the GenBroker Configurator tree control. 6. Right-click on OPC over TCP/IP Channels and choose Set As

Default, as depicted in Figure L7.1.3. NOTE: Setting a channel as the default channel ensures that this client machine will attempt to communicate with all servers via that channel, unless otherwise defined. We could alternatively define a specific node name under the TCP/IP Direct Channel, requiring this client to always communicate with that one node via that channel. If a node is not

GENESIS32 Standard Training Manual

specifically listed under a channel, it will be communicated with via the channel marked as default.

Figure L7.1.3: GenBroker Configurator


7. Save the configuration file and make sure that it is the active

GenBroker configuration file for this machine.


8. This computer (acting as a client) is now configured for OPC over

TCP/IP communication using GenClient. 4.6.2.2 Activating GenBroker/GenClient Communication on the Server Node

To use GenBroker/GenClient communication instead of DCOM on the server side:


9. In the GenBroker Configurator, select Advanced in the

GenBroker Configurator tree control.


10. Select Server, and then General. 11. Check all GenBroker Channels, and select Bind to all interfaces,

as depicted in Figure L7.1.4. NOTE: These configurations are the default configurations; you may desire to disable some channels that are not in use, although it is not necessary.

GENESIS32 Standard Training Manual

Figure L7.1.4: GenBroker Configurator


12. After saving and closing the GenBroker Configuration file, and

making sure that it is the active file, you must start the GenBroker Server here on the Server machine. This can be done from GenTray, as depicted in Figure L7.1.1.

Figure L7.1.5: Starting the GenBroker Server from GenTray NOTE: If GenTray is not already running, it can be started from Start Programs ICONICS GENESIS-32 Tools GenTray.
13. This computer is now configured to act as a server for OPC over

TCP/IP communication.

GENESIS32 Standard Training Manual

Additional Applications: TrendWorX32 Reporter


14.1 Objectives
By the end of this section, you will be familiar with the following concept: The TrendWorX32 Reporter and how it is used

14

14.2 TrendWorX32 Reporter


TrendWorX32 has the capability to log data to a relational database. In addition to the standard tools available for accessing these data, TrendWorX32 has built-in capability for historical data utilities and reporting. The tools available to perform historical data utilities and reporting are: TrendWorX32 SQL Tool ActiveX Control TrendWorX32 SQL Reporting In configuration mode, you can add, edit, or delete reports without report processing taking place. To add a report, select Add Report from the Edit menu or the toolbar. This opens the Report Configuration Wizard, which is a series of dialog boxes that guide you through the report configuration, as shown in Figure 7.2.1. General Tags Report Target Schedule Range

GENESIS32 Standard Training Manual

Figure 7.2.1: Report Configuration Properties The Trend Reporter will connect to any historical DA database logged by the TrendWorX32 SQL Data Logger via an ODBC Connection (the very same connection used to log the data). When triggered, the report will collect the data specified and export it to a text file, an Excel worksheet, or a Microsoft Access database. NOTE: The Quick Lab following this section outlines the steps necessary to create a TrendWorX32 Report configuration. For more information about creating TrendWorX32 reports also refer to the "Report Configuration" section in the TrendWorX32 Reporter Help documentation.

Quick Lab: TrendWorX32 Reporter

4.7

4.7.1 Quick Lab Overview Sometimes it is necessary to view historical data in a report with numbers, rather than simply in a trend, as in the Trend Viewer ActiveX. In this lab, you will learn how to set up the TrendWorX32 Reporter to generate reports based on already-logged data. This lab is supplemental to the Standard GENESIS32 Training Class, and is an optional lab that can be done on your own time, or after taking the class.

GENESIS32 Standard Training Manual

Estimated time to complete this lab: 15 minutes. 4.7.1.1 Task Checklist 4.7.1.2

In this quick lab, you will complete the following tasks: Create a new TrendWorX32 report configuration. Configure a database connection to the historical database. Configure report properties and frequency. Run the report.

Support Files

To complete this quick lab, you will need the following support files: DataLogger.mdb TrendLogger.mdb

4.7.2

Creating a History Reporting System


1. Open the TrendWorX32 Report Configurator from Start Programs

ICONICS GENESIS-32 TrendWorX32 TrendWorX32 Reporting.


2. The TrendWorX32 Report Configurator will open, as depicted in Figure

L7.2.1.

Figure L7.2.1: Creating a New TrendWorX32 Report


3. Immediately choose File Save and save this configuration file as

TrainingCourse.rtw in your C:\Program Files\ICONICS\GENESIS32\Examples\Training directory.


4. In the Configurator, create a new report by selecting Edit Add Report;

a wizard will take you through all the steps necessary to have a complete report configuration.

GENESIS32 Standard Training Manual


5. The General dialog will be the first step of the wizard. Under Report

Name enter TrainingCourseExample, and enter the same under Target Name.
6. Also check the Enabled check box, as depicted in Figure L7.2.2.

Figure L7.2.2: General Report Properties


7. Click on Next to proceed to the Select Data Source dialog. 8. Click on DSN to select the data source for this report, and select the

Machine Data Source tab.


9. Select the TrendLogger DSN that we created previously and are using to

log our data, as depicted in Figure L7.2.3, and then click OK.

Figure L7.2.3: Selecting the TrendLogger Data Source


10. The SQL Server Login dialog will appear, as depicted in Figure L7.2.4.

But since the credentials of the currently logged-on user are used, nothing

GENESIS32 Standard Training Manual

has to be configured here. Click on OK to return to the Trend Logger Configurator.

Figure L7.2.4: SQL Server Login


11. Click on DBase Group to select the database group for this report. 12. Select the TrainingCourse database group that we have created

previously, as depicted in Figure L7.2.5. Click on OK.

Figure L7.2.5: Selecting the Database Group


13. Click on Group to select the logging group for this report. 14. Select the Levels logging group that we have created previously, as

depicted in Figure L7.2.6. Click on OK.

Figure L7.2.6: Selecting the Logging Group


15. Click on Tags to select the tags from the logging group for this report. 16. Select all tags that we have created, as depicted in Figure L7.2.7.

GENESIS32 Standard Training Manual

Figure L7.2.7: Selecting the Tags From the Logging Group


17. Click on OK to return to the Tags dialog, as depicted in Figure L7.2.8.

Figure L7.2.8: Selected Tags Properties


18. Click on Next to proceed to the Report dialog. 19. In the Report dialog under Data Filter, select Raw to show only the

actually logged values, as depicted in Figure L7.2.9.

GENESIS32 Standard Training Manual

Figure L7.2.9: Configuring the Report Data


20. Click on Next to proceed to the Target dialog, Select Text File. 21. Click on Report Path to select a directory in which the reports will be

stored. We will store our reports in the C:\Program Files\ICONICS\GENESIS-32\Examples\Training directory.


22. Select the Create Report with Date option, as depicted in Figure

L7.2.10, to ensure each generated report has a different name.

Figure L7.2.10: Configuring the Report Target


23. Click on Next to proceed to the Schedule dialog. Select Periodic as the

trigger.
24. Click on the Change button to change the period. In the Edit Periodic

Report dialog, select Hourly.

GENESIS32 Standard Training Manual


25. Under Occurs Every, specify 0 Hours. 26. Under Occurs Every, specify 10 Minutes, as depicted in Figure L7.2.11.

Figure L7.2.11: Configuring the Periodic Report


27. Click on OK to close the periodic report configuration. 28. The schedule should now be configured, as depicted in Figure L7.2.12.

Figure L7.2.12: Configuring the Report Schedule


29. Click on Next to proceed to the Range dialog. 30. Since the periodic report will use the data collected since the last time it

ran, nothing has to be configured in the Range dialog, as depicted in Figure L7.2.13.

GENESIS32 Standard Training Manual

Figure L7.2.13: Configuring the Report Range


31. Click on Finish to complete the configuration and return to the

TrendWorX32 Report Application, as depicted in Figure L7.2.14.

Figure L7.2.14: Configured TrendWorX32 Report


32. Select File Save to save the configuration. 33. Select Actions Start Reports, or click on the Traffic Light button to

start running the TrendWorX32 Report Application.


34. The report will run at the next 10-minute interval (e.g., 8:00, 8:10, 8:20,

etc.).
35. You can monitor the status of your reports from the Configurator. You

will be able to see when the last report ran, and if there were any problems with it, as depicted in Figure L7.2.15.

GENESIS32 Standard Training Manual

Figure L7.2.15: Monitoring Report Status


36. An example of a report is shown in Figure L7.2.16. Notice that there are

blank cells. This is because samples are only logged when the values change. Since not all values will change at the same time, there are samples for some tags while there are none for others. NOTE: If you would like blank cells to be filled in with the last logged sample (which would be the current known value since samples are only logged when the tags change), simply enable the Backfill Empty Cells option on the Report tab of the report configurations dialog. With this option, there would not be empty cells in the report depicted in Figure L7.2.16.

Figure L7.2.16: Report Example

GENESIS32 Standard Training Manual

GENESIS32 Tools: License Monitor


4.8 Objectives
Understanding how the License Monitor works Using the License Monitor to configure event logging

A.1

By the end of this chapter, you will be familiar with the following concepts:

4.9

License Monitor

GENESIS32 licensing options are based on the client application, the point count supported and the purchased Individual Client Units (ICUs). The number of Client Units purchased determines which ICONICS products you will be able to use. Each product has a set number of Client Units required for use and will not run if the available number of Client Units is less than the number required to run the product. NOTE: For complete information about GENESIS32 licensing, please refer to the Software Licensing Help documentation. Since the number of applications available for use depends on the number of available Client Units, it is necessary for you to be able to view the number of Client Units in use and the number of Client Units available. Along with the installation of GENESIS32, the License Monitor is installed to allow you to view the use of purchased Client Units. To launch the License Monitor from the Windows Start menu, select Programs ICONICS GENESIS-32 License Monitor. This opens the GENESIS32 License Monitor dialog box. This dialog consists of the following two tabs: the License tab and the Events tab. 4.9.1 License Tab

GENESIS32 Standard Training Manual

The License tab of the ICONICS License Monitor, shown in Figure A.1.1, displays the Start time and the Current time of use and (when in demo mode) when the demo expires. This tab also indicates the number of available and used Client Units and points. The License tab also displays the State of the license, any licensed nodes that are running GENESIS32, and the version of GENESIS32 that is currently using Client Units.

Figure A.1.1: GENESIS32 License Monitor: License Tab License Type The State field indicates the type of license that is being used, such as a temporary license or a permanent license. The Start time is the time the License Server began execution. The Current time reflects the current local time of the License Server. The Demo Over field depends on the type of license as follows: License No license Temporary license Valid (permanent) license Client Units and Points The License tab also provides information about the Client Units and points used to run specific GENESIS32 applications. The Client Units field lists the number of Client Units that are currently being used in all GENESIS32 applications, the number of Available Client Units (which are not currently in use), and the Total number of Client Units, which is equal to the number of available Client Units plus the number of Client Units In Use. For example, Demo Over Time and date that demo mode will end Number of days remaining on a license Field is blank

GENESIS32 Standard Training Manual

if you have 700 total Client Units and 300 Clients Units are currently being used, then 400 Client Units are available. Similarly, the Points field provides information about the number of process points that are currently being used (in runtime mode) in all GENESIS32 applications. Pocket Nodes and Mobile Users The Pocket Nodes field lists available Client Units for Pocket GENESIS applications, and the Mobile Users field lists the Client Units for MobileHMI. Nodes The fields at the bottom of the License tab provide information about the licensed nodes. You can specify Primary and Backup nodes for the license. The Controlling Node field indicates which node is currently active. If the primary node fails, the backup node will become the active node and will be shown as the controlling node. If no primary or backup node is specified, the local computer will be used as the default node. NOTE: When GenBroker communication is used (i.e., a remote License Server is specified in the active GenBroker configuration), license redundancy is not supported, so the Primary and Backup node fields cannot be edited. If the Primary and Backup node fields are empty, the local node is being used. The field at the bottom of the License tab lists information about the current activity of each licensed node. For each node that is using a client application, such as GraphWorX32, this field displays the Node name, the Application that the node is running, the number of Client Units per application that the node is using, and the Total number of Client Units currently being used by all nodes. The total number of Client Units currently being used is reflected in the Client Units field. NOTE: If you installed the Browser Station when installing GENESIS32, the Browser Station check box will be checked. 4.9.2 Events Tab The Events tab of the License Monitor, shown in Figure A.1.2, allows you to relay events from the GenEvent Server to a Primary or Backup node. The node that is specified will log events to the GenEvent logger. If no primary or backup node is specified, the local computer will be used as the default node for event logging.

GENESIS32 Standard Training Manual

Figure A.1.2: GENESIS32 License Monitor: Events Tab The GenEvent Server exposes all events sent to it via the OPC Alarm and Events (AE) interface. OPC AE clients, such as the AlarmWorX32 Viewer and Logger, can subscribe to the GenEvent Server to view and log these events. You can also configure settings for logging events to the NT Event Logger. The NT Event Log Applications list box allows you to select which GENESIS32 applications will be logged to the NT Event Logger. To select an application to be logged, simply check the box next to the application. It is also necessary to set the NT Event Log Severity Level if you are using Windows NT. The number you enter in this field is the minimum severity level required for an event to be logged to the NT Event Logger. For example, if the severity level is set to 500, only events with a severity level greater than 500 will be logged to the NT Event Logger. When data are relayed to another node for event-logging, the local computer (node) is bypassed. However, if you still want to log to the NT Event Logger, check the Always Write to Local NT Event Log check box. This will ensure that events are still logged to the NT Event Logger on the local computer, even though the local computer is relaying events to other nodes.

GENESIS32 Standard Training Manual

Quick Lab: License Monitor


4.10 Quick Lab Overview

A.1

In this lab, you will become familiar with using the License Monitor with your GENESIS32 applications to monitor how you are using your license, and to monitor events posted by your GENESIS32 applications. Estimated time to complete this lab: 5 minutes. 4.10.1 Task Checklist In this quick lab, you will complete the following tasks: Use the License Monitor to view applications that are currently in use. Use the License Monitor to control application event generation.

4.10.2 Support Files To complete this quick lab, you will not need any support files.

4.11 License Monitor


The License Monitor has two main parts: the part that monitors the use of the current license, and the part that controls event logging. 4.11.1 Applications Currently in Use
37. Select Start Programs ICONICS GENESIS-32 License

Monitor to open the GENESIS32 License Monitor, as depicted in Figure LA.1.1.


38. The top part of the monitor provides information about the currently

used license: If and when the time-limited license expires. How many Client Units are available and in use; this effectively determines how many applications can be run concurrently. How many Points (unique OPC tags) are available and in use. How many Pocket Nodes may connect to this license server. How many Mobile Users may connect to this license server.

GENESIS32 Standard Training Manual

Which nodes function as the Primary License Server and Backup License Server.

Figure LA.1.1: GENESIS32 License Monitor


39. The bottom part of the monitor provides information about which

applications are currently running and on which station they are running. 4.11.2 Application Event Generation
40. Select Start Programs ICONICS GENESIS-32 License

Monitor to open the GENESIS32 License Monitor.


41. Select the Events page, as depicted in Figure LA.1.2. 42. The events that are generated by the various GENESIS32

applications can be relayed to a GenEvent server on another node. Simply enter the destination node name in the Primary and optionally Backup fields.

GENESIS32 Standard Training Manual

Figure LA.1.2: GENESIS32 Events


43. Configure which events need to be logged to the local NT event log

by checking the relevant check boxes in the list of applications and setting the relevant Severity Level.
44. Logging events to the NT event log is typically used for

troubleshooting and diagnostics when things are not running properly on your system. If you are logging events to the local NT event log, you can view these events by opening the log from your Control Panel Administrative Tools Event Viewer.

GENESIS32 Standard Training Manual

Вам также может понравиться