Copyright. Proprietary Notice



Similar documents
Using Electronic Signatures

ProficyTM. HMI/SCADA - ifix I MPLEMENTING S ECURITY

Legal Notes. Regarding Trademarks KYOCERA Document Solutions Inc.

Kepware Technologies KEPServerEX Client Connectivity Guide for GE's Proficy ifix

NETWORK PRINT MONITOR User Guide

ifix and Terminal Services A Deployment Guide

GE Fanuc Automation CIMPLICITY

Server Manual. For Administrators of Cameleon Version 4

Chapter 16. Using Dynamic Data Exchange (DDE)

Event Manager. LANDesk Service Desk

Proficy* HMI/SCADA - ifix U SING T ERMINAL S ERVER

Using the ihistorian Excel Add-In

Business Insight Report Authoring Getting Started Guide

Enterprise Interface User Guide

JUL / 07 VERSION 3.2

RedundancyMaster Help Kepware Technologies

Using Logon Agent for Transparent User Identification

How To Manage A Cart In A Remote Management Software

Richmond SupportDesk Web Reports Module For Richmond SupportDesk v6.72. User Guide

Citrix EdgeSight for Load Testing User s Guide. Citrx EdgeSight for Load Testing 2.7

Industry White Paper. Ensuring system availability in RSView Supervisory Edition applications

ArchestrA Log Viewer User s Guide Invensys Systems, Inc.

ODBC Client Driver Help Kepware, Inc.

How To Write Tvalue Amortization Software

Understanding Task Scheduler FIGURE Task Scheduler. The error reporting screen.

Internet Synchronization with Microsoft Jet 3.5

WebSphere Business Monitor

SHARP Digital Signage Software Pro PN-SS05 OPERATION MANUAL

Silect Software s MP Author

Deploying Remote Desktop Connection Broker with High Availability Step-by-Step Guide

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Results CRM 2012 User Manual

User Guide for TASKE Desktop

Document Management Getting Started Guide

Vector HelpDesk - Administrator s Guide

Andover Continuum Remote Communication Configuration Guide

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

Avaya Network Configuration Manager User Guide

LANDESK Service Desk. Desktop Manager

UNICORN 6.4. Administration and Technical Manual

Experion HS Supplementary Installation Tasks Guide

VERITAS NetBackup Microsoft Windows User s Guide

Archive Attender Version 3.5

Microsoft Visual Studio Integration Guide

Amicus Link Guide: Outlook/Exchange

DataLogger Kepware, Inc.

SmartSync Monitor Help

Citrix EdgeSight for Load Testing User s Guide. Citrix EdgeSight for Load Testing 3.8

Budget Developer Install Manual 2.5

About This Guide Signature Manager Outlook Edition Overview... 5

Infor ERP BaanIV / Baan 5.0 / LN 6.1. User's Guide for Worktop 2.4

GETTING STARTED Exclaimer Signature Manager Exchange Edition Overview Signature Content Signature Rules... 10

Viewing and Troubleshooting Perfmon Logs

28 What s New in IGSS V9. Speaker Notes INSIGHT AND OVERVIEW

UNICORN 7.0. Administration and Technical Manual

Exclaimer Mail Archiver User Manual

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

How to Obtain an OPC License--5. Creating a System Code 5 Entering an Authorization Code 6. Getting Started with SNMP Editor--7

AssetWise Performance Management. APM Remote Upgrade Guide

FactoryTalk View Site Edition V5.0 (CPR9) Server Redundancy Guidelines

Diamond II v2.3 Service Pack 4 Installation Manual

PowerLogic ION Enterprise 5.6

Introduction to Microsoft Access 2003

Trend Micro Incorporated reserves the right to make changes to this document and to the products described herein without notice.

Excel Companion. (Profit Embedded PHD) User's Guide

ImageNow Cluster Resource Monitor

12 NETWORK MANAGEMENT

Setup and Configuration Guide for Pathways Mobile Estimating

GE Intelligent Platforms. Proficy HMI/SCADA ifix New Features VERSION 5.8

-lead Grabber Business 2010 User Guide

VirtualCenter Database Maintenance VirtualCenter 2.0.x and Microsoft SQL Server

? Index. Introduction. 1 of 38 About the QMS Network Print Monitor for Windows NT

MGC WebCommander Web Server Manager

Moving the TRITON Reporting Databases

Video Administration Backup and Restore Procedures

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

RSView 32 ACTIVE DISPLAY SYSTEM GETTING RESULTS GUIDE. PUBLICATION VW32AD-GR001E-EN-E July 2011 Supersedes Publication VW32AD-GR001D-EN-E

Visual Studio.NET Database Projects

SCADA/HMI MOVICON TRAINING COURSE PROGRAM

Evaluator s Guide. PC-Duo Enterprise HelpDesk v5.0. Copyright 2006 Vector Networks Ltd and MetaQuest Software Inc. All rights reserved.

Backup Assistant. User Guide. NEC NEC Unified Solutions, Inc. March 2008 NDA-30282, Revision 6

Exclaimer Signature Manager 2.0 User Manual

CTERA Agent for Mac OS-X

CentreWare for Microsoft Operations Manager. User Guide

ChromQuest 5.0 Chromatography Data System

Outpost Network Security

Remote Desktop Services User's Guide

Programming in Access VBA

Producing Listings and Reports Using SAS and Crystal Reports Krishna (Balakrishna) Dandamudi, PharmaNet - SPS, Kennett Square, PA

The software shall provide the necessary tools to allow a user to create a Dashboard based on the queries created.

QIAsymphony Management Console User Manual

ProficyTM Historian A DMINISTRATOR S GUIDE. Version 3.1 Jan. 2006

Xythos on Demand Quick Start Guide For Xythos Drive

iw Document Manager Cabinet Converter User s Guide

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

Changing Your Cameleon Server IP

EMC ApplicationXtender Server

How To Set Up An Intellicus Cluster And Load Balancing On Ubuntu (Windows) With A Cluster And Report Server (Windows And Ubuntu) On A Server (Amd64) On An Ubuntu Server

Lepide Software. LepideAuditor for File Server [CONFIGURATION GUIDE] This guide informs How to configure settings for first time usage of the software

BrightStor ARCserve Backup for Laptops & Desktops

Transcription:

Mastering ifix

Copyright Proprietary Notice The manual and software contain confidential information which represents trade secrets of GE Fanuc International, Inc. and/or its suppliers, and may not be copied or disclosed except as provided in the license with GE Fanuc International, Inc. The information in this manual is subject to change without notice and should not be construed as a commitment by GE Fanuc International, Inc. GE Fanuc International, Inc. assumes no responsibility for any errors that may be in this document. 2003 GE Fanuc International, Inc. ALL RIGHTS RESERVED. Trademarks 2003 GE Fanuc International, Inc. All rights reserved. Microsoft is a registered trademark of Microsoft Corporation. All other brands or names are property of their respective holders. ifix Version 3.0-06.02

Contents 1. Scheduler... 1 Overview... 1 Using the Scheduler with ifix... 4 Getting Started with the Scheduler... 5 Using the Scheduler... 6 Securing Schedules... 6 Resolving Schedules... 6 Running Foreground and Background Schedules... 7 Opening Pictures From Background Schedules... 7 Debugging VBA Scripts... 8 Starting the FixBackgroundServer Task... 8 Adding Schedules to the Background Task Startup List... 8 Foreground Schedule Checklist... 9 Background Schedule Checklist... 9 Designing Schedules... 9 Event-Based Entries... 10 Time-Based Entries... 11 Script Authoring Experts... 12 Writing VBA Scripts that Access the Intellution WorkSpace... 12 Contents iii

Creating and Editing Schedules and Entries... 13 Sorting the Spreadsheet...14 Viewing and Controlling Entry Diagnostics... 15 Writing Custom Scripts for the Scheduler... 15 Script Authoring Expert Sample Code... 16 Form Script Sample Code... 19 Button Script Sample Code... 20 Generated Script Sample Code... 20 2. Failover and Redundancy... 21 Understanding Failover and LAN Redundancy... 21 SCADA Server Failover and LAN Redundancy Configuration Example... 22 Overview Checklist... 23 Understanding SCADA Server Failover... 24 SCADA Server Failover Messages... 25 Writing Data... 25 Alarm Handling for SCADA Servers... 25 SCADA Server Failover Configurations... 27 Primary and Backup Groupings... 28 Configuring SCADA Server Failover... 34 Updating the HOSTS File for SCADA Server Failover... 34 Configuring the SCADA Server Pair... 35 Enabling SCADA Server Failover... 35 Disabling SCADA Server Failover... 35 Synchronizing the Clocks on the SCADA Servers... 35 Assigning Manual Failover Privileges... 36 iv Mastering ifix

Understanding LAN Redundancy... 36 LAN Failover Messages... 37 Reading and Writing Data... 37 Alarm Handling for LAN Redundancy... 37 LAN Redundancy Configuration... 38 Configuring LAN Redundancy... 39 Enabling LAN Redundancy... 39 Updating the HOSTS File for LAN Redundancy... 39 Disabling LAN Redundancy... 40 Optimizing System Performance... 40 Enabling the Alarm Startup Queue Service... 42 Working with the Network Status Server... 42 Using the ifix Diagnostic Display... 44 Accessing SCADA Servers Using True Links... 45 Reading Data... 45 Creating Displays Using Logical and Physical Node Names... 46 Network Status Server Fields... 46 Troubleshooting... 52 3. Local Node Alias... 55 Enabling Local Node Alias... 55 Using Local Node Alias...55 Local Node Alias Examples... 55 Picture Example... 56 Recipe Example... 56 Historical Collection Group Example... 57 Contents v

4. Reporting... 59 ifix Report Experts... 59 Using the Report Experts... 60 Print Crystal Report... 60 Print Crystal Report Expert... 60 Sample Report... 61 5. The Cross Reference Tool... 65 Understanding the Cross Reference Tool... 65 Searching for All Tags... 66 Searching for One Tag... 66 Searching for Text... 67 Using the Report Wizard or the Quick Report... 68 Exploring the Cross Reference Tool Interface... 70 Using the Cross Reference Tool Toolbar... 73 Creating Quick Reports...74 Creating Reports Using the Cross Reference Report Wizard... 76 Specifying Search Settings... 76 Specifying Multiple Files for the Report... 77 Specifying Report Settings Options... 79 Reviewing the Report Settings... 80 Viewing the Report Results... 81 Viewing the Status Trail... 82 Viewing a Search that Resolves Tags Using All Tag Group Files... 83 Viewing a Search that Includes VBA Scripts... 84 vi Mastering ifix

Selecting Print Options and Printing a Report... 85 Selecting Page Options for Printing... 87 Customizing Header or Footer Text... 88 Creating a Cross Reference Tool Report from the Command-Line... 89 6. Creating Picture-specific Help Files... 91 Why Create Picture-specific Help Files?... 91 What's This? Help... 92 What's This? Help Design... 93 Adding Help to an ifix Picture... 94 Creating the Help File... 95 Requirements... 95 Creating a Topic File... 95 Creating a Map File... 96 Creating and Compiling a Project File... 97 Testing Your Help File... 97 Example: Creating a Picture-Specific Help File... 98 In Microsoft Word... 98 In the Intellution WorkSpace... 98 In Microsoft Help Workshop... 99 Testing the Sample Help File... 99 7. Customizing the System Tree... 101 Adding Folders to the System Tree... 103 Adding Files to the System Tree... 105 Deleting Folders and Files from the System Tree... 109 Index... 111 Contents vii

viii Mastering ifix

Figures Figure 1-1: Scheduler in the Configuration Environment... 2 Figure 1-2: Scheduler in the Run-time Environment... 3 Figure 2-1: SCADA Backup Node and LAN Redundancy Configuration... 23 Figure 2-2: SCADA Server Failover Configuration from an iclient... 27 Figure 2-3: SCADA Server Failover Configuration from a SCADA Server... 28 Figure 2-4: Typical Configuration of an iclient with a Primary and Backup SCADA... 29 Figure 2-5: SCADA Server Configuration with a Backup SCADA... 30 Figure 2-6: Invalid Primary and Backup Grouping Configuration... 31 Figure 2-7: Correct Primary and Backup Grouping Configuration... 32 Figure 2-8: Invalid SCADA Configuration in a SCADA Server Pair... 33 Figure 2-9: Invalid Version Configuration in a SCADA Server Pair... 34 Figure 2-10: Typical LAN Redundancy Configuration... 38 Figure 2-11: LAN Redundancy Configuration with an Excluded Card... 39 Figure 4-1: Sample Crystal Report... 63 Figure 5-1: Report Results of a Search for All Tags... 66 Figure 5-2: Report Results for a One Tag Search... 67 Figure 5-3: Report Results of a Text Search... 68 Figure 5-4: Cross Reference Tool Toolbar Button... 70 Figure 5-5: The Cross Reference Tool Window... 72 Figure 5-6: The Quick Report Dialog Box... 75 Figure 5-7: Cross Reference Report Wizard - Search Settings Tab... 77 Figure 5-8: Cross Reference Report Wizard - Files Tab... 78 Figure 5-9: Cross Reference Report Wizard - Report Settings Tab... 80 Figure 5-10: Cross Reference Wizard - Apply and Go Tab... 81 Figure 5-11: Status Trail... 83 Figure 5-12: Search Results of Resolving Tags using All Tag Group Files... 84 Figure 5-13: Search Results of Including VBA Scripts in Search... 85 Figure 5-14: Cross Reference Tool Print Dialog Box... 86 Figure 5-15: Page Setup Dialog Box... 87 Figure 5-16: Change Header and Footer Attributes Dialog Box... 88 Figure 7-1: System Tree Customization Overview... 102 Figures ix

x Mastering ifix

Tables Table 2-1: Network Status Server (NSS) Fields... 47 Table 5-1: Cross Reference Tool Toolbar Buttons... 73 Table 5-2: Search Results... 82 Table 7-1: Folder Attributes...104 Table 7-2: File Attributes... 107 Tables xi

xii Mastering ifix

The Mastering ifix manual is intended for system integrators, OEMs, and process control engineers responsible for implementing a software automation solution using ifix. This manual assumes that you are familiar with Microsoft Windows NT or Windows 2000, Microsoft Visual Basic, the Intellution WorkSpace, and your plant's network. Reference Documents For related information about ifix, refer to the following manuals: Understanding ifix Writing Scripts Creating Pictures Setting Up the Environment Implementing Alarms and Messages xiii

xiv Mastering ifix

1. Scheduler There are certain tasks that you may want to perform at a specified time or interval, or when a change occurs in a database value or in any OPC data server value. For example, you may want to run a Visual Basic for Applications (VBA) script that generates a report at the end of every shift or replaces the currently-displayed picture when a database point exceeds a certain value. The Scheduler allows you to create, edit, monitor, and run both types of actions as scheduled entries. In the Scheduler, you define the time or event that triggers a scheduled entry, and the action, referred to as an operation, that you want to occur. ifix supplies Script Authoring Experts for common tasks such as replacing a picture. These Experts generate scripts based on the information that you supply to the Expert. You can also write custom scripts for common tasks that do not have Script Authoring Experts. Refer to the Writing Scripts manual for detailed information on writing VBA scripts. Overview In the configuration environment, ifix displays schedules in the Intellution WorkSpace, allowing you to easily create, edit, and start monitoring entries while you work on your project. Chapter 1. Scheduler 1

Indicates if the schedule will run in the foreground (F) or background (B) Scheduled entries Schedule Entry tabs Scheduled entries Schedules Schedules folder Figure 1-1: Scheduler in the Configuration Environment In the run-time environment, you can view the status and statistics of the entries in your schedule. You can also control your entries using the Start/Stop, Reset, and Fire Now buttons. 2 Mastering ifix

Scheduled entries Indicates if the schedule runs in the foreground (F) or background (B) Schedule Entry tabs Entry status, name,statistics, description, and controls Figure 1-2: Scheduler in the Run-time Environment Chapter 1. Scheduler 3

The Scheduler provides the following features: Spreadsheet design that allows you to easily view and edit entries. Ability to schedule as many entries as necessary and to trigger them as often as necessary. Ability to run as a service under Windows NT or Windows 2000. Script Authoring Experts for common events. Ability to easily monitor entries and view diagnostic statistics. Ability to trigger scheduled scripts on demand. Ability to run schedules as a foreground or background task. Using the Scheduler with ifix Individual schedules can be run as a foreground or the background task. When you run a schedule in the foreground, you can easily test and debug scripts in the run-time environment. When an error occurs, VBA launches the Visual Basic Editor (VBE) debugger, where you can edit and save changes to a script. You cannot run scripts in the configuration environment. When you run schedules as background tasks, they run regardless of whether the Intellution WorkSpace is in the run-time or configuration environment, and regardless of whether the Intellution WorkSpace is running. If you modify a scheduled entry, it automatically restarts. When the Intellution WorkSpace is in the run-time environment, you can view Scheduler statistics and diagnostic information about each entry in the schedule, including the number of times each entry has been fired and the last time it was fired. You can also run the Scheduler in the background as a service under Windows NT or Windows 2000. Because the Scheduler runs as a service, operators can log in and out of an NT or 2000 node without affecting scheduled entries, and entries are triggered regardless of whether or not the Intellution WorkSpace is running. 4 Mastering ifix

You can create multiple schedules, which allows you to organize and easily maintain entries. Each schedule can be configured individually to run as a background or foreground task. Also, as you add events to a schedule, you can choose whether or not to start monitoring them immediately, or to wait until the next time the Intellution WorkSpace starts. The Scheduler supports a powerful Find and Replace feature that allows you to quickly and easily modify information in a schedule. For additional information on using the Find and Replace feature, refer to the Finding and Replacing Data section of the Understanding ifix manual. Getting Started with the Scheduler Before you start scheduling entries, you should understand how the Scheduler executes scripts. The Scheduler can run as a foreground or background task. When you run a schedule in the foreground, it runs on the same thread as the scripts in the Intellution WorkSpace, allowing you to quickly test and debug scripts in the run-time environment. When you run a schedule in the background, it runs on a separate thread from the scripts in the Intellution WorkSpace, monitoring the system and triggering scheduled events. The Scheduler does not loop; it waits for events to occur. When a selected event occurs, the script is triggered from a schedule running in the background, it is added to the queue, and it executes after the scripts in front of it have finished executing. For this reason, when a schedule is run as a background task it is ideal for monitoring tasks. This is exactly the same as scripts triggered from schedules running as foreground tasks in the Intellution WorkSpace. Generally, schedules created to run in the foreground are used for testing and debugging. Once a schedule created to run in the foreground has been tested and debugged, we suggest that you set it to run in the background. Refer to the Running Foreground and Background Schedules section for more information. Refer to the Writing Scripts manual for an explanation of how scripts are implemented in the Intellution WorkSpace. Chapter 1. Scheduler 5

Using the Scheduler Schedules are spreadsheets with separate tabs for event-based entries and time-based entries. Double-clicking an empty row in a schedule displays a dialog box for adding an entry. Once you have created an entry, you can edit individual cells in the spreadsheet without using the dialog box. Time-based entries create a timer object while event-based entries create an event object. These ifix objects have associated properties, methods, and events that you can use in VBA scripts. They are displayed in the system tree and are the objects to which scheduled scripts are tied. Securing Schedules ifix s schedule protection prevents unauthorized users from accessing or modifying schedules. To configure security for your schedules, enter a security area in the Properties window. For more information on configuring security, refer to the Implementing Security manual. Resolving Schedules Database information for each data source in a schedule is saved as part of the file on disk. When a schedule executes in the run-time environment, and the database information is not up-to-date, ifix queries the database and resolves the tag definitions. This can be a time-consuming process which slows the execution of the schedule. Resolving schedules removes the need for ifix to query the database. Therefore, resolved schedules execute faster in the run-time environment. We recommend resolving your schedules as a final step in the configuration process. The Resolve feature is available for both schedules and pictures. If the process database is modified after you resolve a schedule, you need to run Resolve again. These modifications include: Loading a different database. Deleting database tags. 6 Mastering ifix

Running Foreground and Background Schedules You can select whether you want your schedules to run as foreground or background tasks. When you create a new schedule, the default is for it to run in the foreground. To run a schedule in the foreground, the Intellution WorkSpace must be running in the run-time environment. Running a schedule in the foreground is useful for testing and debugging VBA scripts. To run a schedule in the background, the FixBackgroundServer task must be running. If the FixBackgroundServer task is not running, it is automatically started when a schedule is added to the background task. To create a schedule that runs in the background you must change the default setting in the Scheduler Properties dialog box, which is available by right-clicking a schedule and selecting Scheduler Properties from the pop-up menu. You can use this dialog box to change the default setting for a new schedule or for an existing schedule that is set to run in the foreground. Also, you can select whether you want a schedule to run in the foreground or the background, set the window properties, and set the statistics refresh rates. NOTE: An unsigned write occurs when a database tag is configured for electronic signature, but you write a value directly to that tag without capturing a signature. If you are working in a secure environment with the Electronic Signature option enabled, you must be aware of the impact of unsigned writes to the process database. Unsigned writes can originate from schedules. Refer to the Implications of Database Writes With Electronic Signature section of the Using Electronic Signatures manual for detailed information. Opening Pictures From Background Schedules If a picture opens from a background schedule while you are editing a picture or schedule in the WorkSpace, you may experience unexpected behavior. In some instances, the picture may open over a modal dialog box and you will not be able to get back to the dialog box. To avoid this problem, we recommend that when adding an entry to a background schedule, you configure the schedule to check whether the WorkSpace is in the runtime or configuration environment before opening a picture. NOTE: Schedules that are configured to run in the background cannot reference pictures. When FixBackgroundServer opens a schedule that references a picture, it also tries to open that picture. Since FixBackgroundServer cannot open pictures, an error message appears. Chapter 1. Scheduler 7

For more information on creating new schedules and using the Scheduler Properties dialog box, refer to the Creating and Editing Schedules and Entries section. Debugging VBA Scripts If a scripting error occurs while a schedule is running, the VBE debugger automatically launches to allow you to quickly edit and save the changes made to the script. If the schedule is running in the foreground when the VBE launches, any changes made to the script are automatically saved in the schedule. If the schedule is running in the background when the VBE launches, close the VBE editor, re-open it in Intellution WorkSpace, and make the necessary changes to the script. Any changes made to the script are automatically saved in the schedule. NOTE: In order for scripting changes to be saved in a schedule, the VBE must be started in the Intellution WorkSpace. Any scripting changes made in the VBE launched from the FixBackgroundServer task will not be saved in a schedule. Starting the FixBackgroundServer Task The FixBackgroundServer task can run on its own or as a Windows service. Refer to the Setting Up the Environment manual for more information on configuring startup tasks. Adding Schedules to the Background Task Startup List Normally, you want your schedules to start automatically when ifix is started. To do this, you must add the schedules to the background task startup list. If you are adding entries to a schedule that is already running in the background, you can choose whether or not to start monitoring the entry immediately. 8 Mastering ifix

Foreground Schedule Checklist The following is an overview of the steps necessary to successfully implement a foreground schedule: [1] Create a foreground schedule in the configuration environment of the Intellution WorkSpace. [2] Monitor entries as necessary from the run-time environment of the Intellution WorkSpace. Background Schedule Checklist When creating a schedule that runs in the background, you can create it directly as a background schedule or create a foreground schedule and convert it to a background schedule. The following is an overview of the steps necessary to successfully implement a background schedule: [1] Create a background schedule in the configuration environment of the Intellution WorkSpace. [2] Add the schedule to the background task startup list, using the Background Startup tab in the User Preferences dialog box. [3] Monitor entries as necessary from the run-time environment in the Intellution WorkSpace. Designing Schedules This chapter explains the issues you need to consider while you are designing schedules. When creating schedules, there are two types of entries that you can select: event-based entries and time-based entries. This section describes both types of entries and the triggers that can be used by each. Chapter 1. Scheduler 9

Event-Based Entries Event-based entries are created using the Add Event Entry dialog box. Event-based entries can use any data source available to the system to trigger an action. To select a data source, you can either enter the data source in the Data Source field or click the Browse button to access the Expression Builder. Five event types are available to trigger an action based on the value of a data source. For example, you may want to have a certain action occur when an alarm equals HIHI. By tying the value of the alarm field to the OnTrue event type, you can trigger an action when the value of this field becomes equal to HIHI. The following table lists the event types that are available and when they trigger: The event type... OnDataChange OnTrue OnFalse WhileTrue WhileFalse Triggers... When the expression changes. When the expression resolves to a non-zero value. When the expression resolves to zero. At the specified interval as long as the expression evaluates to a non-zero value. At the specified interval as long as the expression evaluates to zero. 10 Mastering ifix

Time-Based Entries Time-based entries are created using the Add Timer Entry dialog box. Time-based entries trigger at a scheduled time and are not tied to a data source. The following table lists the time triggers that are available and when they trigger: The time type... One Shot Continuous Triggers... Once at the specified date and time. For example, you can schedule an entry to trigger at 5:00 p.m. on 7/4/98. Continuously at the specified interval, starting at the specified time. For example, you can schedule an entry to trigger every eight hours. NOTE: You may notice in the log file that the timers occasionally fire +/- 1 or 2 milliseconds off. This may happen on the first fire and will return to the specified interval in a subsequent firing. Daily Monthly On the scheduled days of the week at a particular time. Optionally, you can specify an end time and interval. For example, you can schedule an entry to trigger Monday through Friday, at noon, or every hour from noon until 6:00 p.m. On the scheduled days of the month at a particular time. Optionally, you can specify an end time and interval. For example, you can schedule an event for the 15 th of the month, at 9:00 a.m., or every hour from 9:00 a.m. until 5:00 p.m. You can also schedule an event for the end of the month at a particular time. This setting determines the last day of the month for you. NOTE: If you have Daylight Saving Time enabled and you create a timed-based entry to have a 2:30 AM Start Time, be aware that during the transition from Standard Time to Daylight Saving Time, the schedule will actually fire at 1:30 AM. All other days of the year, it will fire at 2:30 AM. All time-based entries run the script tied to the OnTimeOut event procedure. Chapter 1. Scheduler 11

Adjusting for Daylight Saving Time The Scheduler supports daylight saving time for time-based events. Before allowing automatic Daylight Saving Time to be used in a production environment, you should test your application under each of the following scenarios for proper behavior: While in Standard Time. While in Daylight Time. During the transition from Standard Time to Daylight Time. During the transition from Daylight Time to Standard Time. Script Authoring Experts When you select an action in the Operation field of either the Add Timer Entry or Add Event Entry dialog box, ifix asks you whether or not you want to run the Script Authoring Expert now. If you select Yes, it automatically runs the Script Authoring Expert associated with that action. If you want to run the Script Authoring Expert at a later time, you can modify the entry and click the Run Expert button. After you have provided the Expert with the required information, the Expert generates a VBA script tied to the appropriate event. For example, the Replace Picture Script Authoring Expert asks which picture you want to display and, once you have provided it with a picture name, generates a script to replace the picture. Once the script is generated, you can edit it by re-entering the Expert or by accessing it directly using the VBE. In addition to the Script Authoring Experts provided in ifix, you can write your own custom scripts for frequently-performed tasks. Refer to the Writing Custom Scripts for the Scheduler section for information on how to create your own custom scripts for the Scheduler. Writing VBA Scripts that Access the Intellution WorkSpace When you write a scheduled script that opens, closes, replaces, or accesses a property of an object in a picture, you must ensure that the Intellution WorkSpace is running and that the picture you need to access is open and active. This differs from writing scripts that run from pictures. 12 Mastering ifix

Before you can access any information about the active picture in the Intellution WorkSpace, you must activate the Intellution Workspace using the GetObject method as shown in the following example. Dim AppObj As Object Set AppObj = GetObject("","Workspace.Application") You can now check to see if the picture is open: If UCase(AppObj.ActiveDocument.Name) = UCase("MyPicture") Then <perform a task or open the picture> You can then check to see which document or picture is open, and replace it if it is not the one you need. Once the proper picture is open, you can access its objects. Refer to the Writing Scripts manual for more information on using VBA with ifix. Creating and Editing Schedules and Entries The Scheduler allows you to create multiple schedules which help you to easily organize and maintain events. When you create a new schedule, you can control its properties from the Scheduler Properties dialog box. The following table lists the tabs on the Scheduler Properties dialog box and the properties that can be controlled from each: Tabs Run Time State Window Properties Properties Run in Foreground Run in Background Window Height Window Width Window Styles Chapter 1. Scheduler 13

Tabs Stats Refresh Background Files Properties Timer Statistics Refresh Rate (in seconds) Event Statistics Refresh Rate (in seconds) Lists all schedules running in the background. No changes can be made from this tab. You can create new schedules when the Intellution WorkSpace is in the configuration environment. NOTE: ifix does not support schedules that use the same name as the local node. Therefore, do not use your local node s name for any schedules you create. Once you have created a schedule, the schedule and all its entries appear in the Schedules folder of the system tree. You can open a schedule and view or edit its properties at any time by double-clicking the schedule name in the system tree. Once you have created a schedule, you can add new entries to it using the Script Authoring Experts in the Scheduler category or by writing your own custom scripts. You can edit an existing entry by selecting the entire entry or a particular cell within the entry. Once created, entries can be easily copied or moved from one schedule to another. Sorting the Spreadsheet You can sort Scheduler entries in ascending or descending order by clicking the heading of the column you want to sort. For example, if you want to sort entries alphabetically by name, click the Name column's heading. The entries will appear in ascending order. To sort them in descending order, click the Name column's heading again. NOTE: Sorting is only available in the configuration environment. In the run-time environment, entries appear in the order they were added to the schedule. 14 Mastering ifix

Viewing and Controlling Entry Diagnostics The Scheduler allows you to view and control entry diagnostics in the run-time environment. If you open a schedule in the run-time environment, you can view the status of entries, the number of times they have been fired, and the time when they were last fired. You can also: Start or stop an entry from executing. Reset the statistics (number of times it has been fired and time when it was last fired) of the entry. Trigger an entry to fire on demand. If you have loaded a schedule, but the scripts are not firing, you need to determine whether the problem is caused by the firing mechanism or by the script itself. Writing Custom Scripts for the Scheduler The Scheduler provides Script Authoring Experts that generate a script that is executed when an entry triggers. These Experts are available for common tasks such as toggling a digital point or generating a report. You can also create custom scripts for tasks that you need to perform. This section shows sample code that may be helpful when writing custom scripts for use with the Scheduler. For additional examples, use the VBE to view the code for the Experts, buttons, and forms supplied with ifix. Refer to the Writing Scripts manual for detailed information on writing VBA scripts. Chapter 1. Scheduler 15

Script Authoring Expert Sample Code The following properties store information that is passed between a Script Authoring Expert, the Scheduler, and the Intellution WorkSpace: ProcedureObject. EventProcedure. Property1 through Property10. Only the following two properties have a specific purpose: ProcedureObject the Timer or Event entry to which the script will be attached. For example, Event5 or Timer 3. EventProcedure the name of the event type that will trigger the script. For example, OnTrue. Property1 through Property10 are available to the Expert for operational parameters specific to the Expert. Initially, these parameters are passed from the Expert to the Scheduler, and do not appear in the Scheduler until after the script has been generated. For example, if the user re-enters the Expert, the Scheduler passes them back to the Expert, which can then use them to populate a form. The following example shows the code behind the Toggle Digital Point Script Authoring Expert. Private Sub ToggleDigitalPointWizard_Click() Dim CurrentObj As Object Dim szeventname As String On Error GoTo ErrorHandler Application.DeActivateWorkspaceUI True, False Prevent this button from being used in a Picture document If InStr(1, Application.ActiveDocument.Type, "FIXSchedule",_ vbtextcompare) = 0 Then Application.ActivateWorkspaceUI MsgBox "This button is not for use. Use the button _ from the Command Tasks category." Exit Sub End If 16 Mastering ifix

Pass the timer or event object s ProcedureObject and EventProceduure to the form Set CurrentObj = ToggleDigitalPointWizard.ProcedureObject szeventname = ToggleDigitalPointWizard.EventProcedure The FIX database tag is in Property1. Enter the tag in the form field frmtoggledigitalpointcommand.expressioneditor1.edittext = ToggleDigitalPointWizard.Property1 Call a subroutine in the form that enters the ProcedureObject and EventProcedure as global variables so that the script in the form can act on them Call frmtoggledigitalpointcommand.getschedulervalues(currentobj, szeventname) frmtoggledigitalpointcommand.bcancel = False Open the form frmtoggledigitalpointcommand.show Pass the FIX database tag back to the scheduler If frmtoggledigitalpointcommand.bcancel = False Then ToggleDigitalPointWizard.Property1 = frmtoggledigitalpointcommand.expressioneditor1.edittext End If Application.ActivateWorkspaceUI Exit Sub ErrorHandler: HandleError End Sub The following example shows the code behind the Generate Report Script Authoring Expert. Private Sub GenerateReportWizard_Click() Dim CurrentObj As Object Dim szeventname As String On Error GoTo ErrorHandler Application.DeActivateWorkspaceUI True, False Chapter 1. Scheduler 17

Prevent this button from being used in a Picture document If InStr(1, Application.ActiveDocument.Type, "FIXSchedule", vbtextcompare) = 0 Then Application.ActivateWorkspaceUI MsgBox "This button is not for use. Use the button _ from the Command Tasks category." Exit Sub End If Pass the timer or event object s ProcedureObject and EventProceduure to the form Set CurrentObj = GenerateReportWizard.ProcedureObject szeventname = GenerateReportWizard.EventProcedure The Crystal Report name is in Property1. Enter the report name in the form field frmgeneratereportcommand.txtreport.text = GenerateReportWizard.Property1 Call a subroutine in the form that enters the ProcedureObject and EventProcedure as global variables so that the script in the form can act on them Call frmgeneratereportcommand.getschedulervalues_ (CurrentObj, szeventname) frmgeneratereportcommand.bcancel = False Open the form frmgeneratereportcommand.show Pass the Crystal Report name back to the scheduler If frmgeneratereportcommand.bcancel = False Then GenerateReportWizard.Property1 = frmgeneratereportcommand.txtreport End If Application.ActivateWorkspaceUI Exit Sub ErrorHandler: HandleError End Sub 18 Mastering ifix

Form Script Sample Code The following example shows code that collects the name of the picture the user wants to display when the event is triggered, generates the script, and creates the event. The Procedures object is a collection of scripts. Before you generate the script, you need to get the index number for the next script using the GetEventHandlerIndex method. Once you generate the string that will become the script, use the AddEventHandler method to add the event. Private CurrentObject As Object Private EventName As String Public Sub GetCurrentObjectValues(obj, Str) Set CurrentObject = obj EventName = Str End Sub Private Sub CommandButton1_Click() 'get file name entered by user Dim FileName As String FileName = TextBox1.Value Dim WorkingObj As Object Set WorkingObj = CurrentObject.Procedures 'Get the index for the procedure Dim Index As Long Dim Found As Long WorkingObj.GetEventHandlerIndex EventName, Index, Found 'Generate code Dim StringCode As String StringCode = "Dim doc As Object" & Chr(13) _ & "Dim PicturePath As String" & Chr(13) _ & "PicturePath = ""c:\fix32\pic\"" & FileName" & _ Chr(13) & "Set doc = _ Application.Documents.Open(PicturePath)" & Chr(13) 'Add the event WorkingObj.AddEventHandler EventName, StringCode, Index 'Close the form End End Sub Chapter 1. Scheduler 19

Button Script Sample Code The following example shows code for a button object called MyExpert that gets the timer or event object, the event trigger name, and picture name, if any, from the Add Event dialog box. It passes this information in to the form using the GetCurrentObjectValues procedure, and then displays the form. Private Sub MyExpert_Click() Dim CurrentObj As Object Dim EventName As String 'Set procedure object, event name, and file name Set CurrentObj = MyExpert.ProcedureObject EventName = MyExpert.EventProcedure MyExpert.Property1 = frmopenpicture.textbox1.value 'Pass the object and event name into the form Call frmopenpicture.getcurrentobjectvalues(currentobj,_ EventName) frmopenpicture.show frmopenpicture.hide End Sub Generated Script Sample Code The following example shows the script that would be generated if you ran this Expert on the Timer7 object, using the OnTimeOut event. Private Sub Timer7_OnTimeOut(ByVal ltimerid As Long) Dim doc As Object Dim PicturePath As String PicturePath = "c:\fix32\pic\" & FileName Set doc = Application.Documents.Open(PicturePath) End Sub 20 Mastering ifix

2. Failover and Redundancy This section describes ifix SCADA server failover and LAN redundancy. Also included is information on monitoring and controlling your network using the Network Status Server and ifix diagnostic displays. Understanding Failover and LAN Redundancy Operators view process data received from a SCADA server using an ifix iclient. Should the SCADA server or LAN connection become unavailable, process data can become unavailable to the operator at the iclient. ifix SCADA server failover and LAN redundancy increase the availability of data to the iclient and minimize the amount of time that data is unavailable. It does this by allowing the iclient to connect to a primary and backup SCADA server and to use more than one LAN connection to the SCADA server. By recognizing multiple paths to the data, ifix can switch from one path to another automatically, improving overall system availability for critical operations. Switching from one connection to another is known as failover. SCADA server failover allows you to connect an iclient to both the primary and backup SCADA servers, the SCADA partners, that are connected to the same PLC. This feature provides two paths to the same process data instead of just one. The iclient establishes and maintains the connections to both the primary and backup SCADA servers, either of which can be the active server the SCADA node with which the iclient is currently communicating or the non-active SCADA server. When the connection to the active SCADA server is lost, ifix automatically fails over to the non-active SCADA server. LAN redundancy allows two physical network connections between the iclient and SCADA server, providing two network paths to the same process data. When the connection over one network path is lost, ifix automatically fails over to the other network path. Failover works the same way regardless of whether you are using SCADA server failover or LAN redundancy. In either case, failover to the non-active SCADA server or non-active network path occurs only if the non-active connection is available. Chapter 2. Failover and Redundancy 21

You can use SCADA server failover and LAN redundancy either individually or together. If you enable both SCADA server failover and LAN redundancy, SCADA server failover takes precedence over LAN redundancy. In other words, ifix tries to fail over to the partner SCADA node first. If the partner SCADA node is not available, failover occurs to the backup network path. ifix also provides the following features: Automatic session monitoring of each SCADA server and managed LAN connection. Improved display portability by using logical node names to represent the primary and backup SCADA partners. Availability of connection status information using the Network Status Server (NSS). Alarm acknowledgment synchronization when both partner SCADA servers are up and running, ensuring that you only have to acknowledge an alarm once. Manual failover feature that allows an operator to initiate SCADA failover to the non-active SCADA server. SCADA Server Failover and LAN Redundancy Configuration Example If you enable both SCADA server failover and LAN redundancy, SCADA server failover takes precedence over LAN redundancy. For example, in the following figure an iclient configured with the logical node name LGCL_ND1 is communicating with SCADA PACKER1 over network path 1. If the connection is lost, the iclient will attempt to fail over to PACKER2 before reconnecting to PACKER1 over network path 2. 22 Mastering ifix

Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 iclient Network Path 2 Primary SCADA Node Network Path 1 Backup SCADA Node Local Node Name: PACKER1 Local Logical Name: LGCL_ND1 Local Node Name: PACKER2 Local Logical Name: LGCL_ND1 PLC Figure 2-1: SCADA Backup Node and LAN Redundancy Configuration Overview Checklist The following is a list of general tasks for implementing failover and redundancy: [1] Install your hardware and network connections, and ensure that they work and communicate independently of ifix. [2] Configure SCADA server failover: [a] [b] [c] Define a Logical Name. Configure primary and backup SCADA servers in the SCU. Configure the SCADA partners. Chapter 2. Failover and Redundancy 23

[d] [e] [f] Configure alarm acknowledgement synchronization. Synchronize the clocks on the SCADA servers. Assign manual failover privileges if security is enabled. [3] Configure LAN redundancy: [a] [b] [c] Configure network paths for LAN redundancy in the SCU. Update the hosts file if you are using TCP/IP. If necessary, optimize system performance by disabling network paths and balancing network timers and failover time. [4] Monitor and control network status using the Network Status Server fields and diagnostic displays supplied with ifix. Understanding SCADA Server Failover When ifix starts, the iclient attempts to establish communication with its primary and backup SCADA servers. The primary node is the SCADA node you want the iclient to communicate with at startup. The backup node is the SCADA node you want the iclient to communicate with if the primary node becomes unavailable. If both nodes are available, the iclient establishes a connection with both of them. The first SCADA node it establishes a connection with is the active node. If only one SCADA server is available, the iclient establishes a connection with it. If neither SCADA server is available, the iclient polls both nodes until it establishes a connection with at least one SCADA server. If the iclient fails over to the backup SCADA, it remains connected to the backup SCADA even when the primary SCADA becomes available. Automatic failover to the primary SCADA only occurs if the connection to the backup SCADA is lost and the primary SCADA is available. You can also manually initiate failover back to the primary SCADA once it becomes available. 24 Mastering ifix

SCADA Server Failover Messages You can identify when a SCADA server failover has occurred using a Network Status Server tagname, or through the alarm messages. Refer to the Working with the Network Status Server section for more information. ifix sends an alarm message whenever SCADA server failover occurs. This alarm message never appears at the remote nodes. For example, if you are communicating from an iclient named LN1_VIEW to a primary SCADA node named PACKER1, and the iclient fails over to the backup SCADA node named PACKER2, the message on the iclient is: 06/07/2002 16:35:22.5 Connection Failover: connection to PACKER1 has been switched to PACKER2 Writing Data Data is written to the active SCADA server only. For example, if the active node is PACKER1 and the non-active node is PACKER2, before a failover the iclient writes data to PACKER1. After a failover, the iclient writes data to PACKER2. Alarm Handling for SCADA Servers When you configure networking and SCADA options in the SCU for both partner SCADA servers, the Alarm Startup Queue Service is automatically enabled. This service ensures that alarms are not lost during session loss and reconnection. To enable alarm acknowledgement synchronization between a pair of SCADA nodes, you need to define the partner SCADA for each SCADA. For example, if you have two SCADA nodes (SCADA1 and SCADA2), you can enable alarm acknowledgement synchronization by doing the following: [1] In Local Startup, define your logical node name. [2] In the SCU of SCADA1, select SCADA from the Configure menu. [3] In the SCADA Name field in the Partner SCADA section of the SCADA Configuration dialog box, enter SCADA2. NOTE: SCADA2 must have a different logical node name than SCADA1. Chapter 2. Failover and Redundancy 25

[4] In the SCU of SCADA2, select SCADA from the Configure menu. [5] In the SCADA Name field in the Partner SCADA section of the SCADA Configuration dialog box, enter SCADA1. [6] Make sure the primary and backup SCADA servers are listed as part of a logical pair in the Configured Remote Nodes list box of each computer s SCU network configuration. For more information on logical pairs, refer to Primary and Backup Groupings. NOTE: Do not list the primary and backup SCADA servers as individual remote nodes. [7] Make sure the process databases of both nodes are identical. The easiest way to do this is to compare the serial numbers of both databases. If they do not match, integrate the two databases and copy the resulting PDB file and AlarmAreas.AAD to each SCADA server. When an alarm occurs on a SCADA server, the alarm is sent to its iclient. The iclient accepts alarms from the active node only, regardless of whether it is the primary or backup SCADA. You cannot view alarms generated by the non-active SCADA. At the iclient, alarms and messages display the logical node name in brackets. In the following example, the logical node name is LNN. 04/29/98 22:49:45.1 [LNN] AI-1 HI 72.00 However, if the message is generated by the Database Manager or because of networking problems, node names within the alarm text display the physical node name. When a node is configured as part of a partner SCADA server pair, the Alarm Summary Queue needs to be twice as big as it would be if the node were not part of a SCADA pair. For example, if you are generating 500 alarms, the Alarm Summary Queue must be set to 1000. If the Alarm Summary Queue overflows, you may see alarms appear and disappear in the alarm summary. Refer to the Implementing Alarms and Messages manual for more information on queue sizes. 26 Mastering ifix

SCADA Server Failover Configurations You can configure SCADA server failover from an iclient or from a SCADA server that also functions as an iclient. The following figure illustrates a SCADA server failover configuration from an iclient. iclient Alarm Acknowledgement Synchronization Primary SCADA Node Backup SCADA Node PLC Figure 2-2: SCADA Server Failover Configuration from an iclient The following figure illustrates a SCADA server failover configuration that involves two SCADA servers. Chapter 2. Failover and Redundancy 27

Local Node Name: PACKER1 Local Node Name: PACKER2 Alarm Acknowledgement Synchronization Primary SCADA Node Backup SCADA Node PLC Figure 2-3: SCADA Server Failover Configuration from a SCADA Server Even in this simple configuration, you want most applications on your iclients referencing the same database. In this example, when PACKER1 and PACKER2 have established a session, PACKER2 accesses information through PACKER1. In this configuration, automatic failover to the local node occurs if the remote node session is lost. Once the local node is active, only a manual failover will make the remote node active. Refer to the Working with the Network Status Server section for information on initiating a manual failover. Primary and Backup Groupings SCADA server failover uses a logical node name to represent the physical names of the primary and backup SCADA nodes. The primary node is the SCADA server you want the iclient to communicate with at startup. The backup node is the SCADA server you want the iclient to communicate with if the primary node becomes unavailable. The applications on the iclient communicate to the logical node name, and ifix substitutes the physical node name at run time based on which SCADA server is available. The combination of the logical node name and physical primary and backup SCADA server names is referred to as the primary and backup grouping. You configure the primary and backup grouping in the SCU of the iclient and of each SCADA server. 28 Mastering ifix

For all figures included in this section, the Local Node Names and Local Logical Names are configured in the Local Startup Definition dialog box of the SCU. The primary and backup groupings are configured in the Configured Remote Nodes section of the Network Configuration dialog box of the SCU. The Partner SCADA name, used for alarm acknowledgement synchronization, is configured in the SCADA Name text box in the Partner SCADA section of the SCADA Configuration dialog box in the SCU. NOTE: Ensure that the local logical node names are defined on the primary and backup SCADA nodes before configuring the primary and backup grouping. Define local logical node names in the Local Startup Definition dialog box of each SCADA node s SCU. Configuration Example 1 The following figure provides an example of a primary and backup grouping. Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Local Node Name: PACKER1 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER2 iclient Local Node Name: PACKER2 Local Logical Name: LGCL_ND1 Primary and Backup Grouping Logical Name: LGCL_ND1 Primary SCADA: PACKER1 Backup SCADA: PACKER2 Partner SCADA: PACKER 1 Primary SCADA Backup SCADA PLC Figure 2-4: Typical Configuration of an iclient with a Primary and Backup SCADA Chapter 2. Failover and Redundancy 29

Configuration Example 2 The following figure shows a configuration that involves two SCADA servers that also serve the iclient function. Primary and Backup Grouping Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4 Partner SCADA: PACKER 4 Local Node Name: PACKER3 Local Logical Name: LGCL_ND2 Primary and Backup Grouping Logical Name: LGCL_ND2 Primary SCADA: PACKER3 Backup SCADA: PACKER4 Partner SCADA: PACKER 3 Local Node Name: PACKER4 Local Logical Name: LGCL_ND2 Primary SCADA Backup SCADA PLC Figure 2-5: SCADA Server Configuration with a Backup SCADA Invalid Configuration Example 1 A SCADA server can only be used in one primary and backup grouping. For example, PACKER2 cannot be part of the primary and backup groupings of both LGCL_ND1 and LGCL_ND2, as illustrated in the next figure. The primary and backup grouping must be used by all iclients that communicate with the SCADA server. In addition, if a SCADA server is part of a primary and backup grouping, it can only be accessed by ifix iclients, and only as a pair. The nodes in the pair cannot be accessed individually. The following figure shows invalid primary and backup grouping configuration: 30 Mastering ifix